Scrapingdog

Google Lens API

The Google Lens API enables reverse image search functionality through Scrapingdog, supporting product results, visual matches, and exact matches from Google Lens. Costs 5 API credits per request.

Endpoint: https://api.scrapingdog.com/google_lens

API Parameters

πŸ”‘

Authentication

  • api_key Required
    This is your API key.

    Type: String
  • url Required
    The Google Lens URL.

    Type: String
πŸ”

Search Query

  • query Optional
    The parameter specifies the search query you want to execute, just like a standard Google search. Example1 - query=pizza

    Type - String
🌍

Geographic Location and Localization

  • country Optional
    This is the ISO code of the country from which you are seeking Google Lens results.

    Default Value - us

    Type - String
  • language Optional
    Language of the results. Possible Values - en, es, fr, de, etc.

    Default Value - en

    Type - String
βš™

️ Result Type Parameters

  • product Optional
    This parameter is used to get product results from Google Lens. Set it true to enable it.

    Default Value - false

    Type: String
  • visual_matches Optional
    This parameter is used to get visual match results from Google Lens. Set it true to enable it.

    Default Value - false

    Type: String
  • exact_matches Optional
    This parameter is used to get exact match results from Google Lens. Set it true to enable it.

    Default Value - false

    Type: String

API Examples

Code to Integrate
curl "https://api.scrapingdog.com/google_lens?api_key=APIKEY&url=https://lens.google.com/uploadbyurl?url=https://i.imgur.com/HBrB8p0.png"
API Response
{
  "lens_results": [
    {
      "position": 1,
      "title": "Danny DeVito - Wikipedia",
      "source": "en.wikipedia.org",
      "link": "https://en.wikipedia.org/wiki/Danny_DeVito",
      "thumbnail": "https://encrypted-tbn1.gstatic.com/images?q=..."
    },
    {
      "position": 2,
      "title": "Danny DeVito | Roald Dahl Wiki | Fandom",
      "source": "fandom.com",
      "link": "https://roalddahl.fandom.com/wiki/Danny_DeVito",
      "thumbnail": "https://encrypted-tbn2.gstatic.com/images?q=..."
    }
  ]
}