Public API Documentation

Our public API documentation is driven by Swagger and can be accessed here.

Prerequisites to use the public API

You need to have a valid Keyword Insights subscription in order to use the public API.

Before using the public API, you need to acquire a bearer token for authentication so that our servers can verify who you are and that you have permission to use the API.

How to use the interactive public API documentation?

In order to use swagger, you need to be authenticated. See instructions below to do a proper authentication and retrieving a "bearer token".

Once you are authenticated, you can "try out" all available endpoints by inputting the "bearer token" and all required arguments.

How to authenticate with the public API and retrieve a bearer token? (Email and password approach)

This approach is for users who have signed up with email and password instead of Google Sign Up. If you have signed up via "Create with Google" please find instructions in the next section: How to authenticate with the public API and retrieve a bearer token? (Google Sign In Approach)

  1. When you first open the API documentation, scroll to the bottom of the page and locate "Authentication".

Alternatively, you can click this link to get taken directly to the authentication section.

You should see a screen similar to this, on which you need to click the "Try it out" button.

  1. Next, the text field below becomes editable.

    1. Enter your valid email address and password, just like you would on the website app.keywordinsights.ai.

    2. Click the large blue "Execute" button below the text field.

If your email and password are correct, you should see a response with a code = 200 and a JSON response object called "result".

  1. From here, copy the value of the "access_token". In the example below, the copied value starts with "eyJ0...." and ends with "...Mokg". You will need this "token" for the next step.

  1. In a text-editor of your choice, paste the copied access token and write the word "Bearer" (with a capital B) in front of the access token, separated with a space. So your complete string should look like this:

Bearer eyJ0e..rest_of_the_token...4AnRMokg

This token is needed to make requests to any endpoint. Some endpoints require additional arguments like "order_id" which you will need to grab from the application. Typically, you can find these IDs in the URL of the respective endpoint.

  1. Validate your Bearer Token. Please go to the section Validate your Bearer Token to check if you have followed the steps above correctly.

How to authenticate with the public API and retrieve a bearer token? (Google Sign In Approach)

This approach is for users who have signed up via "Create with Google" instead of typing an email and password into the form during sign up.

If you have signed up "manually" with an email and password, please find instructions in the previous section: How to authenticate with the public API and retrieve a bearer token? (Email and password approach)

  1. In your browser of choice (we use Chrome in this example), open a new tab, and open the "Network" tab in the developer tools.

  2. In the URL bar, type app.keywordinsights.ai, press enter and before logging in, click the clear button in the Network traffic tab.

  3. Click "LOG IN WITH GOOGLE" and follow the prompts in the pop-up window as you normally would when signing in the application.

  4. Once you are logged in, back in the Network tab, scroll up/down until you find a successful request. (We are choosing the /user request, but any other request will also do) Select the request, make sure the "Headers" section on the right-hand panel is selected, and scroll down until you find the "Authorization" section. From here, grab the "Bearer Token". Make sure to copy the entire String, including the word "Bearer".

  5. Validate your bearer token. Please go to the section: Validate your Bearer Token to make sure you copied it correctly.

Validate your Bearer Token

To easily validate if your "Bearer Token" is valid, scroll up to the "User" endpoint and try it out.

  1. Click "Try it out" to make the text field editable.

  2. Copy and paste the bearer token from the step above into the text field

  3. Click the large, blue "Execute" button

  4. If the bearer token was created correctly, you should see a response with a 200 response code and your user object.

Congratulations, you have successfully authenticated with our public API. All endpoints that are documented in the documentation can now be tried out.

How much is the API and how does it calculated?

The API is available for Professional and Premium subscriptions. For clustering, We have a calculation endpoint here that will tell you how many credits are needed based on your settings. The API itself has no additional pricing.

Last updated