canonical: https://jentic.com/apis/azure.com/searchindexclient

# Microsoft Azure SearchIndexClient

Jentic publishes the only available OpenAPI specification for SearchIndexClient, keeping it validated and agent-ready. The Azure Cognitive Search data plane API queries and updates documents inside a search index, supporting full-text search, filtering, faceting, suggesters, autocomplete, and bulk indexing actions. Agents can run queries against an index, page through results, retrieve a single document by key, and push batches of upload, merge, or delete actions. This is the runtime API for any application that reads from or writes to a Cognitive Search index.

## For AI agents

Query Azure Cognitive Search indexes for full-text and faceted results, run autocomplete and suggester calls, and push document upload, merge, and delete batches.

## Scope

Does not create indexes, manage indexers, or provision the search service - use for querying and updating documents inside an existing index only.

## Capabilities

- Run a full-text or filter-based search across an index with paging and facets
- Retrieve a single document by its key from the index
- Push a batch of upload, merge, mergeOrUpload, or delete actions to the index
- Suggest matching values from a configured suggester for partial input
- Autocomplete the next term a user is typing against an index
- Count the total documents currently in an index

## Use cases

### Faceted Search Over a Product Catalogue

E-commerce teams use SearchIndexClient to power product search with category, brand, and price facets. The POST /docs/search.post.search endpoint accepts a query, filter expression, facets list, and select fields, returning ranked documents plus facet counts in a single call. Pagination is handled via $top and $skip parameters so the storefront can render result pages without extra round trips.

Example prompt: POST /docs/search.post.search with body {search: "running shoes", filter: "price lt 150", facets: ["brand,count:10", "category"], top: 20} and return both the value array and @search.facets

### Typeahead and Autocomplete Experiences

Search-driven UIs need to surface suggestions as the user types. SearchIndexClient exposes suggester-backed endpoints for both autocomplete (next-word completion) and suggest (matching documents). Each call accepts a partial input and a suggester name configured in the index. Results return inside a few hundred milliseconds for low-latency typeahead.

Example prompt: GET /docs/search.autocomplete?search=lapt&suggesterName=sg&autocompleteMode=oneTermWithContext and return the text values from the response

### Bulk Index Maintenance via Batch Actions

When data changes upstream, the indexer pushes batches of upload, merge, mergeOrUpload, and delete actions to keep the index in sync. POST /docs/search.index accepts up to 1,000 documents per call as long as the total payload stays under 16 MB. Per-document failures are reported individually so the caller can retry only the failed entries.

Example prompt: POST /docs/search.index with a value array containing 100 mergeOrUpload actions and inspect response.value for any document where status is false

### Agent-Driven Retrieval-Augmented Generation via Jentic

Through Jentic, a RAG agent can search for query azure cognitive search, load the search.post.search input schema, populate it from the user's natural language question, and execute the call with a managed search admin or query key. The retrieved documents feed straight into the agent's prompt context. The same flow handles autocomplete and suggester calls for chat-style search experiences.

Example prompt: Search Jentic for query azure cognitive search, load the search.post.search schema, execute it with a query and select=title,content, and return the top 5 documents to the LLM context window

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /docs/search.post.search | Run a full search query |
| GET | /docs | Run a search via query parameters |
| GET | /docs('{key}') | Get a document by key |
| POST | /docs/search.index | Batch upload, merge, or delete documents |
| GET | /docs/search.autocomplete | Autocomplete a partial query |
| POST | /docs/search.post.suggest | Suggest documents via a suggester |
| GET | /docs/$count | Count documents in the index |

## Key resources

- **Documents** — Documents inside an index; supports search, get-by-key, count, and batch index operations
- **Suggesters** — Configured suggester resources accessed through autocomplete and suggest endpoints

## Why Jentic

- **Setup:** Wiring SearchIndexClient by hand means selecting the right per-service host ({searchServiceName}.search.windows.net), sending the correct api-key header for admin versus query keys, and handling per-document batch error retries yourself. Through Jentic you install once, import SearchIndexClient from the API Directory, store the api-key once, and your agent calls it.
- **Permission scoping:** SearchIndexClient targets a document through the request body of the batch index operation and through query parameters on search calls, so scope your agent by the operations it needs, such as running a search or pushing a batch. Limit it to read operations like search, autocomplete, and count, and the upload, merge, and delete actions are not included unless you add them.
- **Credential handling:** Your Azure Cognitive Search api-key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'query an Azure Cognitive Search index' or 'autocomplete a partial search term', and Jentic returns the matching SearchIndexClient operation with its input schema for query, filter, facet, and batch action shapes.

## Related APIs

- **Azure SearchServiceClient** — Manages indexes, indexers, datasources, and skillsets that this API queries
- **Azure SearchManagementClient** — Provisions the search service itself at the ARM control plane
- **Algolia Search API** — Hosted search-as-a-service alternative with simpler setup

## FAQ

### Why is there no official OpenAPI spec for SearchIndexClient?

Microsoft Azure does not publish a unified OpenAPI specification for the Cognitive Search data plane. Jentic generates and maintains this spec so that AI agents and developers can call SearchIndexClient via structured tooling. It is validated against the live search.windows.net data plane and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does SearchIndexClient use?

It uses an API key in the api-key request header. Each search service has separate admin keys (for indexing) and query keys (for read-only search). Jentic stores these keys in its vault so the agent never holds the raw value.

### Can I run faceted search with this API?

Yes. POST /docs/search.post.search with a body that includes facets, filter, and search. The response returns matched documents plus the @search.facets object containing per-facet bucket counts. You can request multiple facets and limit the count per facet.

### How many documents can I push in a single batch?

POST /docs/search.index accepts up to 1,000 actions per call as long as the total payload stays under 16 MB. The response array reports per-document status so you can retry only the entries that failed without re-sending the whole batch.

### What are the rate limits for SearchIndexClient?

Throughput depends on the search service tier you provisioned. Free and Basic tiers have lower QPS ceilings than Standard tiers, and replicas multiply read throughput. Throttled requests return HTTP 503 with a Retry-After header.

### How do I run a search query through Jentic?

Search Jentic for query azure cognitive search, call client.load on the search.post.search operation to receive its input schema, then call client.execute with the search query, filter, and top values. Jentic injects the api-key header and returns the response value array.

### Can I limit what my agent is allowed to do with the Azure Cognitive Search API?

Yes. Jentic One is self-hosted, so your own rules decide which SearchIndexClient operations and which api-key the agent may use. You can restrict the agent to read-only calls such as running a search, autocomplete, suggest, and document count, while leaving out the batch index operation that performs upload, merge, and delete actions. Because scoping happens per operation, you grant the write batch action only when the agent genuinely needs to change documents in the index.
