---
metadata:
  - name: generator
    content: Diplodoc Platform v5.50.3
alternate:
  - https://yandex.com.tr/support2/wordstat/en/content/api-wordstat.md
  - https://yandex.com.tr/support2/wordstat/ru/content/api-wordstat.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com.tr/support2/wordstat/en/llms.txt

# Wordstat API

The API is used to receive Wordstat data in a format suitable for automatic processing. The current supported format is JSON. The API is accessed over HTTPS. URL for API requests: `https://api.wordstat.yandex.net`.

To access the API:

1. [Get](https://yandex.com.tr/support2/wordstat/en/content/api-wordstat.md#OAuth) an OAuth token.
2. [Register](https://yandex.com.tr/support2/wordstat/en/content/api-wordstat.md#ClientId) the `ClientId`.
3. Pass the token in each request in the Authorization HTTP header: `Authorization: Bearer <OAuth token>`.

## How to connect to the Wordstat API

### Step 1. Log in with Yandex ID

1. If you don't have a Yandex username, create a [Yandex ID account](https://passport.yandex.com/auth/reg/portal).
2. Log in with [Yandex ID](https://passport.yandex.com/auth).

### Step 2. Get an OAuth token. {#OAuth}

On the app page, [create an app](https://oauth.yandex.com/client/new/id) and obtain a token:

1. Under **Redirect URI**, select **Enter URL for debugging**.

   ![api-redirect-uri.png](../_assets/api-redirect-uri.png =450x)

2. Select access to at least one data type.

   ![api-access-to-data.png](../_assets/api-access-to-data.png =450x)

### Step 3. Register the ID {#ClientId}

On the page of the created app, find the `ClientId`.

![api-client-id.png](../_assets/api-client-id.png =450x)

### Step 4. Submit a request for API access {#access-request}

To connect to the API, contact the Yandex Direct support, providing your username and `ClientId`.

{% cut "Connection request form" %}

<iframe src="https://forms.yandex.ru/surveys/13755828.b610c0ba0b93dbfffd4a222902bc6f0c9db0b4d4?lang=en&iframe=1" frameborder="0" name="ya-form-13755828.b610c0ba0b93dbfffd4a222902bc6f0c9db0b4d4" width="650"></iframe>

{% endcut %}

## Usage limitations

API access is limited by a quota. There are two quota types:

- Total quota on the entire API. If you exceed it, you will receive the following HTTP response: `503 Service unavailable, try again later`.

- Personal quota linked to an OAuth token with limitations:

  - On the number of requests per second (avoid initiating too many requests at the same time not to overload the service).
  - On the number of requests per day.

  If you exceed it, you will receive the following HTTP response: `429 Quota limit exceeded, try again later.  Time to refill: N seconds`. The response will contain an estimated time when you can access the API again.
