> ## 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 Lens visual search

> Search Google Lens by image URL for visually similar results.



## OpenAPI

````yaml GET /v1/google/lens/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/lens/search:
    get:
      tags:
        - Google Lens
      summary: Google Lens visual search
      description: |-
        Search Google Lens by image URL for visually similar results.

        Accepts Scrapingdog-parity ``country`` / ``language`` aliases on top
        of the native ``gl`` / ``hl``; the aliases take precedence when
        supplied. Toggling ``product`` / ``visual_matches`` / ``exact_matches``
        passes Google's matching hints through to the upstream Lens page so
        Google biases the result mix appropriately.
      operationId: search_lens_api_v1_lens_search_get
      parameters:
        - name: url
          in: query
          required: true
          schema:
            type: string
            description: Public URL of the image to search visually
            title: Url
          description: Public URL of the image to search visually
        - name: query
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Optional text refinement — e.g. 'pizza' to focus Lens on food
              matches.
            title: Query
          description: >-
            Optional text refinement — e.g. 'pizza' to focus Lens on food
            matches.
        - name: country
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: ISO country code (alias for ``gl``).
            title: Country
          description: ISO country code (alias for ``gl``).
        - name: language
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Language code (alias for ``hl``).
            title: Language
          description: Language code (alias for ``hl``).
        - name: gl
          in: query
          required: false
          schema:
            type: string
            description: Country code
            default: us
            title: Gl
          description: Country code
        - name: hl
          in: query
          required: false
          schema:
            type: string
            description: Language code
            default: en
            title: Hl
          description: Language code
        - name: product
          in: query
          required: false
          schema:
            type: boolean
            description: When True, bias towards shoppable product matches.
            default: false
            title: Product
          description: When True, bias towards shoppable product matches.
        - name: visual_matches
          in: query
          required: false
          schema:
            type: boolean
            description: Include the visual-matches carousel (Scrapingdog parity).
            default: true
            title: Visual Matches
          description: Include the visual-matches carousel (Scrapingdog parity).
        - name: exact_matches
          in: query
          required: false
          schema:
            type: boolean
            description: Restrict to exact-match results only.
            default: false
            title: Exact Matches
          description: Restrict to exact-match results only.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LensSearchResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    LensSearchResponse:
      properties:
        lens_results:
          items:
            $ref: '#/components/schemas/LensResult'
          type: array
          title: Lens Results
        results:
          items:
            $ref: '#/components/schemas/LensResult'
          type: array
          title: Results
        related_searches:
          items:
            $ref: '#/components/schemas/LensRelatedSearch'
          type: array
          title: Related Searches
        image_url:
          type: string
          title: Image Url
      type: object
      required:
        - image_url
      title: LensSearchResponse
      description: Response for GET /api/v1/lens/search.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    LensResult:
      properties:
        position:
          anyOf:
            - type: integer
            - type: 'null'
          title: Position
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
        link:
          anyOf:
            - type: string
            - type: 'null'
          title: Link
        source:
          anyOf:
            - type: string
            - type: 'null'
          title: Source
        source_favicon:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Favicon
        thumbnail:
          anyOf:
            - type: string
            - type: 'null'
          title: Thumbnail
        original_thumbnail:
          anyOf:
            - type: string
            - type: 'null'
          title: Original Thumbnail
        tag:
          anyOf:
            - type: string
            - type: 'null'
          title: Tag
        price:
          anyOf:
            - $ref: '#/components/schemas/ProductPrice'
            - type: 'null'
        in_stock:
          anyOf:
            - type: boolean
            - type: 'null'
          title: In Stock
        rating:
          anyOf:
            - type: string
            - type: 'null'
          title: Rating
        reviews:
          anyOf:
            - type: string
            - type: 'null'
          title: Reviews
      type: object
      title: LensResult
      description: A single visual search result.
    LensRelatedSearch:
      properties:
        title:
          type: string
          title: Title
        link:
          anyOf:
            - type: string
            - type: 'null'
          title: Link
        thumbnail:
          anyOf:
            - type: string
            - type: 'null'
          title: Thumbnail
      type: object
      required:
        - title
      title: LensRelatedSearch
      description: A related-searches chip from the Lens results page.
    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
    ProductPrice:
      properties:
        value:
          anyOf:
            - type: number
            - type: 'null'
          title: Value
        currency:
          anyOf:
            - type: string
            - type: 'null'
          title: Currency
        extracted:
          anyOf:
            - type: string
            - type: 'null'
          title: Extracted
      type: object
      title: ProductPrice
      description: A price expressed both as the raw display string and a numeric value.
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````