Telephone
United States
+1 (800) 815 - 9959
12:00 PM - 5:00 PM (EST/EDT)
Monday - Friday
Need help?
Telephone
United States
United States
Canada
United Kingdom
Spain
France
Italy
Germany
Australia
+1 (800) 815 - 9959
12:00 PM - 5:00 PM (EST/EDT)
Monday - Friday
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. If you run out of API units, you can buy more on the Subscription info page or contact our sales representatives. To learn more, refer to How to get API.
Make sure your API unit balance is sufficient before making requests. You can check your remaining units in two ways:
This request returns the number of remaining API units to help you manage usage.
Name | Value/Type | Description |
---|---|---|
key* | YOUR_API_KEY | Identification key assigned to each user after subscribing to Semrush. You'll find it in Subscription info > API units. |
* Fields marked by an asterisk (*) are required
Endpoint (GET)
Request example
http://www.semrush.com/users/countapiunits.html?key=YOUR_API_KEY
Response example
1,000
This request returns your monthly, daily, and hourly API unit usage. This helps you monitor and optimize your API consumption.
Name | Value/Type | Description |
---|---|---|
key* | API_KEY | Identification key assigned to each user after subscribing to Semrush. You'll find it in Subscription info > API units. |
* Fields marked by an asterisk (*) are required
Endpoint (GET)
Request example
http://api.semrush.com/analytics/ta/limits/key/API_KEY
Each request to the Semrush API consumes a specific number of units, depending on the type of report and the amount of data requested.
To effectively manage API usage, it is crucial to understand how units are consumed and how to optimize requests.
Requests to the methods of Listing Management and Map Rank Tracker don't use up API units.
Different API reports have varying unit costs:
You can check how many units are consumed for each report or request in the API documentation under the respective report or request name.
The total request price is calculated based on the number of lines in the report or particular request.
Besides regular data, most analytical data also contains historical data which costs more than regular data requests. For details, refer to Historical data.
display_limit
parameter. Use it to limit the number of lines returned in a response to save on API units. For example, adding &display_limit=10
will limit your request to the top 10 results.Suppose you need to analyze organic keyword rankings for a list of 50 domains using the Domain Organic Search Keywords report.
You need 500 keywords per domain with the following conditions:
It means that:
The total number of API units required is 1,500,000.
Depending on the report and API version, you'll get either an error or a partial number of lines.
If you don't have enough API units for the requested number of lines or requests:
ERROR 132
.403
error.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 the API unit balance so you don't lose data.
Response example (API v4)
{ "error": { "code": 403, "message": "????", "description": "????" } }
Semrush provides a dedicated report where you can review your recent API requests and track how your API units are used. To find this information in the Semrush UI, go to My Profile → Query log → API Queries.
API Queries only has logs for the Standard Semrush API v3. Logs for Trends API and Semrush API v4 aren't listed. If you need to review your Trends API request log, contact Semrush Customer Support.
The API Queries report shows a detailed log of your v3 API activity, including:
display_offset
, what the data offset was that the request started from (when applicable).This information helps you monitor API usage, troubleshoot unexpected unit consumption, and analyze request history.
You can export your v3 API request log in CSV directly from the API queries report. Use the Export button in the top-right corner of the table. You can choose to export:
If your API Queries log has more than 50,000 entries, request an export via Semrush Customer Support.
You can use the exported file for internal reports, sharing with your team, or analyzing in Excel or Google Sheets.