Get started

Jump to Get API keyGet API key

Your API key lets you send requests through the Semrush API.

To get your key:

  1. Click the icon at the top right of the Semrush interface to access your account.
  2. Select Subscription info and go to the API Units tab.
  3. 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.

Domain Overview request example
HTTP
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

Jump to Construct your API callConstruct your API call

  1. Start with the base URL. For example, in the Domain Overview request, it’s https://api.semrush.com/.
  2. Add ? to add request parameters.
  3. Enter the API key parameter: key=API_KEY. Replace API_KEY with your API key.
  4. Use & to separate parameters. You’ll need to add & after each parameter.
  5. Enter the required parameters:
    1. Specify the report type: type=domain_ranks
    2. Provide the domain name: domain=apple.com
  6. Include any additional request parameters as needed. For example:
    1. Specify the database: database=us
    2. List the columns you want to retrieve: export_columns=Db,Dn,Rk,Or,Ot,Oc,Ad,At,Ac,Sh,Sv
  7. 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:

Character
Encoded
#
%23
&
%26
*
%2A
+
%2B
-
%2D
:
%3A
|
%7C
%
%25
/
%2F

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.

  1. Verify authentication: Ensure the request includes the correct API credentials.
  2. Request only relevant data: Optimize performance by using filters and query parameters.
  3. 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

Was this page helpful?