> ## Documentation Index
> Fetch the complete documentation index at: https://developers.scrapeunblocker.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Scrape a Google search SERP for organic + ad results

> Runs a Google web search for `keyword` and returns a normalized JSON structure with `topAds`, `bottomAds`, `organic` results, `totalResults`, and the proxy country actually used. Set `pages_to_check` 1-10 to paginate. `wait_after_load` adds a delay after the SERP loads (useful for sites where ads render late); `captcha_pause` lets you eyeball / solve a CAPTCHA when running interactively.



## OpenAPI

````yaml /api-reference/openapi.json post /serpApi
openapi: 3.1.0
info:
  title: ScrapeUnblocker API
  description: >-
    Public API for the ScrapeUnblocker proxy/anti-bot service. Authenticate
    every request with the `x-scrapeunblocker-key` header. Three endpoints are
    documented here: page-source extraction, Google SERP scraping, and image
    fetch. All other paths exist for internal operations and are intentionally
    hidden from this spec.
  version: 1.0.0
servers:
  - url: https://api.scrapeunblocker.com
    description: Production
security: []
paths:
  /serpApi:
    post:
      tags:
        - Scraping
      summary: Scrape a Google search SERP for organic + ad results
      description: >-
        Runs a Google web search for `keyword` and returns a normalized JSON
        structure with `topAds`, `bottomAds`, `organic` results, `totalResults`,
        and the proxy country actually used. Set `pages_to_check` 1-10 to
        paginate. `wait_after_load` adds a delay after the SERP loads (useful
        for sites where ads render late); `captcha_pause` lets you eyeball /
        solve a CAPTCHA when running interactively.
      operationId: run_serp_serpApi_post
      parameters:
        - name: keyword
          in: query
          required: true
          schema:
            type: string
            title: Keyword
        - name: proxy_country
          in: query
          required: false
          schema:
            type: string
            title: Proxy Country
        - name: pages_to_check
          in: query
          required: false
          schema:
            type: integer
            maximum: 10
            minimum: 1
            default: 1
            title: Pages To Check
        - name: wait_after_load
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            default: 0
            title: Wait After Load
        - name: captcha_pause
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            default: 0
            title: Captcha Pause
      responses:
        '200':
          description: JSON with organic/ads/totals.
          content:
            application/json:
              schema: {}
        '403':
          description: >-
            Google CAPTCHA after retries with different proxies — try another
            `proxy_country`.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '504':
          description: SERP fetch timed out.
      security:
        - ScrapeUnblockerKey: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ScrapeUnblockerKey:
      type: apiKey
      in: header
      name: x-scrapeunblocker-key
      description: Your ScrapeUnblocker API key. Apply on every request.

````