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

# Get Query Run

> Retrieve the status and metadata of a specific query run.

Returns the status and metadata of a single query run.

## Parameters

**id** `number` *required*

Unique identifier for the query run.

**Authorization** `string` *required*

Bearer token. Format: `Bearer slat_<your-token>`.

## Response

Returns `200 OK` with the query run details.

**id** `number` *required*

Query run ID.

**promptId** `number` *required*

Associated prompt ID.

**topicId** `number` *required*

Associated topic ID.

**platform** `string` *required*

AI platform used. One of: `CHATGPT`, `PERPLEXITY`, `GOOGLE_AI_OVERVIEW`, `GOOGLE_AI_MODE`, `GEMINI`, `CLAUDE`.

**status** `string`

Run status. One of: `IN_PROGRESS`, `RETRYING`, `SUCCESS`, `FAILED`, `TIMEOUT`. `null` if no status has been recorded yet.

**startedAt** `string` *required*

Run start time. ISO 8601 format.

**completedAt** `string`

Completion time. `null` if the run is still in progress.

**errorMessage** `string`

Error details if the run failed. `null` on success.

## Example

```bash cURL theme={null}
curl -s "https://api.slatehq.ai/ai-analytics-service/api/public/v1/query-runs/2048" \
  -H "Authorization: Bearer slat_YOUR_TOKEN"
```

```python Python theme={null}
import requests

response = requests.get(
    "https://api.slatehq.ai/ai-analytics-service/api/public/v1/query-runs/2048",
    headers={
        "Authorization": "Bearer slat_YOUR_TOKEN",
    },
)
run = response.json()
print(run["status"], run["platform"])
```

```javascript JavaScript theme={null}
const response = await fetch(
  "https://api.slatehq.ai/ai-analytics-service/api/public/v1/query-runs/2048",
  {
    headers: {
      "Authorization": "Bearer slat_YOUR_TOKEN",
    },
  }
);
const run = await response.json();
console.log(run.status, run.platform);
```

### Response

```json theme={null}
{
  "id": 2048,
  "promptId": 156,
  "topicId": 42,
  "platform": "CHATGPT",
  "status": "SUCCESS",
  "startedAt": "2026-02-11T14:30:00Z",
  "completedAt": "2026-02-11T14:31:15Z",
  "errorMessage": null
}
```

## Status codes

| Status | Description |
| - | - |
| `200` | Query run found. |
| `400` | The run ID is invalid (`invalid run id`). |
| `401` | Missing or invalid Bearer token. See [Authentication](https://slatehq.com/docs/api-reference/authentication.md). |
| `403` | A `workspaceId` query parameter doesn't match the token's workspace. |
| `404` | Query run not found. The ID does not exist or does not belong to this workspace. |
| `500` | Internal server error. |

## What's next

* [Get Run Details](https://slatehq.com/docs/api-reference/aeo-tracker/query-runs/get-run-details.md) — View the full AI response and metrics.
* [List Query Runs](https://slatehq.com/docs/api-reference/aeo-tracker/query-runs/list-query-runs.md) — Browse all query runs.


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