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

# Google Search

> Execute a Google SERP query and receive structured results including organic results, ads, images, and more.



## OpenAPI

````yaml get /v1/google/search
openapi: 3.1.0
info:
  title: Scrapio
  version: 1.0.0
  description: >-
    Turn any URL into structured data. Fetch raw HTML, crawl sites, extract
    structured content, interact with dynamic pages, and search the web through
    one API.
  contact:
    name: Scrapio Support
    url: https://scrapio.dev
  license:
    name: Proprietary
servers:
  - url: https://api.scrapio.dev
    description: Production
  - url: http://localhost:3000
    description: Local development
security:
  - bearerAuth: []
tags:
  - name: System
  - name: Fetch
  - name: Google
  - name: Crawl
  - name: Map
  - name: Interact
  - name: Search
  - name: Jobs
  - name: YouTube
  - name: Amazon
  - name: Walmart
paths:
  /v1/google/search:
    get:
      tags:
        - Google
      summary: Search Google
      description: >-
        Execute a Google search and receive structured SERP results including
        organic results, ads, images, news, shopping, and maps. Supports
        classic, news, images, maps, shopping, and AI-mode search types with
        locale and device targeting.
      operationId: googleSearch
      parameters:
        - name: search
          in: query
          required: true
          schema:
            type: string
            minLength: 1
        - name: search_type
          in: query
          required: false
          schema:
            type: string
            enum:
              - classic
              - news
              - maps
              - images
              - lens
              - shopping
              - ai_mode
              - ads
        - name: country_code
          in: query
          required: false
          schema:
            type: string
            minLength: 2
            maxLength: 2
        - name: language
          in: query
          required: false
          schema:
            type: string
            minLength: 2
        - name: device
          in: query
          required: false
          schema:
            type: string
            enum:
              - desktop
              - mobile
        - name: page
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
                minimum: -9007199254740991
                maximum: 9007199254740991
              - type: string
        - name: date_range
          in: query
          required: false
          schema:
            type: string
            enum:
              - past_hour
              - past_day
              - past_week
              - past_month
              - past_year
        - name: latitude
          in: query
          required: false
          schema:
            anyOf:
              - type: number
              - type: string
        - name: longitude
          in: query
          required: false
          schema:
            anyOf:
              - type: number
              - type: string
        - name: radius
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
                minimum: -9007199254740991
                maximum: 9007199254740991
              - type: string
        - name: sort_by
          in: query
          required: false
          schema:
            type: string
            enum:
              - relevance
              - reviews
              - price_asc
              - price_desc
        - name: min_price
          in: query
          required: false
          schema:
            anyOf:
              - type: number
              - type: string
        - name: max_price
          in: query
          required: false
          schema:
            anyOf:
              - type: number
              - type: string
        - name: extra_params
          in: query
          required: false
          schema:
            type: string
            minLength: 1
        - name: light_request
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: string
        - name: add_html
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: string
        - name: nfpr
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: string
        - name: tag
          in: query
          required: false
          schema:
            type: string
            minLength: 1
      responses:
        '200':
          description: >-
            Structured Google SERP response with organic results, ads, and
            enrichments.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleSearchSuccessResponse'
        '400':
          description: Invalid search parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleErrorResponse'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleErrorResponse'
        '429':
          description: Google rate-limited or CAPTCHA-challenged the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleErrorResponse'
        '502':
          description: Google blocked the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleErrorResponse'
        '503':
          description: Google execution backend unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleErrorResponse'
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >-
            curl
            "https://api.scrapio.dev/v1/google/search?search=openai&search_type=classic&country_code=us"
            \
              -H "Authorization: Bearer $SCRAPIO_API_KEY"
        - lang: Python
          label: Python
          source: |-
            import os, requests
            resp = requests.get(
                "https://api.scrapio.dev/v1/google/search",
                headers={"Authorization": f"Bearer {os.environ['SCRAPIO_API_KEY']}"},
                params={"search": "openai", "country_code": "us"},
            )
            print(resp.json()["organic_results"])
        - lang: JavaScript
          label: Node.js
          source: >-
            const params = new URLSearchParams({ search: "openai", country_code:
            "us" });

            const resp = await
            fetch(`https://api.scrapio.dev/v1/google/search?${params}`, {
              headers: { Authorization: `Bearer ${process.env.SCRAPIO_API_KEY}` },
            });

            const data = await resp.json();

            console.log(data.organic_results);
components:
  schemas:
    GoogleSearchSuccessResponse:
      type: object
      properties:
        meta_data:
          type: object
          propertyNames:
            type: string
          additionalProperties: {}
        organic_results:
          type: array
          items:
            type: object
            propertyNames:
              type: string
            additionalProperties: {}
        top_ads:
          type: array
          items:
            type: object
            propertyNames:
              type: string
            additionalProperties: {}
        bottom_ads:
          type: array
          items:
            type: object
            propertyNames:
              type: string
            additionalProperties: {}
        related_searches:
          type: array
          items:
            type: object
            propertyNames:
              type: string
            additionalProperties: {}
        related_queries:
          type: array
          items:
            type: object
            propertyNames:
              type: string
            additionalProperties: {}
        questions:
          type: array
          items:
            type: object
            propertyNames:
              type: string
            additionalProperties: {}
        images:
          type: array
          items:
            type: object
            propertyNames:
              type: string
            additionalProperties: {}
        knowledge_graph:
          type: object
          propertyNames:
            type: string
          additionalProperties: {}
        local_results:
          type: array
          items:
            type: object
            propertyNames:
              type: string
            additionalProperties: {}
        map_results:
          type: array
          items:
            type: object
            propertyNames:
              type: string
            additionalProperties: {}
        news_results:
          type: array
          items:
            type: object
            propertyNames:
              type: string
            additionalProperties: {}
        top_stories:
          type: array
          items:
            type: object
            propertyNames:
              type: string
            additionalProperties: {}
        shopping_results:
          type: array
          items:
            type: object
            propertyNames:
              type: string
            additionalProperties: {}
        hotel_results:
          type: array
          items:
            type: object
            propertyNames:
              type: string
            additionalProperties: {}
        ai_overviews:
          type: array
          items:
            type: object
            propertyNames:
              type: string
            additionalProperties: {}
        html:
          type: string
      additionalProperties: {}
    GoogleErrorResponse:
      type: object
      properties:
        request_id:
          type: string
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            details:
              type: array
              items:
                type: string
            diagnostics:
              type: object
              propertyNames:
                type: string
              additionalProperties:
                type: string
          required:
            - code
            - message
      required:
        - request_id
        - error
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key

````