# List runs

> List a brand's tracking runs, newest first, with each completed run's stored visibility, position and answer counts.

Source: https://ranqo.ai/docs/api/reference/list-runs

```http
GET https://api.ranqo.ai/v1/brands/{brand_id}/runs
```

The brand's tracking runs, newest first.

## Path parameters

| Name | Type | Description |
| --- | --- | --- |
| `brand_id` | string | The brand id, from `GET /v1/brands`. |

## Query parameters

Every parameter is optional. A parameter the endpoint does not take is refused with `unknown_parameter`.

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `limit` | integer | `50` | Items per page, 1 to 100. |
| `cursor` | string |  | The `next_cursor` of the previous page. |
| `status` | string |  | Only runs in this state. One of `pending`, `running`, `completed`, `failed`. |

## Response

The response body, as JSON.

| Field | Type | Description |
| --- | --- | --- |
| `data` | array of objects |  |
| `data[].id` | string |  |
| `data[].status` | string | One of `pending`, `running`, `completed`, `failed`. |
| `data[].platforms` | array of strings | The engines the run asked. |
| `data[].created_at` | string | RFC 3339 timestamp in UTC. |
| `data[].started_at` | string or null | RFC 3339 timestamp in UTC. |
| `data[].completed_at` | string or null | RFC 3339 timestamp in UTC. |
| `data[].prompt_count` | integer or null | Prompts the run asked; null until it completes. |
| `data[].answer_count` | integer or null | Answers the run's scores count: the successful ones and the filled-in ones. Null until it completes. |
| `data[].failed_count` | integer or null | Questions that failed, filled-in ones included. Null until it completes. |
| `data[].filled_count` | integer or null | Failed questions filled in from the same prompt's previous answer; 0 on runs from before filling-in existed. Null until it completes. |
| `data[].visibility` | number or null | The run's own visibility, 0-100, fixed when it completed: it counts filled-in answers, and the answers of prompts deleted since. The reports leave both out, so they can differ. Null until it completes. |
| `data[].average_position` | number or null | The run's stored average position when named; null until it completes, and when the brand was never named. |
| `has_more` | boolean | Whether another page follows. |
| `next_cursor` | string or null | Pass as `cursor` for the next page; null on the last page. |

## Response headers

| Header | Description |
| --- | --- |
| `X-Request-Id` | The request id; quote it to support. |
| `RateLimit` | Requests left in this window and seconds until it resets. |
| `RateLimit-Policy` | The key's limit per window. |

## Example request

```bash title="curl"
curl "https://api.ranqo.ai/v1/brands/BRAND_ID/runs" \
  -H "Authorization: Bearer $RANQO_API_KEY"
```

## Errors

Errors are problem details (`application/problem+json`) with a stable `code`. See [Errors](https://ranqo.ai/docs/api/errors) for each one.

| Status | Codes |
| --- | --- |
| 400 | [`invalid_parameter`](https://ranqo.ai/docs/api/errors#invalid_parameter), [`unknown_parameter`](https://ranqo.ai/docs/api/errors#unknown_parameter), [`invalid_cursor`](https://ranqo.ai/docs/api/errors#invalid_cursor), [`api_key_in_url`](https://ranqo.ai/docs/api/errors#api_key_in_url) |
| 401 | [`missing_api_key`](https://ranqo.ai/docs/api/errors#missing_api_key), [`invalid_api_key`](https://ranqo.ai/docs/api/errors#invalid_api_key), [`api_key_revoked`](https://ranqo.ai/docs/api/errors#api_key_revoked), [`api_key_expired`](https://ranqo.ai/docs/api/errors#api_key_expired), [`api_key_orphaned`](https://ranqo.ai/docs/api/errors#api_key_orphaned) |
| 403 | [`plan_upgrade_required`](https://ranqo.ai/docs/api/errors#plan_upgrade_required), [`subscription_inactive`](https://ranqo.ai/docs/api/errors#subscription_inactive) |
| 404 | [`not_found`](https://ranqo.ai/docs/api/errors#not_found) |
| 429 | [`rate_limited`](https://ranqo.ai/docs/api/errors#rate_limited) |
| 500 | [`internal_error`](https://ranqo.ai/docs/api/errors#internal_error) |
| 503 | [`service_unavailable`](https://ranqo.ai/docs/api/errors#service_unavailable) |
