Skip to main content
Search finds the passages in your uploaded content that best match a question. It uses AI-based, near-text semantic search: it matches on meaning, not only on exact words. Search queries content that Gloo has ingested and indexed for you. If you manage your own vector store and retrieval, use the Embeddings API to create vectors. For example, say you’ve uploaded articles and podcasts about keeping a marriage strong, and one podcast episode covers the guest’s top five rules for a healthy marriage. A search for “secrets to a happy marriage” should still find that episode, even though the episode never says “secret” and the query never says “rule”. That gives your users focused, relevant access to your content, based on what they ask.

Making Requests

Prerequisites

First, find which publisher’s content you want to query.
  1. 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.
  2. Identify the Collection: A collection is where we keep customer content. Set the collection field to GlooProd, the only collection you need.
  3. Get an API key: Create one on the API Keys page and send it as a Bearer token.
You will only have access to your own publisher’s tenant through this endpoint. For multi-tenant collections such as GlooProd, a tenant must be specified; requests outside your tenant return a 403 “Forbidden” response.Tenant names are normalized. Spaces and whitespace are stripped from the publisher name to form the tenant identifier. For example, Example Publisher name becomes ExamplePublisherName. Passing the raw publisher name with spaces can cause a 400 "invalid tenant" error.To get the exact tenant string, call GET /ai/v1/data/tenant/names and use the value returned rather than constructing it yourself.

Send a request

With your tenant name, you can query the search endpoint. Endpoint: POST /ai/v1/data/search
For a step-by-step build, follow the Search tutorial.

Example Response

Each result in data is one snippet. This excerpt shows the fields you’ll use most:
JSON
  • metadata.certainty and metadata.distance show how closely the snippet matches the meaning of your query.
  • properties.snippet is the matching text. The other properties describe the item it came from: title, author, publisher, type, tags, URLs, and section (h2_*, h3_*) details.
  • properties also carries AI-generated enrichment for the item: summaries (the same item summarized in several styles), biblical_analysis (Bible references, characters, concepts), and general_analysis (keywords, topics, personas, reading time, and more). Fields can be empty or null when the item has no value for them.
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 the limit 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.