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 (Analytics and Projects APIs)
- .Trends API
This API is available as an add-on to a Business subscription. The standard API option 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 - note that the amount of units purchased becomes a part of your recurring subscription. If a certain amount of units is included in your subscription, it will renew on the same day as your plan. Unused units will expire instead of being added to the renewed amount.
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. You can also manage your projects (create, update, or delete them, for example) with the help of the Projects API.
It is possible to get the subfolder, subdomain, and URL data via the API. Check the Subdomain, Subfolder, or URL 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.
.Trends API is available only to paid Semrush users and comes in 2 plans:
- .Trends Basic API: Offers access to broad traffic summaries that include website traffic metrics and user behavior data
- .Trends Premium API: Offers everything included in the .Trends Basic API, along with 16 additional data types that allow you to dig deeper into market dynamics, competitor strategies, and web traffic flows
.Trends Basic API
The .Trends Basic API provides estimates of a website's traffic and visitor behavior. These include monthly visits, unique visits, pages per visit, average visit duration, mobile vs. desktop traffic %, bounce rate, and a domain's category.
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.
.Trends Basic API calls work for root, subdomains, and subfolders except for Traffic Rank, Audience Insights, and Data Accuracy.
.Trends Premium Extended API
The .Trends Premium Extended API (full details in the API documentation) offers 16 distinct reports in addition to the Traffic Overview data from the .Trends Basic API:
- Daily Traffic: The volume of website visitors tracked on a daily basis.
- Weekly Traffic: The volume of website visitors tracked on a weekly basis.
- Purchase Conversion: The percentage of visitors who complete a desired action, such as making a purchase.
- Industry Categories: The various industry sectors from which website visitors originate.
- Traffic Sources: The website traffic broken down into direct, referral, organic search, paid search, organic social, paid social, email, and display advertising.
- Traffic Destinations: Where users are going after visiting the domain you are looking at.
- Subdomain Traffic: The subdomains of the website that are responsible for acquiring the most traffic.
- Subfolder Traffic: The subfolders of the website that are getting the most traffic.
- Geographic Distribution: The countries, regions, or subcontinents where a website gets most of its visitors.
- 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.
- Traffic Rank: 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.
- Age and Sex Distribution: The number and share of male and female users and their distribution by age.
- Household Size, Income, Education, and Occupation Distributions:
- Household Size 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 Preferences: 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 option for Business subscriptions.
If you are interested in our .Trends API you can access it via the ‘Subscription Info’ page.
Alternatively, please contact our Sales team via this form, and we will provide you with a quote that fits your needs.
To purchase the .Trends 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 to 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
- .Trends 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.