Skip to content

Endpoints · 09/13

Lens

Visual matches for an image URL — Google Lens, as JSON.

EndpointPOSThttps://serp-api.ozymoz.com/lens
Credits per call3

Parameters

NameDescription
urlrequiredImage URL (lens) or page URL (webpage).
glCountry to search from, as a two-letter code (us, tr, de…).Default: us
hlInterface language, as a language code (en, tr, de…).Default: en

Example request

curl -X POST 'https://serp-api.ozymoz.com/lens' \
  -H 'X-API-KEY: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "url": "https://example.com/photo.jpg",
    "gl": "us",
    "hl": "en"
  }'

Example response

Illustrative values in the real shape. Top-level keys: organic.

response.json
{
  "searchParameters": {
    "type": "lens",
    "engine": "google",
    "url": "https://example.com/photo.jpg",
    "gl": "us",
    "hl": "en"
  },
  "organic": [
    {
      "title": "Photo of the same scene — Example Photos",
      "link": "https://www.example-photos.com/scene/123",
      "source": "Example Photos",
      "thumbnailUrl": "https://encrypted-tbn0.gstatic.com/images?q=tbn:…",
      "position": 1
    }
  ],
  "credits": 3
}

Good to know

Google has to be able to fetch the image; some hosts (e.g. certain Wikimedia URLs) refuse it and return no matches.

Errors · Batch requests · Rate limits