Getting a SERP Crawling of regular and local results using the identifiers

The tasks.getTaskResult method allows getting a SERP Crawling of regular and local results using the identifiers.

General request parameters and instructions for using Serpstat API

Request parameters
Parameter Description Type Optional Value options
id The identifier of a current request, can be set manually or automatically string no 1, test
method API method name string no tasks.getTaskResult
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
page In high-volume projects, it returns results separated into parts. The response contains the next_page parameter, which indicates the number of the next part of the result. int yes "page": 2

Response parameters for regular results
Parameter Description
id Identifiers of the current request
result Contains the answer
next_page The parameter is available in high-volume projects where results are separated into parts
task_meta Crawling identifiers settings:
se_id — search engine identifier;
* country_id — country identifier;
* region_id — region or city identifier;
device_type_id — device type identifier
tops The project’s keywords result array
keyword_id
ID number of a required keyword for getting a SERP
keyword
A keyword
keyword_data
Contains parameters
top
Tops array for the current keyword
url
URL of the webpage
domain
Domain name result
subdomain
A subdomain of a domain
snippet_length
The length of snippet
title
Title in a search result
title_length
The length of title
snippet
HTML view
breadcrumbs
“Bread crumbs”, if it is in the search result
spec_elements
Array with parameters of special elements
types
List of special elements shown in SERP (for example, video, carousel or map)
position
Position in the list
ads
Context advertisement:
 1 — search results at the top of the page;
 2 — search results on the right of the page (outdated view);
 3 — search results at the bottom of the page

PPC object parameters:
* domain — domain name result;
* position — position in the list;
* subdomain — subdomain of a domain;
* text — add text;
* title — title in the search result;
* url — URL of the webpage
right_spell
Rightly  spell of the keyword
results
Total number of results in SERP
top_features_content
Array with parameters of special elements:

PeopleAlsoAsk — "People also ask" block that shows relevant search questions for a keyword.

Parameters of the LocalPack object:
* title title of the result;
ads — indicates whether this block is an ad (true/false);
* thumbnail the presence of a picture;
* rating — rating of the result;
* review — number of reviews;
* pricing prices in the institution in different currencies ($, ₽, £), the more banknotes the more expensive;
* extensions:
 - type — institution type;
 - situation where the institution is located (in which building: shopping center, museum, etc.);
 - address — address (possibly including a phone number and location; additional information, for example: "7+ years in business");
 - hours — hours of operation (Open/Closed and until what time it works; or without specifying the time, for example "Open around the clock");
* wrapped  various additional information;
* options service options offered by the establishment, for example: "Food in the establishment", "Order from the street", "No delivery"

Getting data on the LocalPack block is in the beta mode and the content may be changing and adding.

There is a special block in Google SERP Local pack that usually consists of 3 results (sometimes there can be 4 results and the first one is ad). If you click on the "More places" button in the bottom of the Local pack block, you will see the Local results page that includes the same data as the Local pack but it has more results — up to 50 results for both desktop and mobile.
Response parameters for local results
Parameter Description
id Identifiers of the current request
result Contains the answer
task_meta Crawling identifiers settings:
se_id — search engine identifier;
* country_id — country identifier;
* region_id — region or city identifier;
device_type_id — device type identifier
tops The project’s keywords result array
keyword_id
ID number of a required keyword for getting a SERP
keyword
A keyword
keyword_data
Contains parameters
my_business Array of local results for the current keyword
title Title of the result
ads Indicates whether this block is an ad (true/false)
thumbnail The presence of a picture
rating Rating of the result
review Number of reviews
pricing Prices in the institution in different currencies ($, ₽, £), the more banknotes  the more expensive
extensions Array with parameters that may contain the following information:
- type — institution type;

- situation  where the institution is located (in which building: shopping center, museum, etc.);
- address — address (possibly including phone number and location; additional information, for example: "7+ years in business");
- hours — hours of operation (Open/Closed and until what time it works; or without specifying the time, for example "Open around the clock")
wrapped Various additional information
options Service options offered by the establishment, for example: "Food in the establishment", "Order from the street", "No delivery"
position
Position in the list

The example of the response for 
Local results:
{
    "id": "some_id",
    "result": {
        "task_meta": {
            "se_id": "1",
            "country_id": "23",
            "region_id": "21176",
            "device_type_id": "1"
        },
        "tops": [
            {
                "keyword_id": "529084768",
                "keyword": "burger",
                "keyword_data": {
                    "my_business": [
                        {
                            "title": "Lucy's Big Burgers",
                            "ads": false,
                            "thumbnail": true,
                            "extensions": [
                                "Hamburger",
                                "Abilene, TX, United States",
                                "Closed",
                                "Opens 11AM"
                            ],
                            "rating": "4.7",
                            "review": null,
                            "pricing": "$$",
                            "wrapped": "Low-key, family-run eatery with rustic decor, offering burgers, hot dogs & homemade ice cream.",
                            "options": [
                                "Dine-in",
                                "Takeaway",
                                "No delivery"
                            ],
                            "position": 1
                        },
                        {
                            "title": "Larry's Better Burger Drive-In",
                            "ads": false,
                            "thumbnail": true,
                            "extensions": [
                                "Hamburger",
                                "Abilene, TX, United States"
                            ],
                            "rating": "4.7",
                            "review": null,
                            "pricing": "$",
                            "wrapped": "Old-fashioned burger shack serving a lengthy comfort-food menu & ice cream from the window.",
                            "options": [
                                "Curbside pickup",
                                "No delivery"
                            ],
                            "position": 2
                        },

...

                        {
                            "title": "From Scratch",
                            "ads": false,
                            "thumbnail": true,
                            "extensions": [
                                "American",
                                "Salt Lake City, UT, United States",
                                "In the Gallivan Center",
                                "Closed",
                                "Opens 11AM"
                            ],
                            "rating": "4.4",
                            "review": null,
                            "pricing": "$$",
                            "wrapped": "Relaxed, rustic-chic locale featuring artisanal pizzas, burgers & sandwiches, plus beer & wine.",
                            "options": [
                                "Dine-in",
                                "Curbside pickup",
                                "No delivery"
                            ],
                            "position": 50
                        }
                    ]
                },
                "target_fields": "[]"
            }
        ]
    }
}​

Errors
Error Description
Task not found Task with such ID is not found
Not all keywords have been tracked. Progress x% Not all keywords have been processed. Progress in percents for the task.

Example PHP Python
Request data:
{
    "id": "some_id" ,
    "method": "tasks.getTaskResult",
    "params": {
        "taskId": 2381968
    }
}
Response data:
{
    "id": "some_id",
    "result": {
        "task_meta": {
            "se_id": "1",
            "country_id": "23",
            "region_id": "21176",
            "device_type_id": "1"
        },
        "tops": [
            {
                "keyword_id": "529102158",
                "keyword": "burger",
                "keyword_data": {
                    "top": [
                        {
                            "url": "https://www.bk.com/",
                            "domain": "bk.com",
                            "subdomain": "www.bk.com",
                            "snippet_length": 109,
                            "title": "Burger King",
                            "title_length": 11,
                            "snippet": "Get access to exclusive coupons. Discover our menu and order delivery or pick up from a Burger King near you.",
                            "breadcrumbs": "https://www.bk.com",
                            "spec_elements": [
                                {
                                    "type": "snip_breadcrumbs",
                                    "anchor": null,
                                    "href": null,
                                    "content": "https://www.bk.com",
                                    "sort_number": 0
                                }
                            ],
                            "types": [
                                "snip_breadcrumbs"
                            ],
                            "position": 1
                        },
                        {
                            "url": "https://en.wikipedia.org/wiki/Burger",
                            "domain": "wikipedia.org",
                            "subdomain": "en.wikipedia.org",
                            "snippet_length": 158,
                            "title": "Burger - Wikipedia",
                            "title_length": 18,
                            "snippet": "Hamburger, a sandwich consisting of one or more cooked patties, placed inside a sliced bread roll or bun roll. Cheeseburger, a hamburger with added cheese(s).",
                            "breadcrumbs": "https://en.wikipedia.org › wiki › Burger",
                            "spec_elements": [
                                {
                                    "type": "snip_breadcrumbs",
                                    "anchor": null,
                                    "href": null,
                                    "content": "https://en.wikipedia.org › wiki › Burger",
                                    "sort_number": 0
                                }
                            ],
                            "types": [
                                "snip_breadcrumbs"
                            ],
                            "position": 2
                        },


...


                        {
                            "url": "https://pizarospizza.com/",
                            "domain": "pizarospizza.com",
                            "subdomain": null,
                            "snippet_length": 150,
                            "title": "Pizaro's Pizza – Napoletana Style Pizza | Cooks in ... - Houston",
                            "title_length": 64,
                            "snippet": "What is Napoletana Pizza? ... Pizzas must be cooked at a blistering 900 degrees for no more than 90 seconds in a bell ... What is Detroit Style Pizza?",
                            "breadcrumbs": "https://pizarospizza.com",
                            "spec_elements": [
                                {
                                    "type": "snip_breadcrumbs",
                                    "anchor": null,
                                    "href": null,
                                    "content": "https://pizarospizza.com",
                                    "sort_number": 0
                                }
                            ],
                            "types": [
                                "snip_breadcrumbs"
                            ],
                            "position": 97
                        }
                    ],
                    "ads": {
                        "1": [
                            {
                                "breadcrumbs": "https://www.dominos.com/",
                                "title": "Domino’s® Pizza - Domino’s® Pizza Online - Online Ordering",
                                "url": "https://www.dominos.com/",
                                "domain": "dominos.com",
                                "subdomain": "www.dominos.com",
                                "text": "Order Your Next Pizza Online & Track Its Delivery With The Domino's Tracker®. Choose Any 2 Or More: Only $5.99 Each: Pizza, Pasta, Dips & Twists & More. Delivery or Carryout. Find A Location Near You. Earn Rewards. Track Your Order. Types: Hand Tossed, Thin Crust.",
                                "position": 1
                            }
                        ],
                        "2": [],
                        "3": []
                    },
                    "results": 1390000000,
                    "right_spell": "",
                    "types": [
                        "map",
                        "local_pack",
                        "also_asks",
                        "ads_top"
                    ],
                    "top_features_content": [
                        {
                            "LocalPack": {
                                "LocalPackSnippet": {
                                    "localpack": [
                                        {
                                            "title": "Pizza Hut",
                                            "ads": false,
                                            "thumbnail": true,
                                            "extensions": [
                                                "Pizza",
                                                "Ballinger, TX"
                                            ],
                                            "rating": "3.8",
                                            "reviews": "128",
                                            "pricing": "$",
                                            "wrapped": null,
                                            "options": [
                                                "Takeout",
                                                "No dine-in",
                                                "No delivery"
                                            ],
                                            "position": 1
                                        },
                                        {
                                            "title": "Domino's Pizza",
                                            "ads": false,
                                            "thumbnail": true,
                                            "extensions": [
                                                "Pizza",
                                                "Sweetwater, TX"
                                            ],
                                            "rating": "4.1",
                                            "reviews": "201",
                                            "pricing": "$",
                                            "wrapped": null,
                                            "options": [
                                                "Drive-through",
                                                "No-contact delivery"
                                            ],
                                            "position": 2
                                        },
                                        {
                                            "title": "Pizza Hut",
                                            "ads": false,
                                            "thumbnail": true,
                                            "extensions": [
                                                "Pizza",
                                                "Abilene, TX"
                                            ],
                                            "rating": "3.6",
                                            "reviews": "288",
                                            "pricing": "$",
                                            "wrapped": null,
                                            "options": [
                                                "Drive-through",
                                                "No-contact delivery",
                                                "No dine-in"
                                            ],
                                            "position": 3
                                        }
                                    ]
                                }
                            }
                        },
                        {
                            "PeopleAlsoAsk": {
                                "PeopleAlsoAskBlock": {
                                    "people_also_ask_questions": [
                                        "Is pizza healthy to eat?",
                                        "What is the best pizza of all time?",
                                        "How is pizza made?",
                                        "Why does pizza taste good?"
                                    ]
                                }
                            }
                        }
                    ]
                },
                "target_fields": "[]"
            }
        ]
    }
}

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