Application Programming Interface (API) is a method of extracting raw Semrush data without having to manually log into the software. Semrush offers two main API options:
- Standard API Package (Analytics and Projects APIs)
- Traffic Analytics API
This API is available as an add-on to a Business subscription. The standard API package comes with Analytics and Projects APIs. Upgrading to the Business subscription will give you an opportunity to buy API units and generate an API key. Note that after upgrading to the Business plan the number of units will still be zero. You should buy a suitable amount of API units according to your needs. If a certain amount of units is included in your subscription plan right from the start, it will expire should the subscription be stopped.
Whenever you run out of units, you can buy more from the Subscription Info page or by contacting us.
Learn how to get an API here.
-
Analytics API allows you to pull data from Analytics reports including:
-
Projects API can pull data from Position Tracking and Site Audit campaigns created in Projects.
It is possible to get subfolder and subdomain data via the API. Check the Subdomain and Subfolder section in the API Documentation to see what reports you can pull data from.
Analytics and Projects API calls each have a cost in API units. The total amount of units that you will need to spend will depend on the type of request or the exact number of lines in the report.
You can check your API units balance either within the Subscription info tab or via a free API request (API units balance).
See the full list of Semrush reports that API can pull here. Your API key can be found on your Subscription Info page.
Traffic Analytics API is available only to paid Semrush users and comes in 2 plans:
- Basic: provides only traffic summary data
- Extended: provides traffic summary data + 16 distinct reports
Basic API
Traffic Overview data will be able to show you estimates of a website's visitor behavior. These include monthly visits, unique visits, pages per visit, average visit duration, mobile vs. desktop traffic %, and bounce rate.
In the same way, the Traffic Analytics Overview report can compare up to 5 domains at a time. You can pull this data for up to 200 domains in a single request using the Summary reports. This data gives you a quick look into the general level of interaction between a website and its visitors.
Traffic Analytics API calls work for root, subdomains, and subfolders except for Domain Rankings, Audience Insights, and Data Accuracy.
Extended API
The extended API (full details in the API documentation) offers 16 distinct reports in addition to the Traffic Overview from the Basic API:
- Traffic Sources: the website traffic is broken down into direct, referral, search, social, and paid traffic;
- Traffic Destinations: where users are going after visiting the domain you are looking at;
- Geographic Distribution: the countries, regions, or subcontinents where a website gets most of its visitors;
- Subdomains: the subdomains of the website that are responsible for acquiring the most traffic;
- Top Pages: the number of unique page views, unique visitors, entrances, and traffic sources for up to a site’s top 1000 pages based on traffic;
- Domain Rankings: top websites in the target location for the target period sorted by traffic;
- Audience Insights: additional visited domains, unique audience, shared audience %, and shared audience for the domains you entered;
- Data Accuracy: the estimated accuracy of the report based on the size of the domain and any filters you have applied (historical data, location, device).
- Subfolders: the subfolders of the website that are getting the most traffic;
- Age and sex distribution: the number and share of male and female users, and their distribution by age;
- Household distribution: a breakdown of the domain’s audience by the household size;
- Income distribution: the number and share of the users with low, middle, or high income;
- Education distribution: the number and share of the users that have postgraduate, university/college, school or have not completed education;
- Occupation distribution: a breakdown of the domain’s audience by employment status.
- Audience interests: the key interests of your target audience based on the categories of domains visited.
- Social media: the social media platforms visited most often by the market audience.
The monthly limit rate included by default is 10,000 requests. TA API units will be refreshed monthly on the payment day of your subscription. This API does not use any API units associated with the standard Semrush API Package for Business subscriptions.
If you are interested in our Traffic Analytics API you can access it via the ‘Subscription Info’ page.
Alternatively, please contact sales@semrush.com, and we will provide you with a quote that fits your needs.
To purchase the Traffic Analytics API you will need a paid Semrush account. You can purchase API access yourself or via our sales representatives, and then get your API key by email.
The API Documentation pages below will be key for working with the API as every call will be broken down and explained for you there. The proper formatting will be displayed as well so that you are able to correctly structure your API calls. These calls can be made by pasting your API call in a web browser.
Please use the following documentation links to find help on API:
- API Summary
- API Terms of Use
- Analytics API (Domain Analytics, Keyword Analytics, Backlinks, etc)
- Projects API (Position Tracking, Site Audit)
- API units balance
- Traffic Analytics API Documentation
Please note that in section 2.3 of our terms of service we ask that you not call more than 10 inquiries per second from our API:
If you subscribe to the Semrush API, in addition to the restrictions set forth above, you agree (i) not to forward more than 10 inquiries per 1 second from one unique IP address or more than 10 simultaneous inquiries from 1 User; and (ii) not to cache the information received from the Services for more than one (1) month without the express written consent of Semrush. You may not use the Services if you are legally prohibited from receiving or using the Services under the laws of the country in which you are resident or from which you access or use the Services.
Feel free to check out our blog post What in the World Is API, and How Do I Use It? to learn more about the basics of APIs and how they can be useful.