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

# Google web search

> Search Google and get structured results (organic, ads, KG, AI overview, PAA).

<Warning>
  **The `num` parameter is deprecated.** Google no longer honours `num` to widen a page — a single request returns roughly **10 organic results per page**, regardless of the value you pass. To collect more results, paginate with the **`start`** offset (`start=0`, `10`, `20`, …) and merge the pages client-side.
</Warning>


## OpenAPI

````yaml GET /v1/google/search
openapi: 3.1.0
info:
  title: ScrapeBadger Google Scraper
  description: >-
    Dedicated API for scraping Google products (SERP, Maps, News, Hotels,
    Trends, Jobs, Shopping, Patents, Scholar, Autocomplete, Images, Videos,
    Finance, AI Mode, Lens, Products).
  version: 1.0.0
servers:
  - url: https://scrapebadger.com
    description: Production
security:
  - apiKeyAuth: []
paths:
  /v1/google/search:
    get:
      tags:
        - Google Search
      summary: Google web search
      description: |-
        Search Google and get structured results.

        Two response modes:

        - **full** (default, 2 credits): complete SERP with organic, ads,
          knowledge graph, People Also Ask, AI Overview, local pack, news,
          related searches, inline videos, etc. ~1.5-2s cold, ~1.5ms warm.
        - **fast** (1 credit, ~40% faster): lite endpoint (`gbv=1`) returning
          only organic results + related searches. Rich blocks (KG, local,
          AI Overview, news) are **not** returned — request ``mode=full`` for
          those. Auto-upgrades to full if ``ai_overview=true`` is set.

        First request in either mode triggers a browser warmup (~15s) to
        solve SearchGuard. Subsequent requests reuse the sticky session.
      operationId: google_search_api_v1_search_get
      parameters:
        - name: q
          in: query
          required: true
          schema:
            type: string
            description: >-
              Search query (supports Google operators like site:, inurl:,
              intitle:)
            title: Q
          description: >-
            Search query (supports Google operators like site:, inurl:,
            intitle:)
        - name: gl
          in: query
          required: false
          schema:
            type: string
            description: Country code (e.g. us, gb, de, fr)
            default: us
            title: Gl
          description: Country code (e.g. us, gb, de, fr)
        - name: hl
          in: query
          required: false
          schema:
            type: string
            description: Language code (e.g. en, es, fr)
            default: en
            title: Hl
          description: Language code (e.g. en, es, fr)
        - name: num
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            description: Results per page
            default: 10
            title: Num
          description: Results per page
        - name: start
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            description: Pagination offset (0, 10, 20...)
            default: 0
            title: Start
          description: Pagination offset (0, 10, 20...)
        - name: domain
          in: query
          required: false
          schema:
            type: string
            description: Google domain (e.g. google.com, google.co.uk)
            default: google.com
            title: Domain
          description: Google domain (e.g. google.com, google.co.uk)
        - name: device
          in: query
          required: false
          schema:
            type: string
            description: desktop or mobile
            default: desktop
            title: Device
          description: desktop or mobile
        - name: location
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: City-level geo-targeting (e.g. 'New York, USA')
            title: Location
          description: City-level geo-targeting (e.g. 'New York, USA')
        - name: lr
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Language restrict (e.g. lang_en)
            title: Lr
          description: Language restrict (e.g. lang_en)
        - name: tbs
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Time-based search filter (e.g. qdr:d for past 24h)
            title: Tbs
          description: Time-based search filter (e.g. qdr:d for past 24h)
        - name: safe
          in: query
          required: false
          schema:
            type: string
            description: Safe search (active/off)
            default: 'off'
            title: Safe
          description: Safe search (active/off)
        - name: uule
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Encoded location parameter (UULE)
            title: Uule
          description: Encoded location parameter (UULE)
        - name: filter
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
                maximum: 1
                minimum: 0
              - type: 'null'
            description: Include omitted results (0=show all, 1=filter)
            title: Filter
          description: Include omitted results (0=show all, 1=filter)
        - name: nfpr
          in: query
          required: false
          schema:
            type: integer
            maximum: 1
            minimum: 0
            description: Disable auto-correction (1=exact match)
            default: 0
            title: Nfpr
          description: Disable auto-correction (1=exact match)
        - name: cr
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Country restrict (e.g. countryUS|countryGB)
            title: Cr
          description: Country restrict (e.g. countryUS|countryGB)
        - name: ludocid
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Google My Business CID (place ID)
            title: Ludocid
          description: Google My Business CID (place ID)
        - name: lsig
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Knowledge Graph map view ID
            title: Lsig
          description: Knowledge Graph map view ID
        - name: kgmid
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Knowledge Graph entity ID
            title: Kgmid
          description: Knowledge Graph entity ID
        - name: si
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Cached search parameters
            title: Si
          description: Cached search parameters
        - name: ibp
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Layout control (e.g. gwp;0,7)
            title: Ibp
          description: Layout control (e.g. gwp;0,7)
        - name: uds
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Google filter string
            title: Uds
          description: Google filter string
        - name: ai_overview
          in: query
          required: false
          schema:
            type: boolean
            description: >-
              When true, chase Google's deferred AI Overview page_token with a
              follow-up fetch and merge the result into ai_overview. Adds ~1s
              and 1 credit when the SERP actually defers the overview.
            default: false
            title: Ai Overview
          description: >-
            When true, chase Google's deferred AI Overview page_token with a
            follow-up fetch and merge the result into ai_overview. Adds ~1s and
            1 credit when the SERP actually defers the overview.
        - name: mode
          in: query
          required: false
          schema:
            enum:
              - full
              - fast
            type: string
            description: >-
              Response mode. **full** (default): complete SERP with all blocks
              (organic, ads, knowledge graph, local pack, AI overview, news,
              related questions, etc). **fast**: lite endpoint via `gbv=1` that
              returns ONLY organic results + related searches in ~0.6-1s cold
              (vs 1.5-2s full). Use when you only need organic results and can
              skip rich features.
            default: full
            title: Mode
          description: >-
            Response mode. **full** (default): complete SERP with all blocks
            (organic, ads, knowledge graph, local pack, AI overview, news,
            related questions, etc). **fast**: lite endpoint via `gbv=1` that
            returns ONLY organic results + related searches in ~0.6-1s cold (vs
            1.5-2s full). Use when you only need organic results and can skip
            rich features.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleSearchResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    GoogleSearchResponse:
      properties:
        search_information:
          $ref: '#/components/schemas/SearchInformation'
        ai_overview:
          anyOf:
            - $ref: '#/components/schemas/AiOverview'
            - type: 'null'
        organic_results:
          items:
            $ref: '#/components/schemas/OrganicResult'
          type: array
          title: Organic Results
        ads:
          items:
            $ref: '#/components/schemas/AdResult'
          type: array
          title: Ads
        knowledge_graph:
          anyOf:
            - $ref: '#/components/schemas/KnowledgeGraph'
            - type: 'null'
        local_results:
          items:
            $ref: '#/components/schemas/LocalResult'
          type: array
          title: Local Results
        related_questions:
          items:
            $ref: '#/components/schemas/RelatedQuestion'
          type: array
          title: Related Questions
        related_searches:
          items:
            $ref: '#/components/schemas/RelatedSearch'
          type: array
          title: Related Searches
        news_results:
          items:
            $ref: '#/components/schemas/NewsResult'
          type: array
          title: News Results
        inline_videos:
          items:
            $ref: '#/components/schemas/InlineVideo'
          type: array
          title: Inline Videos
        shopping_results:
          items:
            $ref: '#/components/schemas/ShoppingResult'
          type: array
          title: Shopping Results
        pagination:
          $ref: '#/components/schemas/Pagination'
      type: object
      required:
        - search_information
        - pagination
      title: GoogleSearchResponse
      description: Response for GET /api/v1/search.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SearchInformation:
      properties:
        query_displayed:
          type: string
          title: Query Displayed
        total_results:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total Results
        time_taken:
          anyOf:
            - type: number
            - type: 'null'
          title: Time Taken
        organic_results_state:
          anyOf:
            - type: string
            - type: 'null'
          title: Organic Results State
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
      type: object
      required:
        - query_displayed
      title: SearchInformation
      description: Metadata about the search query.
    AiOverview:
      properties:
        text_blocks:
          items:
            $ref: '#/components/schemas/AiOverviewTextBlock'
          type: array
          title: Text Blocks
        references:
          items:
            $ref: '#/components/schemas/AiOverviewReference'
          type: array
          title: References
        page_token:
          anyOf:
            - type: string
            - type: 'null'
          title: Page Token
          description: >-
            Continuation token for the deferred AI Overview fetch. Non-null when
            Google embeds only a placeholder in the main SERP response.
        deferred:
          type: boolean
          title: Deferred
          description: True when the AI Overview was present as a deferred block.
          default: false
      type: object
      title: AiOverview
      description: >-
        Google AI Overview (AI-generated summary).


        Google increasingly serves the AI Overview as a **deferred** block — the

        initial SERP HTML contains only a placeholder plus a `page_token` that

        the client has to POST back to retrieve the actual content. When that

        happens, the SERP parser populates `page_token` and leaves

        `text_blocks`/`references` empty. Callers of `/v1/google/search` can
        pass

        `ai_overview=true` to have the scraper chase the token automatically and

        merge the result back into this object.
    OrganicResult:
      properties:
        position:
          type: integer
          title: Position
        title:
          type: string
          title: Title
        link:
          type: string
          title: Link
        displayed_link:
          anyOf:
            - type: string
            - type: 'null'
          title: Displayed Link
        snippet:
          anyOf:
            - type: string
            - type: 'null'
          title: Snippet
        highlighted_keywords:
          items:
            type: string
          type: array
          title: Highlighted Keywords
        source:
          anyOf:
            - type: string
            - type: 'null'
          title: Source
        favicon:
          anyOf:
            - type: string
            - type: 'null'
          title: Favicon
        sitelinks:
          items:
            $ref: '#/components/schemas/Sitelink'
          type: array
          title: Sitelinks
        inline_sitelinks:
          items:
            $ref: '#/components/schemas/InlineSitelink'
          type: array
          title: Inline Sitelinks
        date:
          anyOf:
            - type: string
            - type: 'null'
          title: Date
        rank:
          anyOf:
            - type: integer
            - type: 'null'
          title: Rank
        page_rank:
          anyOf:
            - type: integer
            - type: 'null'
          title: Page Rank
      type: object
      required:
        - position
        - title
        - link
      title: OrganicResult
      description: A single organic search result.
    AdResult:
      properties:
        position:
          anyOf:
            - type: integer
            - type: 'null'
          title: Position
        title:
          type: string
          title: Title
        link:
          type: string
          title: Link
        displayed_link:
          anyOf:
            - type: string
            - type: 'null'
          title: Displayed Link
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        extensions:
          items:
            type: string
          type: array
          title: Extensions
      type: object
      required:
        - title
        - link
      title: AdResult
      description: A sponsored/ad result.
    KnowledgeGraph:
      properties:
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
        type:
          anyOf:
            - type: string
            - type: 'null'
          title: Type
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        image:
          anyOf:
            - type: string
            - type: 'null'
          title: Image
        source:
          anyOf:
            - type: string
            - type: 'null'
          title: Source
        attributes:
          additionalProperties:
            type: string
          type: object
          title: Attributes
      type: object
      title: KnowledgeGraph
      description: Knowledge Graph panel.
    LocalResult:
      properties:
        title:
          type: string
          title: Title
        place_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Place Id
        rating:
          anyOf:
            - type: number
            - type: 'null'
          title: Rating
        reviews:
          anyOf:
            - type: integer
            - type: 'null'
          title: Reviews
        address:
          anyOf:
            - type: string
            - type: 'null'
          title: Address
        phone:
          anyOf:
            - type: string
            - type: 'null'
          title: Phone
        type:
          anyOf:
            - type: string
            - type: 'null'
          title: Type
        gps_coordinates:
          anyOf:
            - $ref: '#/components/schemas/GpsCoordinates'
            - type: 'null'
      type: object
      required:
        - title
      title: LocalResult
      description: Local pack result.
    RelatedQuestion:
      properties:
        question:
          type: string
          title: Question
        rank:
          anyOf:
            - type: integer
            - type: 'null'
          title: Rank
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
        link:
          anyOf:
            - type: string
            - type: 'null'
          title: Link
        snippet:
          anyOf:
            - type: string
            - type: 'null'
          title: Snippet
        displayed_link:
          anyOf:
            - type: string
            - type: 'null'
          title: Displayed Link
        source_logo:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Logo
      type: object
      required:
        - question
      title: RelatedQuestion
      description: People Also Ask question.
    RelatedSearch:
      properties:
        query:
          type: string
          title: Query
        link:
          anyOf:
            - type: string
            - type: 'null'
          title: Link
      type: object
      required:
        - query
      title: RelatedSearch
      description: Related search suggestion.
    NewsResult:
      properties:
        title:
          type: string
          title: Title
        link:
          anyOf:
            - type: string
            - type: 'null'
          title: Link
        source:
          anyOf:
            - type: string
            - type: 'null'
          title: Source
        date:
          anyOf:
            - type: string
            - type: 'null'
          title: Date
        thumbnail:
          anyOf:
            - type: string
            - type: 'null'
          title: Thumbnail
      type: object
      required:
        - title
      title: NewsResult
      description: Inline news/top stories result.
    InlineVideo:
      properties:
        title:
          type: string
          title: Title
        source:
          anyOf:
            - type: string
            - type: 'null'
          title: Source
        thumbnail:
          anyOf:
            - type: string
            - type: 'null'
          title: Thumbnail
        platform:
          anyOf:
            - type: string
            - type: 'null'
          title: Platform
        duration:
          anyOf:
            - type: string
            - type: 'null'
          title: Duration
        date:
          anyOf:
            - type: string
            - type: 'null'
          title: Date
        position:
          anyOf:
            - type: integer
            - type: 'null'
          title: Position
      type: object
      required:
        - title
      title: InlineVideo
      description: Inline video result.
    ShoppingResult:
      properties:
        title:
          type: string
          title: Title
        price:
          anyOf:
            - type: string
            - type: 'null'
          title: Price
        source:
          anyOf:
            - type: string
            - type: 'null'
          title: Source
        link:
          anyOf:
            - type: string
            - type: 'null'
          title: Link
        thumbnail:
          anyOf:
            - type: string
            - type: 'null'
          title: Thumbnail
        rating:
          anyOf:
            - type: number
            - type: 'null'
          title: Rating
        reviews:
          anyOf:
            - type: integer
            - type: 'null'
          title: Reviews
      type: object
      required:
        - title
      title: ShoppingResult
      description: Inline shopping result.
    Pagination:
      properties:
        current:
          anyOf:
            - type: integer
            - type: string
          title: Current
          default: 1
        next:
          anyOf:
            - type: string
            - type: 'null'
          title: Next
        total_results:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total Results
        total_pages:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total Pages
        page_no:
          additionalProperties:
            type: string
          type: object
          title: Page No
      type: object
      title: Pagination
      description: Pagination metadata.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    AiOverviewTextBlock:
      properties:
        type:
          type: string
          enum:
            - paragraph
            - heading
            - list
            - video
            - table
          title: Type
        snippet:
          anyOf:
            - type: string
            - type: 'null'
          title: Snippet
        snippet_links:
          items:
            $ref: '#/components/schemas/SnippetLink'
          type: array
          title: Snippet Links
        list_items:
          items:
            $ref: '#/components/schemas/AiOverviewListItem'
          type: array
          title: List Items
        video:
          anyOf:
            - $ref: '#/components/schemas/AiOverviewVideo'
            - type: 'null'
        video_links:
          items:
            $ref: '#/components/schemas/AiOverviewVideo'
          type: array
          title: Video Links
      type: object
      required:
        - type
      title: AiOverviewTextBlock
      description: A typed content block within AI Overview.
    AiOverviewReference:
      properties:
        index:
          type: integer
          title: Index
        title:
          type: string
          title: Title
        link:
          type: string
          title: Link
        snippet:
          anyOf:
            - type: string
            - type: 'null'
          title: Snippet
        source:
          anyOf:
            - type: string
            - type: 'null'
          title: Source
        logo:
          anyOf:
            - type: string
            - type: 'null'
          title: Logo
      type: object
      required:
        - index
        - title
        - link
      title: AiOverviewReference
      description: A source reference in AI Overview.
    Sitelink:
      properties:
        title:
          type: string
          title: Title
        link:
          anyOf:
            - type: string
            - type: 'null'
          title: Link
        snippet:
          anyOf:
            - type: string
            - type: 'null'
          title: Snippet
      type: object
      required:
        - title
      title: Sitelink
      description: A sitelink within an organic result.
    InlineSitelink:
      properties:
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
        date:
          anyOf:
            - type: string
            - type: 'null'
          title: Date
      type: object
      title: InlineSitelink
      description: An inline sitelink (e.g. Reddit post metadata).
    GpsCoordinates:
      properties:
        lat:
          type: number
          title: Lat
        lng:
          type: number
          title: Lng
      type: object
      required:
        - lat
        - lng
      title: GpsCoordinates
      description: GPS coordinates.
    SnippetLink:
      properties:
        link:
          type: string
          title: Link
        link_text:
          type: string
          title: Link Text
      type: object
      required:
        - link
        - link_text
      title: SnippetLink
      description: Inline link within an AI Overview text block.
    AiOverviewListItem:
      properties:
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
        snippet:
          anyOf:
            - type: string
            - type: 'null'
          title: Snippet
        snippet_links:
          items:
            $ref: '#/components/schemas/SnippetLink'
          type: array
          title: Snippet Links
      type: object
      title: AiOverviewListItem
      description: A list item within an AI Overview text block.
    AiOverviewVideo:
      properties:
        link:
          type: string
          title: Link
        channel:
          anyOf:
            - type: string
            - type: 'null'
          title: Channel
        source:
          anyOf:
            - type: string
            - type: 'null'
          title: Source
        date:
          anyOf:
            - type: string
            - type: 'null'
          title: Date
        thumbnail:
          anyOf:
            - type: string
            - type: 'null'
          title: Thumbnail
        duration:
          anyOf:
            - type: string
            - type: 'null'
          title: Duration
      type: object
      required:
        - link
      title: AiOverviewVideo
      description: Video reference in AI Overview.
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````