---
path: /v1/reference/audit-history
title: List audit history
summary: GET /api/public/audit/{id}/history — prior runs for the same site.
group: Reference
updated: 2026-06-22
---

# List audit history

`GET https://agentfit.dev/api/public/audit/{id}/history`

Return prior audit runs for the same site as run `id`, newest first, with cursor
pagination. Use it to chart how a documentation site's AI-readiness score changes over
time.

## Request

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `id` | path | string (UUID) | yes | Any `run_id` for the site whose history you want. |
| `limit` | query | integer | no | Page size, 1–100. Defaults to 20. |
| `cursor` | query | string | no | Opaque cursor from a previous response's `next_cursor`. |

### curl

```bash
curl -s 'https://agentfit.dev/api/public/audit/019eefa7-fdb7-77ac-8c56-ad184e44ece6/history?limit=5' \
  | jq '.runs[] | {started_at, total_score}'
```

### Python

```python
import requests

run_id = "019eefa7-fdb7-77ac-8c56-ad184e44ece6"
resp = requests.get(f"https://agentfit.dev/api/public/audit/{run_id}/history", params={"limit": 5}, timeout=10)
for run in resp.json()["runs"]:
    print(run["started_at"], run["total_score"])
```

### JavaScript

```javascript
const runId = "019eefa7-fdb7-77ac-8c56-ad184e44ece6";
const resp = await fetch(`https://agentfit.dev/api/public/audit/${runId}/history?limit=5`);
const { runs } = await resp.json();
runs.forEach((r) => console.log(r.started_at, r.total_score));
```

## Response

`runs` are newest first; each carries the run `id`, `started_at` (RFC 3339), `total_score`,
and `status`. The top level also echoes the site's `base_url`/`base_url_norm`.

```json
{
  "runs": [
    { "id": "019eefa7-fdb7-77ac-8c56-ad184e44ece6", "started_at": "2026-06-22T10:02:11Z", "total_score": 71, "status": "done" },
    { "id": "019ee8c1-2a30-7b14-9f02-1c7785512abc", "started_at": "2026-05-30T08:14:00Z", "total_score": 68, "status": "done" }
  ],
  "next_cursor": "",
  "base_url": "https://docs.stripe.com",
  "base_url_norm": "docs.stripe.com"
}
```

`next_cursor` is a string; an **empty string** means there are no further pages. Pass a
non-empty `next_cursor` back as the `cursor` query parameter to fetch the next page.

## Errors

| Status | `code` | Meaning |
|---|---|---|
| 404 | `not_found` | No run exists for that `id`. |
| 400 | _(no code)_ | `cursor` is not a valid RFC 3339 timestamp. (`limit` is clamped silently, never an error.) |

> **Note:** history is only available through the durable `/api/public/audit/*` API. The
> **deprecated** legacy in-memory poll path has no history endpoint.
