Making Requests
Prerequisites
First, find which publisher’s content you want to query.- Find Your Tenant (Publisher Name): Go to the Organizations page in Studio and click “View Publishers”. Your Tenant is the name of the publisher you’re querying.
- Identify the Collection: A collection is where we keep customer content. Set the
collectionfield toGlooProd, the only collection you need. - Get an API key: Create one on the API Keys page and send it as a Bearer token.
Send a request
With your tenant name, you can query the search endpoint. Endpoint:POST /ai/v1/data/search
Example Response
Each result indata is one snippet. This excerpt shows the fields you’ll use most:
JSON
metadata.certaintyandmetadata.distanceshow how closely the snippet matches the meaning of your query.properties.snippetis the matching text. The otherpropertiesdescribe the item it came from: title, author, publisher, type, tags, URLs, and section (h2_*,h3_*) details.propertiesalso carries AI-generated enrichment for the item:summaries(the same item summarized in several styles),biblical_analysis(Bible references, characters, concepts), andgeneral_analysis(keywords, topics, personas, reading time, and more). Fields can be empty ornullwhen the item has no value for them.
Full example response
Full example response
JSON
Key options
How many records can I retrieve?
We recommend 10 to 100 results; request time rises non-linearly with larger result sets. Set the number with thelimit field.
Snippets and RAG
Use Search to see how your content shows up through Gloo AI and to bring it into your own applications. The API returns snippets: the same pieces Gloo AI’s chat tools draw on. A snippet is a section of a content item (a podcast episode, article or book) large enough to carry a meaningful piece of information on its own. Each snippet is one searchable unit of your content. Sometimes an AI application needs to give the model extra context. With Retrieval Augmented Generation, you add search results to the message you send the model, so its answer draws on your content and fits your users’ questions. See the Search API reference for every request field. The response fields vary by collection.Next steps
To turn search results into answers people can check, see Building Trustworthy Grounded Applications. Search quality starts at upload: see Preparing Content for Ingestion.Step-by-step tutorial
Build custom search with code in six languages.
Search Playground
Try queries in Studio before writing code.
Grounded Responses
Have the model answer from what Search finds.
API Reference
Request and response details.

