Telephone
United States
+1 (800) 815 - 9959
10:00 AM - 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
10:00 AM - 5:00 PM (EST/EDT)
Monday - Friday
Your API key lets you send requests through the Semrush API.
To get your key:
Before making your first request, check your API unit balance to ensure it's sufficient for your use case.
All API methods include request examples, providing a great starting point for your requests.
Domain Overview request example
https://api.semrush.com/?key=API_KEY&type=domain_ranks&export_columns=Db,Dn,Rk,Or,Ot,Oc,Ad,At,Ac,Sh,Sv&domain=apple.com&database=us
https://api.semrush.com/
.?
to add request parameters.key=API_KEY
. Replace API_KEY
with your API key.&
to separate parameters. You'll need to add &
after each parameter.type=domain_ranks
domain=apple.com
database=us
export_columns=Db,Dn,Rk,Or,Ot,Oc,Ad,At,Ac,Sh,Sv
Note that the URL format may vary depending on the product and report. Refer to the .Trends API docs for the .Trends API request example.
Certain types of reports within Semrush API support the 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.
When making API requests, parameter values containing special characters must be converted to URL-encoded strings. To simplify the process, you can use a URL encoder.
The characters typically used in Semrush API calls (for example, as Filters) are:
Character | Encoded |
---|---|
# | %23 |
& | %26 |
* | %2A |
+ | %2B |
- | %2D |
: | %3A |
| | %7C |
% | %25 |
/ | %2F |
This step is optional. Be aware that test calls to the Semrush API will consume your API units.
Before integrating the Semrush API into your workflow, test your API request using Postman or cURL to ensure it returns the expected data.
To automate data retrieval from the Semrush API, create a script in your preferred programming language that handles API calls, data processing, storage, and integration with BI tools or other platforms.
Key steps: