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

# Ahrefs SERP Snapshot API

> Returns a stored snapshot of Google's top organic search results for a keyword, with page-level authority and traffic metrics.

`POST /v1/data/ahrefs/serp-overview/run`

**Pricing:** $0.03 per ranked result ($26.00 per 1,000).

## Request

Send the inputs under `params`. Only the keys below are accepted; any other key returns `422 invalid_params`.

**keyword** `string[]` *required*

Search keywords to look up in the stored SERP snapshot.

**country** `string` (default: us)

Country whose Google results to read, e.g. United States. Defaults to United States.

249 allowed values, for example `af` (Afghanistan), `al` (Albania), `dz` (Algeria), `as` (American Samoa), `ad` (Andorra), `ao` (Angola), `ai` (Anguilla), `aq` (Antarctica), `ag` (Antigua and Barbuda), `ar` (Argentina). Fetch the full list with `GET /v1/data/ahrefs/serp-overview?expand=options`.

**date** `date`

A historic date to retrieve an older SERP snapshot instead of the latest one.

**maxResults** `integer` (default: 10)

How many ranked results to return in total. Defaults to 10; use 0 for all.

Max `100`.

## Example

```bash cURL theme={null}
curl -X POST "https://api.mindcase.co/v1/data/ahrefs/serp-overview/run?wait=true" \
  -H "Authorization: Bearer $MINDCASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "params": {
    "keyword": [
      "project management software"
    ],
    "country": "us",
    "maxResults": 10
  }
}'
```

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

r = requests.post(
    "https://api.mindcase.co/v1/data/ahrefs/serp-overview/run",
    params={"wait": "true"},
    headers={"Authorization": f"Bearer {os.environ['MINDCASE_API_KEY']}"},
    json={"params": {
    "keyword": [
        "project management software"
    ],
    "country": "us",
    "maxResults": 10
}},
)
job = r.json()
rows = job.get("data", [])  # if job["status"] == "running", poll /v1/jobs/{job_id}/results
```

```javascript Node.js theme={null}
const r = await fetch("https://api.mindcase.co/v1/data/ahrefs/serp-overview/run?wait=true", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MINDCASE_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ params: {
  "keyword": [
    "project management software"
  ],
  "country": "us",
  "maxResults": 10
} }),
});
const job = await r.json();
const rows = job.data ?? []; // if job.status === "running", poll /v1/jobs/{job_id}/results
```

## Response fields

Each row in `data` is one ranked result, keyed by these fields.

| Field | Name | Type |
| - | - | - |
| `keyword` | Keyword | text |
| `country` | Country | text |
| `position` | Position | number |
| `url` | URL | url |
| `domain` | Domain | text |
| `title` | Title | text |
| `urlRating` | URL Rating | number |
| `backlinks` | Backlinks | integer |
| `referringDomains` | Referring Domains | integer |
| `organicTraffic` | Organic Traffic | integer |

## Example response

Abridged: long text and lists are shortened.

```json theme={null}
{
  "job_id": "7f3a1c2e-0b9d-4c55-9a51-3f2e8d1b6a40",
  "agent": "ahrefs/serp-overview",
  "status": "completed",
  "row_count": 1,
  "truncated": false,
  "data": [
    {
      "backlinks": 1182,
      "urlRating": 11,
      "country": "us",
      "referringDomains": 444,
      "domain": "www.wrike.com",
      "organicTraffic": 88162,
      "position": 2,
      "url": "https://www.wrike.com/project-management-guide/faq/what-are-project-management-tools/",
      "keyword": "project management software",
      "title": "Best project management tools and software: My 21 top ..."
    }
  ]
}
```

## Related APIs

For the live Google results page use [`google/search`](https://docs.mindcase.co/apis/google/search); for links pointing at a domain use [`web/backlinks`](https://docs.mindcase.co/apis/web/backlinks).


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