Uredi

Page through Azure AI Search list results (preview)

Note

Azure AI Search is available through the Azure portal, REST APIs, and Azure SDKs. It also underpins Foundry IQ, the managed knowledge layer that transforms enterprise content into reusable, permission-aware knowledge bases for agents in the Microsoft Foundry portal.

Important

These features and functionality are part of the 2026-08-01-preview REST API. The 2026-08-01-preview is licensed to you as part of your Azure subscription and is subject to the terms applicable to "Previews" in the Microsoft Product Terms, the Microsoft Products and Services Data Protection Addendum ("DPA"), and the Supplemental Terms of Use for Microsoft Azure Previews.

The 2026-08-01-preview supports connections to other Microsoft services and third-party services. Use of these services is subject to their respective terms and might result in data processing or storage outside of the Azure compliance boundary, as well as data flowing into the Azure compliance boundary.

It's your responsibility to manage whether your data will flow outside of your organization's compliance and geographic boundaries and any related implications, and that appropriate permissions, boundaries, and approvals are provisioned.

You're responsible for carefully reviewing and testing applications you build in the context of your specific use cases and making all appropriate decisions and customizations. This includes implementing your own responsible AI mitigations, such as metaprompts, content filters, or other safety systems, and ensuring your applications meet appropriate quality, reliability, security, and trustworthiness standards. For more information, see the Azure AI Search Transparency Note.

Starting with the 2026-08-01-preview REST API, use cursor pagination (preview) to enumerate supported service resources one page at a time. The service returns an opaque continuation URL when more results are available.

This article explains the cursor contract and demonstrates how to page through existing indexes.

Prerequisites

  • The latest Azure.Search.Documents preview package: dotnet add package Azure.Search.Documents --prerelease

  • For keyless authentication, the Azure.Identity package: dotnet add package Azure.Identity

    Note

    The client library must support the 2026-08-01-preview version of the Search Service REST API. Earlier versions don't expose the cursor parameters shown in this article.

  • The latest azure-search-documents preview package: pip install --pre azure-search-documents

  • For keyless authentication, the azure-identity package: pip install azure-identity

    Note

    The client library must support the 2026-08-01-preview version of the Search Service REST API. Earlier versions don't expose the cursor parameters shown in this article.

Choose a list operation

The 2026-08-01-preview cursor contract applies to the following list operations:

Operation Resource path
List Aliases /aliases
List Data Sources /datasources
List Indexers /indexers
List Indexes /indexes
List Index Statistics /indexstats
List Knowledge Bases /knowledgebases
List Knowledge Sources /knowledgesources
List Knowledge Source Files /knowledgesources('{knowledge-source-name}')/files
List Skillsets /skillsets
List Synonym Maps /synonymmaps

Request and follow pages

The following example lists indexes whose names start with hotels and requests up to 50 indexes per page. Iterating the AsyncPageable<SearchIndex> result automatically requests each subsequent page.

using System;
using Azure;
using Azure.Identity;
using Azure.Search.Documents;
using Azure.Search.Documents.Indexes;
using Azure.Search.Documents.Indexes.Models;
using Azure.Search.Documents.Models;

string endpoint = Environment.GetEnvironmentVariable(
    "AZURE_SEARCH_ENDPOINT")!;

var options = new SearchClientOptions(
    SearchClientOptions.ServiceVersion.V2026_08_01_Preview);
var client = new SearchIndexClient(
    new Uri(endpoint),
    new AzureCliCredential(),
    options);

AsyncPageable<SearchIndex> indexes = client.GetIndexesAsync(
    search: "hotels",
    pageSize: 50,
    searchType: ListingSearchType.Prefix);

await foreach (SearchIndex index in indexes)
{
    Console.WriteLine(index.Name);
}

Reference: SearchIndexClient.GetIndexesAsync

The following example lists indexes whose names start with hotels and requests up to 50 indexes per page. Iterating the ItemPaged result automatically requests each subsequent page.

import os

from azure.identity import AzureCliCredential
from azure.search.documents.indexes import SearchIndexClient

endpoint = os.getenv("AZURE_SEARCH_ENDPOINT")

with SearchIndexClient(
    endpoint,
    AzureCliCredential(),
    api_version="2026-08-01-preview",
) as client:
    indexes = client.list_indexes(
        select=["name"],
        search="hotels",
        page_size=50,
        search_type="prefix",
    )
    for index in indexes:
        print(index.name)

Reference: SearchIndexClient.list_indexes

Send an initial request to list indexes whose names start with hotels. The request returns up to 50 index names:

GET https://<search-service-name>.search.windows.net/indexes?api-version=2026-08-01-preview&search=hotels&searchType=prefix&pageSize=50&$select=name
Authorization: Bearer <access-token>
Accept: application/json

Reference: List Indexes

When more than 50 matching indexes exist, the response includes @odata.nextLink, which contains the complete continuation URL and an opaque token. The following response is abbreviated:

{
  "value": [
    {
      "name": "<index-name>"
    }
  ],
  "@odata.nextLink": "https://<search-service-name>.search.windows.net/indexes?api-version=2026-08-01-preview&searchType=prefix&%24select=name&%24skiptoken=<opaque-token>"
}

To request the next page, send a GET request to the complete @odata.nextLink value exactly as returned. Keep the same authentication header:

GET <complete-@odata.nextLink-value>
Authorization: Bearer <access-token>
Accept: application/json

Reference: List Indexes

The terminal response contains the final index names and omits @odata.nextLink, indicating that no more pages are available. Result order isn't part of the cursor contract:

{
  "value": [
    {
      "name": "<next-index-name>"
    }
  ]
}

Handle cursor behavior

  • Detect the final page: Continue paging only while the response contains @odata.nextLink. The terminal page omits this property, and responses don't include @odata.count.

  • Preserve continuation state: Use the complete @odata.nextLink exactly as returned. Don't construct, modify, decode, or reuse its $skiptoken. The token supports forward paging only.

  • Change request parameters: Start a new initial request to change the resource path, API version, search prefix, selected properties, or page size. Combining $skiptoken with search or pageSize returns HTTP 400.

  • Account for collection changes: Forward paging is stable only while the collection remains unchanged. Adding, updating, or deleting resources during enumeration can produce duplicate or omitted results.