---
title: "Get Domain Keyword Rankings"
method: GET
path: "/v2/historic/getHistoricRankingsForDomainOnKeywords"
tags: ["Ranking History API"]
---

# Get Domain Keyword Rankings

`GET /v2/historic/getHistoricRankingsForDomainOnKeywords`

## Request

- Base URL: `https://api.spyfu.com/apis/organic_history_api`
- URL: `https://api.spyfu.com/apis/organic_history_api/v2/historic/getHistoricRankingsForDomainOnKeywords`
- Auth: one of:
  - HTTP basic
  - API key in query parameter `api_key`
  - API key in header `Authentication`

Returns historical organic ranking data for a specific domain across multiple specified keywords within a date range. Analyze how a domain's positions have changed over time for your target keyword list.

[Visualize this API live on SpyFu](https://www.spyfu.com/seo/ranking-history/domain?expandChart=false&searchType=MostValuable&includeAnyTerm=true&query=example.com&sidebarContext=topics) _(TODO – verify)_

## Query parameters

- `domain` string, required
- `keywords` string, required
- `startDate` string, date-time
- `endDate` string, date-time
- `countryCode` 'AR' | 'AT' | 'AU' | 'BE' | 'BR' | 'CA' | 'CH' | 'DE' | 'DK' | 'ES' | 'FR' | 'IE' | 'IN' | 'IT' | 'JP' | 'MX' | 'NL' | 'NO' | 'NZ' | 'PL' | 'PT' | 'SE' | 'SG' | 'TR' | 'UA' | 'UK' | 'US' | 'ZA'

## Response `200`

Successfully retrieved domain ranking history for specified keywords

- object
  - `resultCount` integer: Number of results returned
  - `results` object[], nullable
    - `domain` string, nullable
    - `keyword` string, nullable
    - `results` object, nullable

## Other responses

- `400`: Invalid request parameters, domain, or keyword list
- `401`: User failed authorization
- `500`: Server error while processing ranking history data

---

[API](https://skmtc.dev/spyfu/apis/ranking-history-api.md) - [All operations](https://skmtc.dev/spyfu/apis/ranking-history-api/llms.txt) - [OpenAPI document](https://skmtc.dev/spyfu/apis/ranking-history-api/revisions/8c80535873e7?raw)
