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 units balance

Basics docs divider Last updated: September 16, 2021

Intro

When you add API to your subscription you will have a limited amount of API units that you can use to make calls.

Learn more about API versions & packages

Prices

When running an API request, each particular line or request will cost API unit. The total amount of units that you will need to spend per request will depend on the exact number of lines in the report or request.

price

Check API units balance

Price: free

Make sure that you have a sufficient number of api units:

  • within the Subscription info tab
  • or via API request (it’s free)

Endpoint

http://semrushpur.1clkaccess.in/users/countapiunits.html

Request example

http://semrushpur.1clkaccess.in/users/countapiunits.html?key=YOUR_API_KEY

Response example

1,000

What if I don't have enough API units

Depending on the report and API version there are 2 possible cases:

  • you will get an error
  • you will get a partial number of lines

Errors

In API version 3 for reports that cost per request, if you do not have enough API units you will get ERROR 132

In API version 4 if you do not have enough API units for the requested number of lines or request you will get 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 is important to check API Balance, so as not to lose data.

Response example (API v4)

{
  "error": {
    "code": 403,
    "message": "????",
    "description": "????"
  }
}