Creating a Task
Submit a Google SERP scraping task to retrieve organic search results for a given query.
Requires the serp scope on your API key.
Endpoint
POST /api/parsing/serp/google
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
| q | string | yes | Search query |
| count | number | yes | Number of results to fetch (default: 10) |
| hl | string | no | Results language code (e.g. en, ru) |
| gl | string | no | Country code for search results (e.g. us, ru) — see Available countries |
| canonicalLocationName | string | no | Location for localized results (e.g. New York,New York,United States) — see Available cities |
| isDesktop | boolean | no | Emulate desktop browser (default: false) |
| aiOverview | boolean | no | Parse Google AI Overview (default: false) |
| callbackUrl | string | no | Webhook URL to POST result when done |
| useragent | string | no | Custom User-Agent string (printable ASCII only) |
| screenResolution | string | no | Browser screen resolution (e.g. 1920x1080, 360x640) |
| parsingDomain | string | no | Custom search domain (e.g. google.de) |
| takeScreenshot | boolean | no | Capture a screenshot of the page (default: false) |
| params | array of records | no | Pass custom search params (e.g. [{"key": "tbs", "value": "qdr:m"}]) |
Example Request
curl https://app.scrapering.com/api/parsing/serp/google \
--request POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data '{
"q": "Buy pizza",
"hl": "en",
"gl": "us",
"canonicalLocationName": "New York,New York,United States",
"pages": 10,
"isDesktop": false
}'
Example Response
{
"id": "abaf4ac3-d9e7-43f2-a414-e7d2ca9ff635",
"status": "parsing",
"scope": "serp",
"costCredits": 1,
"createdAt": "2026-03-20T12:48:05.935Z"
}
The task is processed asynchronously. Use the id to poll for the result or set callbackUrl to receive a webhook when parsing completes.
Next steps
- Receiving result — poll for the result using the task ID
- Webhook — receive the result via callback instead of polling
- Available countries — look up
glcountry codes for geo-targeting - Available cities — look up
canonicalLocationNamevalues for city-level targeting - Pricing — see how credits are calculated for SERP requests