> ## Documentation Index
> Fetch the complete documentation index at: https://docs.affonso.io/llms.txt
> Use this file to discover all available pages before exploring further.

# List search cursors

> See how far each search query of a Discovery Agent has been read

Returns one cursor per search query the agent built from its sources. `fetched_up_to_rank` shows how far down the search results the agent has read for that query. Read-only. Does not start a search. Results are ordered by `last_fetched_at`, newest first. Requires the `read:discovery` permission.

## Path Parameters

**id** `string` *required*

Agent ID.

## Query Parameters

**page** `integer` (default: 1)

Page number, starting at 1.

**limit** `integer` (default: 20)

Number of results per page, from 1 to 100.

**source\_type** `string`

Only return cursors built from this source type: `topic`, `competitor`, or `lookalike`.

## Response

**success** `boolean`

`true` when the request succeeds.

**data** `array`

Search cursors.

**Cursor fields**

**id** `string`

Cursor ID.

**agent\_id** `string`

Agent ID.

**source\_type** `string`

`topic`, `competitor`, or `lookalike`.

**source\_value** `string`

The source the query was built from.

**template\_id** `string`

ID of the query template used.

**query** `string`

The search query.

**location\_code** `integer`

Search location code.

**language\_code** `string`

Search language code.

**fetched\_up\_to\_rank** `integer`

Deepest result rank read so far.

**last\_fetched\_at** `string`

ISO 8601 timestamp of the last fetch.

**created\_at** `string`

ISO 8601 timestamp.

**updated\_at** `string`

ISO 8601 timestamp.

**pagination** `object`

Pagination details for the current page.

**Pagination fields**

**page** `integer`

Current page number.

**limit** `integer`

Results per page.

**total** `integer`

Total number of matching results.

**total\_pages** `integer`

Total number of pages.

**has\_next\_page** `boolean`

Whether a next page exists.

**has\_prev\_page** `boolean`

Whether a previous page exists.

## Errors

* **400** `VALIDATION_ERROR`: a query parameter is invalid. The message is `Invalid request` and `details` lists the invalid fields.
* **404** `NOT_FOUND`: no agent with this ID exists for your team, or the agent was deleted. An agent that belongs to another team also returns `404`. The message is `Discovery agent not found`.
* **403** `INSUFFICIENT_PERMISSIONS`: the API key does not have the `read:discovery` permission.

```bash cURL theme={null}
curl "https://api.affonso.io/v1/discovery/agents/cmn4agt0001xk92hf6d0abcd/search-cursors?source_type=topic" \
  -H "Authorization: Bearer sk_live_your_api_key"
```

```json Response theme={null}
{
  "success": true,
  "data": [
    {
      "id": "cmn4cur0001xk92hf6d0abcd",
      "agent_id": "cmn4agt0001xk92hf6d0abcd",
      "source_type": "topic",
      "source_value": "email marketing for small business",
      "template_id": "topic_v1",
      "query": "best email marketing tools for small business",
      "location_code": 2840,
      "language_code": "en",
      "fetched_up_to_rank": 20,
      "last_fetched_at": "2026-11-03T06:02:00.000Z",
      "created_at": "2026-11-02T09:05:00.000Z",
      "updated_at": "2026-11-03T06:02:00.000Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 1,
    "total_pages": 1,
    "has_next_page": false,
    "has_prev_page": false
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.