Video Tutorials Custom report Buzz Partners Our Clients Glossary FireFox SEMRush addon Informer
SeoQuake - SEO plugin for FireFox N1 SEMRush - SEO and AdWords campaign tool WhoRush - Identify sites from one owner
English Русский Deutsch Français Español Italiano Português
SEMRush API (version 3.0)
Want to use API?
We have a special subscription type, designed for those, who want to use SEMrush API a lot.
Subscribe for $15
Limitations for API and web-interface are the same. Please note that all API data is UTF-8 encoded.
  1. The request format
  2. Request samples
  3. Error Messages
  4. API and export
  5. Columns order
  6. Integration scripts examples
  7. Terms of use
  1. The request format
    The GET request for data should be sent in the following format:
    http://%DB%.api.semrush.com/?action=report&type=%REPORT_TYPE%&%REQUEST_TYPE%=%REQUEST%&key=%API_KEY%&display_limit=%LIMIT%&display_offset=%OFFSET%&export=api&export_columns=%EXPORT_COLUMNS%&export_escape=%EXPORT_ESCAPE%
    Where:
    • %DB% - requested database. Valid values: "us" - for Google.com, "uk" - for Google.co.uk, "ca" - for Google.ca, "ru" - for Google.ru, "de" for Google.de, "fr" for Google.fr, "es" for Google.es, "it" for Google.it, "br" for Google.com.br, "au" for Google.com.au & "us.bing" for Bing.com
    • %REPORT_TYPE% - type of the report. Valid values: "domain_rank", "domain_organic", "domain_adwords", "domain_organic_organic", "domain_adwords_adwords", "domain_organic_adwords", "domain_adwords_organic", "phrase_this", "phrase_related" or "url_organic" (see examples below)
      Note: Important! "Full Search" type of report is unavailable through API
    • %API_KEY% - user identification key - available through your profile on the site.
    • %REQUEST_TYPE% - type of request. Valid values: "domain", "phrase" or "url" (see examples below)
    • %REQUEST% - your request
    • %LIMIT% - number of results returned
    • %OFFSET% - instructs to skip a specified number of results before beginning to return results to you
    • %EXPORT_ESCAPE% - if set to "1" columns values will be wrapped in double quotes
    • %EXPORT_COLUMNS% - list of column names, separated by a coma. You may list the specific column names you need, in any order you'd like. List of default column names by request types (expand for detailed explanation):
      • Main report - Dn, Rk, Or, Ot, Oc, Ad, At, Ac
      • Organic Keywords report - Ph, Po, Pp, Nq, Cp, Ur, Tr, Tc, Co, Nr, Td
      • AdWords keywords report - Ph, Po, Pp, Nq, Cp, Vu, Tr, Tc, Co, Nr, Td
      • Competitors in organic search report - Dn, Np, Or, Ot, Oc, Ad
      • Competitors in AdWords search report - Dn, Np, Ad, At, Ac, Or
      • Potential ad/traffic buyers report - Dn, Np, Ad, At, Ac, Or
      • Potential ad/traffic sellers report - Dn, Np, Or, Ot, Oc, Ad
      • Main keyword report - Ph, Nq, Cp, Co, Nr
      • Related keyword report - Ph, Nq, Cp, Co, Nr, Td
      • Organic URL report - Ph, Po, Nq, Cp, Co, Tr, Tc, Nr, Td
      • AdWords URL report - Ph, Po, Nq, Cp, Co, Tr, Tc, Nr, Td
  2. Request samples
  3. Error Messages
    • ERROR 30 :: LIMIT EXCEEDED
    • ERROR 50 :: NOTHING FOUND
    • ERROR 70 :: API KEY HASH FAILURE
    • ERROR 40 :: MANDATORY PARAMETER "action" NOT SET OR EMPTY
    • ERROR 41 :: MANDATORY PARAMETER "type" NOT SET OR EMPTY
    • ERROR 42 :: MANDATORY PARAMETER "domain" NOT SET OR EMPTY
    • ERROR 43 :: MANDATORY PARAMETER "phrase" NOT SET OR EMPTY
    • ERROR 44 :: MANDATORY PARAMETER "url" NOT SET OR EMPTY
    • ERROR 45 :: MANDATORY PARAMETER "vs_domain" NOT SET OR EMPTY
    • ERROR 120 :: WRONG KEY - ID PAIR
    • ERROR 121 :: WRONG FORMAT OR EMPTY HASH
    • ERROR 122 :: WRONG FORMAT OR EMPTY KEY
    • ERROR 130 :: API DISABLED
    • ERROR 131 :: LIMIT EXCEEDED
    • ERROR 132 :: API UNITS BALANCE IS ZERO
    • ERROR 133 :: DB ACCESS DENIED
    • ERROR 134 :: TOTAL LIMIT EXCEEDED
    • ERROR 135 :: API REPORT TYPE DISABLED
  4. API and export
    API format is similar to CSV semicolon export
  5. Columns order
    • Column names never change
    • Order of columns may be changed
    • Number of columns may be increased
    • Old columns may be removed only after notification
  6. Integration scripts examples

    Below are three simple scripts showing you how you can integrate SEMrush API data into your web project. Examples are written in PERL, PHP and JavaScript (using YQL). All you have to do is:download the script you find suits you best, unzip it, set some parameters (explained in comments, in a script body) and upload it to your web server.

    Attention!!! Use JavaScript example with caution as your API key in that script gets disclosed and can be viewed by anyone!!!

    • PERL SEMRush API integration example script - perl_example.zip
    • PHP SEMRush API integration example script - php_example.zip
    • JavaScript SEMRush API integration example script - js_example.zip - Using this method your API key will be disclosed and can be viewed by anyone!!!
  7. Terms of use

    If you integrate SEMrush API in your own web service you should send X-Real-IP header with your requests! (In case a partner's user overloads the server, we'd like to have an opportunity to disconnect the specific user without blocking the partner's access to SEMRush's API. For this reason, it is necessary for us to know the IP of the end-consumer.)

    Publication of data provided by the service is only possible with reference to the data source or proper branding on the site. Any other type of publication is strictly prohibited.

    The use of information provided by this service for commercial and other third-party services in the form in which it was obtained directly from the service without the express written consent of SEMRush.com is strictly prohibited.

    You may not perform more than 10 requests per second, nor more than 2 simultaneous requests.