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:

Share this article with your friends

Are you sure?

Introducing Serpstat

Find out about the main features of the service in a convenient way for you!

Please send a request, and our specialist will offer you education options: a personal demonstration, a trial period, or materials for self-study and increasing expertise — everything for a comfortable start to work with Serpstat.

Name

Email

Phone

We are glad of your comment
I agree to Serpstat`s Privacy Policy.

Thank you, we have saved your new mailing settings.

Open support chat