Getting the raw SERP in HTML format

The tasks.getKeywordSerp method returns the raw SERP in HTML format using task ID and keyword ID. 

General request parameters and instructions for using Serpstat API

Request parameters
Parameter Description Type Optional Value options
id Identifier of a current request, can be set manually or automatically string no 1, test
method API method name string no tasks.getKeywordSerp
params Object with parameters object no
taskId Id number from SERP crawling — the same id, which you are using to get a result for SERP crawling (from methods: tasks.addTask или tasks.addKeywordList) int no 2071486
keywordId Id number of a required keyword for getting a raw SERP (you can get it in the SERP crawling response from the method tasks.getTaskResult) int no 469482008

Response parameters
Parameter Description
id Identifiers of the current request
result Contains the answer
date SERP date
serp A raw SERP in HTML format

Errors
Error Description
Task not found Incorrect task ID
Keyword not found Wrong keyword ID
Keyword not parsed yet No SERP in HTML yet
SERP for keyword not found HTML SERP was deleted, and no longer exists

Example
Request data:
{
    "id": 1,
    "method": "tasks.getKeywordSerp",
    "params": {
        "taskId": 2071486,
        "keywordId": 469482008
    }
}
Response data:

Поделитесь статьей с вашими друзьями

Are you sure?

Персональная презентация сервиса

Serpstat is all about saving time, and we want to save yours! One of our specialists will contact you and discuss options going forward.

These may include a personal demonstration, a trial period, comprehensive training articles & webinar recordings, and custom advice from a Serpstat specialist. It is our goal to make you feel comfortable while using Serpstat.

Name

Email

Phone

We are glad of your comment
Política de privacidad.

Спасибо, мы с вами свяжемся в ближайшее время

Open support chat