# Scan an AI Search index

Launch stage: Public Preview

`POST /api/2.0/ai-search/{name=workspaces/*/endpoints/*/indexes/*}:scan`

Scan (paginate over) the rows of an AI Search index.

API scopes: ai-search

## Path parameters

- `name` (string, required)
  Full resource name of the index to scan.
   Format: `workspaces/{workspace_id}/endpoints/{endpoint_id}/indexes/{index_id}`

## Request body

- `page_size` (int32, optional)
  Maximum number of rows to return in this page.
- `page_token` (string, optional)
  Page token from a previous response; if unset, scanning starts from the beginning.

## Returns

- `data` (array of object, optional, Output only)
  The rows in this page, each a struct of column name to value.
- `next_page_token` (string, optional, Output only)
  Token for the next page; empty when the scan is exhausted.

## Response

```json
{
  "data": [
    {}
  ],
  "next_page_token": "string"
}
```

