Get started
Jump to Get API keyGet API key
Your API key lets you send requests through the Semrush API.
To get your key:
- Click the icon at the top right of the Semrush interface to access your account.
- Select Subscription info and go to the API Units tab.
- Copy your API key.
Before making your first request, check your API unit balance to ensure it’s sufficient for your use case.
Jump to Construct your API callConstruct your API call
Jump to Review request exampleReview request example
All API methods include request examples, providing a great starting point for your requests.
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=usJump to Construct your API callConstruct your API call
- Start with the base URL. For example, in the Domain Overview request, it’s
https://api.semrush.com/. - Add
?to add request parameters. - Enter the API key parameter:
key=API_KEY. ReplaceAPI_KEYwith your API key. - Use
&to separate parameters. You’ll need to add&after each parameter. - Enter the required parameters:
- Specify the report type:
type=domain_ranks - Provide the domain name:
domain=apple.com
- Specify the report type:
- Include any additional request parameters as needed. For example:
- Specify the database:
database=us - List the columns you want to retrieve:
export_columns=Db,Dn,Rk,Or,Ot,Oc,Ad,At,Ac,Sh,Sv
- Specify the database:
- Put together the full request URL.
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.
Jump to Use display_limit to save API unitsUse display_limit to save API units
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.
Jump to Encode special charactersEncode special characters
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:
Jump to Test your API callTest your API call
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.
- Verify authentication: Ensure the request includes the correct API credentials.
- Request only relevant data: Optimize performance by using filters and query parameters.
- Review API response: Confirm that the structure and content match your expectations.
Jump to Retrieve and process dataRetrieve and process 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.
Jump to Step 1. Fetch data from the APIStep 1. Fetch data from the API
Ensure the script handles authentication, respects rate limits, and fetches only relevant data.
Jump to Step 2. Handle errorsStep 2. Handle errors
Implement error handling with logging and retry mechanisms for failed or incomplete requests. For a list of possible API errors, refer to the Analytics API errors and Projects API errors.
Jump to Step 3. Process the responseStep 3. Process the response
Convert or parse the response into your chosen format. To learn more, refer to API response formats.
Jump to Step 4. Store or transfer the dataStep 4. Store or transfer the data
You can store Semrush API output locally or transfer it to external systems:
- Cloud storage such as Amazon S3 and Google Cloud Storage
- Databases and data warehouses such as BigQuery and Snowflake
- SFTP servers
Jump to Step 5. Integrate with BI and CRM toolsStep 5. Integrate with BI and CRM tools
You can load processed Semrush data into business intelligence platforms for visualization and real-time insight:
- Dashboard tools such as Power BI, Tableau, and Looker Studio
- CRM platforms such as Salesforce
You can use third-party connectors such as Supermetrics, Workato, or Zapier to simplify integration with these tools without heavy development.
Jump to Step 6. Automate recurring data updatesStep 6. Automate recurring data updates
To keep your data up-to-date, you can use:
- OS-level schedulers like Task Scheduler (Windows) or cron (Linux/macOS) to run scripts at predefined intervals.
- Third-party automation tools to regularly trigger API calls.
Last updated: February 5, 2026