Database
us
ru
de
fr
 Domain     Keyword     URL   
E-mail
Password
remember Register »
SEMRush API
Limitations for API and web-interface are the same. Please, take note, that all API data are UTF-8 encoded.
  1. The request's format
    The GET request for data should be sent with in the following format:
    http://www.semrush.com/search.php?q=%request%&key=%API_KEY%&limit=%limit%&offset=%offset%&db=%db%&uip=%END_USER_IP%
    Where:
    • %API_KEY% - user identification key, you can find it in your profile on the site.
    • %request% - your request
    • %limit% - number of results returned
    • %offset% - says to skip that many results before beginning to return results to you
    • %db% - the language of the requested database. Valid values: "ru" - for Google.ru, "us" - for Google.com, "de" for Google.de, "fr" for Google.fr.
    • %END_USER_IP% - In case if one of users of a partner overloads the server, we'd like to have an opportunity to disconnect the exact user without blocking the partner's access to SEMRush's API. For this purposes it is necessary for us to know the IP of the end-consumer.
  2. Request samples
  3. Error Messages
    • ERROR 10 :: API ACCESS DISABLED
    • ERROR 20 :: BAD API KEY
    • ERROR 30 :: BAD QUERY
    • ERROR 40 :: BAD QUERY
    • ERROR 50 :: NOTHING FOUND
  4. API format is similar to CSV 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. Intergation scripts examples

    Below are three simple scripts showing you how you can intergate SEMRush API data into your web project. Examples are written in PERL, PHP and JavaScript (using YQL). All you have to do is download a script, which suits you most, unzip it, set some parameters (explaned in detail 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 intergation example script - perl_example.zip
    • PHP SEMRush API intergation example script - php_example.zip
    • JavaScript SEMRush API intergation example script - js_example.zip - Using this method your API key will be disclosed and can be viewed by anyone!!!
  7. Terms of use

    Publication of data provided by the service is only possible with reference to the data source, another type of publication is prohibited.

    Prohibited is the use of information provided by a service for posting it on 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.