> ## 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 Keyword Rank History

> Retrieve one keyword's daily ranks for your site, your target page and the best competitor.

Returns one row per day and market for a keyword: your site's best rank, your target page's rank, and the best competitor's rank. Use it to chart a keyword over time. This endpoint only reads data.

> [!NOTE]
>
> Every request needs an API token in the `Authorization` header. The token decides the workspace.

## Parameters

**Authorization** `string` *required*

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

**keywordId** `number` *required*

Keyword ID, from [List Keywords](https://slatehq.com/docs/api-reference/keyword-tracker/list-keywords.md).

**from** `string`

First day, in `YYYY-MM-DD` format. Default: 30 days before `to`.

**to** `string`

Last day, in `YYYY-MM-DD` format. Default: today (UTC).

**country** `string`

Only return markets in this country, for example `US`. Leave it out for every market.

## Response

Returns `200 OK` with this object:

**keywordId** `number` *required*

The keyword requested.

**from** `string` *required*

First day returned.

**to** `string` *required*

Last day returned.

**items** `object[]` *required*

One row per day and market, oldest first. Days without a check are missing.

**history row**

**date** `string` *required*

Day of the check, in `YYYY-MM-DD` format.

**trackingTargetId** `number` *required*

The market (country and device) the row is for.

**bestOwnedRank** `number`

Your site's best rank that day. `null` when your site didn't rank.

**targetPageRank** `number`

Rank of the page you assigned to the keyword. `null` when it didn't rank or none is assigned.

**bestCompetitorRank** `number`

Best rank of a tracked competitor that day. `null` when no competitor ranked.

**currentOwnedUrl** `string`

The page of yours that ranked best that day.

## Errors

| Status | Cause |
| - | - |
| `400` | `keywordId` isn't a number. |
| `401` | The token is missing, malformed, revoked, or expired. |

See [Errors](https://slatehq.com/docs/api-reference/errors.md) for the response format.

## Example

```bash cURL theme={null}
curl -s "https://api.slatehq.ai/keyword-tracker/api/public/v1/reports/keywords/1842/history?from=2026-10-15&to=2026-11-13" \
  -H "Authorization: Bearer slat_YOUR_TOKEN"
```

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

response = requests.get(
    "https://api.slatehq.ai/keyword-tracker/api/public/v1/reports/keywords/1842/history",
    headers={"Authorization": "Bearer slat_YOUR_TOKEN"},
    params={"from": "2026-10-15", "to": "2026-11-13"},
)
history = response.json()["items"]
```


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