API for getting different SEO data

Request cost:

$0.003

Google SERP, TOP 100 results (URL + Snippet)

  • API is accessible at the following address https://api2.seranking.com/structure/clientapi/positions/?method=METHOD_NAME
  • Access is available over HTTP protocol
  • All the incoming and outgoing data is in UTF-8 coding, any result of any method execution comes as a JSON-encoded string
  • All the methods accept both GET and POST parameters
  • All the parameters are required unless other is specified
  • While calling any method except login, it is necessarily to pass token parameter aquired at the authorization.
  • This API is for direct querying search engines without linking to your project

Authorization (method login)

Parameters:

Name Description
login Login
pass md5 for the password

Response sample:

{
    "name":"name1 name2",
    "token":"c3b7ce7ae4cce5a6312f4046b701da9d",
    "avatar": "http://online.seranking.com/tmp/avatar/upload-icon.png"
}

Call sample:

https://online.seranking.com/structure/clientapi/positions/?method=login&login=LOGIN&pass=HASH

Adding a query (addTask)

Parameters:

Name Description
query Search query
engine_id Unique identificator of the search engine (full list can be found in the method getEngines)
region_name Region name (optionally, for the Google Search engine only)
region_id Unique region identificator (required for Yandex search engines, full list can be found at the method getYandexRegions)

Response sample:

{"task_id" : 12345 }

Call sample:

https://api2.seranking.com/structure/clientapi/positions/?token=TOKEN&method=addTask&query=QUERY&engine_id=ID_SEARCH_ENGINE

Adding group queries (addTasks)

Parameters:

Name Description
query Array of queries
region_name Region name (optionally, for the Google Search engine only)
engine_id Unique identificator of the search engine (full list can be found in the method getEngines)
region_id unique region identificator (required for Yandex search engines, full list can be found at the method getYandexRegions)

Response sample:

{"task_ids":[4,5],"total_added":2}

Call sample:

https://api2.seranking.com/structure/clientapi/positions/?token=TOKEN&method=addTasks&queries[]=QUERY1&queries[]=QUERY2&engine_id=ID_SEARCH_ENGINE

Checking the query processing status (checkTaskStatus)

Parameters:

Name Description
task_id Unique query identificator

Response sample:

{"status" : 0 }

Call sample:

https://api2.seranking.com/structure/clientapi/positions/?token=TOKEN&method=checkTaskStatus&task_id=ID_QUERY

List of the allowed Search Engines (getEngines)

The method does not require parameters

Response sample:

{"engines":
    {
        "201":"Google Andorra",
        "202":"Google United Arab Emirates",
        ...
        "378":"Google Serbia",
        "339":"Google Russia"
    }
}

Call sample:

https://api2.seranking.com/structure/clientapi/positions/?token=TOKEN&method=getEngines

List of the allowed Yandex regions (getYandexRegions)

The method does not require parameters.

Response sample:

{
    "regions": {
        "213":"Moscow",
        "90":"San Francisco",
        "2":"Saint Petersburg",
        "10174":"Saint Petersburg and the Leningradskaya oblast",
        ...
    }
}

Call request:

https://api2.seranking.com/structure/clientapi/positions/?token=TOKEN&method=getYandexRegions

Aquiring results for the previously added task (getTaskResults)

Method returns error if task is not finished

Parameters:

Name Description
task_id Unique query identificator

Response samples:

{
    "results": [
        {
            "position": "1",
            "url": "https:\/\/www.pizzahut.com\/",
            "title": null,
            "snippet": "<span>Order pizza online for fast pizza delivery or drop by for carryout. You may also \ncontact Pizza Hut and find out about our catering services for your next big event.<\/span>"
        },

        {
            "position": "2",
            "url": "https:\/\/www.dominos.com\/",
            "title": null,
            "snippet": "<span>Domino's Home Page - Domino's Pizza, Order Pizza Online for Delivery - \nDominos.com.<\/span>"
        },
            ...
    ]
}

Call request:

https://api2.seranking.com/structure/clientapi/positions/?token=TOKEN&method=getTaskResults&task_id=ID_QUERY

List of all the queries of the user (getTasks)

The method does not require parameters.

Response sample:

{
    "tasks": [
        {
            "id": "1",
            "query": "Query1",
            "region_name": null,
            "engine_id": "200",
            "region_id": "0",
            "added": "2016-01-18 13:11:29",
            "is_completed": "1"
        },
        {
            "id": "2",
            "query": "Query2",
            "region_name": "New York",
            "engine_id": "200",
            "region_id": "0",
            "added": "2016-01-19 10:07:56",
            "is_completed": "1"
        },
    ...
}

Call sample:

https://api2.seranking.com/structure/clientapi/positions/?token=TOKEN&method=getTasks

Session close (logout)

Parameters

Name Description
token Token parameter aquired at the authorization

Call sample:

https://api2.seranking.com/structure/clientapi/positions/?token=TOKEN&method=logout
By continuing to use this site you consent to the use of cookies in accordance with our Cookie policy. close notification