Get access to 30+ marketing and SEO tools. analyze competitors, keywords, and backlinks for free..
Sign in Sign Up

We use cookies to make Serpstat better. By clicking "Accept cookies", you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. Learn more

Getting the raw SERP in HTML format (tasks.getKeywordSerp)

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

Sign In Free Sign Up

You’ve reached your query limit.

Or email
Forgot password?
Or email
Optional
Back To Login

Don’t worry! Just fill in your email and we’ll send over your password.

Are you sure?

Awesome!

To complete your registration you need to enter your phone number

Back

We sent confirmation code to your phone number

Your phone Resend code Queries left

Something went wrong.

Contact our support team
Or confirm the registration using the Telegram bot Follow this link
Please pick the project to work on

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.
Upgrade your plan

Upgrade your plan

Export is not available for your account. Please upgrade to Lite or higher to get access to the tool. Learn more

Sign Up Free

Thank you, we have saved your new mailing settings.

Invite
View Editing

E-mail
Message
Optional
E-mail
Message
Optional

You have run out of limits

You have reached the limit for the number of created projects. You cannot create new projects unless you increase the limits or delete existing projects.

I want more limits
Open support chat