contacts

Telephone

United States

dropdown button

United States

Canada

United Kingdom

Spain

France

Italy

Germany

Australia

+1 (800) 815 - 9959

10:00 AM - 5:00 PM (EST/EDT)

Monday - Friday

mobile-menu

API unit balance

Basic docs divider Last updated: April 9, 2024

Intro

When you purchase an API unit package in addition to your Business subscription, you'll have a limited number of API units to make calls. To learn more, refer to How to get API.

Request price

API requests consume API units per request or line.

price
The total request price is calculated based on the number of lines in the report or particular request.

Check API unit balance

Price: free

To make sure you have enough API units to make calls, you can check your balance on the Subscription info page or make a free API request.

Whenever you run out of API units, you can buy more on the Subscription info page or contact our sales representatives.

Endpoint (GET)

Copy code

http://www.semrush.com/users/countapiunits.html

Request example

Copy code

http://www.semrush.com/users/countapiunits.html?key=YOUR_API_KEY

Response example

Copy code

1,000

What if I don't have enough API units

Depending on the report and API version, you'll get either an error or a partial number of lines.

Errors

If you don't have enough API units for the requested number of lines or requests:

  • In API version 3, you'll get ERROR 132.
  • In API version 4, you'll get the 403 error.

Partial number of lines

In API version 3, for reports that cost per line, you will get the number of lines for which you have enough API units.

Therefore, it's important to check API unit balance, so you don't lose data.

Response example (API v4)

Copy code

{
  "error": {
    "code": 403,
    "message": "????",
    "description": "????"
  }
}
Was this page helpful?