# GET /v2/agent/threads/{thread_id}

> Read a thread: the runs asked in it, oldest first.

GET `/v2/agent/threads/{thread_id}`

**Authentication:** your key as a [bearer token](https://darkcrawl.dev/docs/api-reference/authentication/).

## Path parameters

| Field       | Type     | Required | Default |
| ----------- | -------- | -------- | ------- |
| `thread_id` | `string` | Required |         |

## Query parameters

| Field         | Type                             | Required | Default   |
| ------------- | -------------------------------- | -------- | --------- |
| `includeData` | `string` Values: `true`, `false` | Optional | `"false"` |

## Request

**curl**

```bash
curl 'https://api.darkcrawl.dev/v2/agent/threads/THREAD_ID?includeData=true' \
  -H "Authorization: Bearer $DARKCRAWL_API_KEY"
```

**Python**

```python
import os
import requests

resp = requests.get(
    "https://api.darkcrawl.dev/v2/agent/threads/THREAD_ID?includeData=true",
    headers={"Authorization": "Bearer " + os.environ["DARKCRAWL_API_KEY"]},
    timeout=330,
)
print(resp.json())
```

**Node**

```javascript
const resp = await fetch("https://api.darkcrawl.dev/v2/agent/threads/THREAD_ID?includeData=true", {
  headers: {
    Authorization: "Bearer " + process.env.DARKCRAWL_API_KEY,
  },
  signal: AbortSignal.timeout(330000),
});
console.log(await resp.json());
```

## Response

Status `200`.

```json
{
  "success": true,
  "thread": {
    "id": "01K0EXAMPLETHREAD00000000A",
    "createdAt": "2026-11-26T10:00:00.000000+00:00",
    "updatedAt": "2026-11-26T10:03:00.000000+00:00",
    "status": "idle",
    "runs": [
      {
        "id": "01K0EXAMPLEJOB00000000000A",
        "turn": 1,
        "prompt": "Where did the mirror list move to?",
        "urls": [
          "http://exampleonionq7x2mfk4lzr5w3ty6hbnc2jdu7avs4ekp5gw3xmlq2zr.onion/notice"
        ],
        "status": "completed",
        "createdAt": "2026-11-26T10:00:00.000000+00:00",
        "finishedAt": "2026-11-26T10:01:00.000000+00:00",
        "creditsUsed": 0,
        "data": {
          "answer": "The mirror list moved to the forum thread on the second page [1]."
        }
      },
      {
        "id": "01K0EXAMPLEJOB00000000000B",
        "turn": 2,
        "prompt": "Who posted it?",
        "urls": [
          "http://exampleonionq7x2mfk4lzr5w3ty6hbnc2jdu7avs4ekp5gw3xmlq2zr.onion/notice"
        ],
        "status": "completed",
        "createdAt": "2026-11-26T10:02:00.000000+00:00",
        "finishedAt": "2026-11-26T10:03:00.000000+00:00",
        "creditsUsed": 0,
        "data": {
          "answer": "A user called Example posted it in the thread at http://exampleonionq7x2mfk4lzr5w3ty6hbnc2jdu7avs4ekp5gw3xmlq2zr.onion/forum/thread/1 [1]."
        }
      }
    ]
  }
}
```

## Errors

| Code                    | Status |
| ----------------------- | ------ |
| `BAD_REQUEST`           | 400    |
| `NOT_FOUND`             | 404    |
| `BLOCKLIST_UNAVAILABLE` | 503    |

What each code means, and what to do about it: [Errors](https://darkcrawl.dev/docs/api-reference/errors/).

## Notes

- The thread is `running` while a run is going and `idle` otherwise. Each run has its `turn`, `prompt`, `urls` and `status`.
- `includeData=true` adds each run's `data` (and `partial` for a failed one). The default is `false`.
- A thread id that is not valid is `400 BAD_REQUEST`. An unknown or expired job, and another company's job, answer `404 NOT_FOUND`.
