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

    NameTypeRequiredDescription
    qstringyesSearch query
    countnumberyesNumber of results to fetch (default: 10)
    hlstringnoResults language code (e.g. en, ru)
    glstringnoCountry code for search results (e.g. us, ru) — see Available countries
    canonicalLocationNamestringnoLocation for localized results (e.g. New York,New York,United States) — see Available cities
    isDesktopbooleannoEmulate desktop browser (default: false)
    aiOverviewbooleannoParse Google AI Overview (default: false)
    callbackUrlstringnoWebhook URL to POST result when done
    useragentstringnoCustom User-Agent string (printable ASCII only)
    screenResolutionstringnoBrowser screen resolution (e.g. 1920x1080, 360x640)
    parsingDomainstringnoCustom search domain (e.g. google.de)
    takeScreenshotbooleannoCapture a screenshot of the page (default: false)
    paramsarray of recordsnoPass 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 gl country codes for geo-targeting
    • Available cities — look up canonicalLocationName values for city-level targeting
    • Pricing — see how credits are calculated for SERP requests