APIs / Search engines / Google Lens

1 credit per call2 endpoints4 datapointsChecked working 6 Dec 2026

Google Lens API

Google Lens API at 1 credit per image: visual matches, exact matches and products for an image URL as JSON. Failed calls cost nothing.

Google Lens
GET/v1/google-lens/lens?url=https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2F4%2F45%2FA_small_cup_of_coffee.JPG&type=visual_matches
{
  "search_parameters": {
    "url": "https://upload.wikimedia.org/wikipedia/commons/4/45/A_small_cup_of_coffee.JPG",
    "type": "visual_matches"
  },
  "visual_matches": [
    {
      "source": "google.com",
      "title": "Coffee - Wikipedia",
      "link": "https://www.google.com/goto?url=CAESYAHrOzAVjqyZsRw2qYBWnGTQxvo0jp82FNgkFtdeekgdFsMzllECFQuW0N_YE0jQU21l8peWTBGW9imMZMQnJR97PbsxrAVhJlwl7Y3TiYThovCMSqoX1PYgBXCFNpdxoA",
      "position": 1
    },
    {
      "source": "google.com",
      "title": "Un espresso con carácter: tueste oscuro, aroma a chocolate y ...",
      "link": "https://www.google.com/goto?url=CAESYwHrOzAVNdoGpK3FtZxCqcuZTEUq7d9luEWqqwu14ENvcGHD8sy55sN4m7HGYYUpQ0EeamvXBbXOfY-pkMl80yJ8WBgs9vWiCC9-HhswGQ8J1dWANIdzkP-CGSaRHhITUR8JuA",
      "position": 2
    },
    {
      "source": "google.com",
      "title": "Francisco de la Torre 🥑 على X: \"El kopi luwak es un café ...",
      "link": "https://www.google.com/goto?url=CAEScwHrOzAVObEIxcvkJ2s6_wpYlHV501SbYNAkL8tWkvcU35OuZQKQIzv38dIK9tcN0ZgzbEJoj9j8rkWQqMDHLPRkMELJk3Nytab8SsD0Y4_qbvsb5IKFoXbVSokCXzprx8ppw1iNE7JIWogUstyAQU8Depo",
      "position": 3
    }
  ]
}
200 OKJSONX-Credits-Used: 1
Recorded from our API and shortened.

Sample data

What one call returns

A recorded run of lens: the fields and shapes you will get, shortened to 3 items.

#sourcestringtitlestringlinkurlpositioninteger
1google.comCoffee - Wikipediahttps://www.google.com/goto?url=CAESYAHrOzAVjqyZsRw2qYBWnGTQxvo0jp82FNgkFtdeekgdFsMzllECFQuW0N_YE0jQU21l8peWTBGW9imMZMQnJR97PbsxrAVhJlwl7Y3TiYThovCMSqoX1PYgBXCFNpdxoA1
2google.comUn espresso con carácter: tueste oscuro, aroma a chocolate y ...https://www.google.com/goto?url=CAESYwHrOzAVNdoGpK3FtZxCqcuZTEUq7d9luEWqqwu14ENvcGHD8sy55sN4m7HGYYUpQ0EeamvXBbXOfY-pkMl80yJ8WBgs9vWiCC9-HhswGQ8J1dWANIdzkP-CGSaRHhITUR8JuA2
3google.comFrancisco de la Torre 🥑 على X: "El kopi luwak es un café ...https://www.google.com/goto?url=CAEScwHrOzAVObEIxcvkJ2s6_wpYlHV501SbYNAkL8tWkvcU35OuZQKQIzv38dIK9tcN0ZgzbEJoj9j8rkWQqMDHLPRkMELJk3Nytab8SsD0Y4_qbvsb5IKFoXbVSokCXzprx8ppw1iNE7JIWogUstyAQU8Depo3

Recorded from our API · 3 items shown · 4 datapoints per itemGET /v1/google-lens/lens?url=https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2F4%2F45%2FA_small_cup_of_coffee.JPG&type=visual_matches

4 datapoints

Identity

  • titlestring

Contact

  • linkurl

Other

  • sourcestring
  • positioninteger

Playground

Run this API

cURLshell
curl "https://api.perceptlayer.com/v1/google-lens/lens?url=https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2F4%2F45%2FA_small_cup_of_coffee.JPG&type=visual_matches" \
  -H "X-API-Key: $API_KEY"

Google Lens · 2 endpoints

Endpoints

Every endpoint takes the same key. Open one for its parameters, the fields it returns and an example request.

EndpointRequired parametersReturnsCost
GET/v1/google-lens/lens
url+2 optional
sourcetitlelinkposition
1 credit
POST/v1/google-lens/upload
none+4 optional
sourcetitlelinkposition
1 credit

Overview

About the Google Lens API

What you can get

The Google Lens API returns Google Lens results for an image as JSON through one endpoint, lens. It takes the image url, with an optional q and type (all, products, exact_matches or visual_matches).

The recorded call for a photo of a cup of coffee, with type visual_matches, returns visual_matches, each with position, title, source and link.

How a call works

Pass a public image URL: GET /v1/google-lens/lens?url=https://...&type=visual_matches with your key in the X-API-Key header. Every successful call costs 1 credit; failed calls cost nothing.

Search enginesJSONRESTMCP

More search engines APIs

Use cases

Find where an image appears on the web

Use the Google Lens API to find where an image appears on the web

Identify products from a photo

Use the Google Lens API to identify products from a photo

Check product images for copies on other sites

Use the Google Lens API to check product images for copies on other sites

Give an agent a way to look up what's in an image

Use the Google Lens API to give an agent a way to look up what's in an image

FAQ

Questions

Can I upload an image file?

The endpoint takes an image `url`; it has no upload parameter.

What does a Google Lens API call cost?

1 credit per successful call, whichever `type` you ask for (all, products, exact_matches or visual_matches). Failed calls cost nothing. New accounts get free credits to start, and credit packs bring the price down as you scale.

What format are responses in?

Every endpoint returns JSON, with no HTML parsing on your side.

Is this the official Google Lens API?

No. Perceptlayer is an independent service and is not affiliated with Google Lens. It returns Google Lens data as JSON with a Perceptlayer key, so there is no Google Lens developer account, app review or partner approval to get first. It only reads data: if Google Lens has an official API and you need to act on your own Google Lens account, such as posting, managing orders or reading private data, use that one.

Should I build a Google Lens scraper instead?

You can, but a Google Lens scraper is code you maintain: page changes break it, requests get blocked, and Google Lens's terms govern how you collect data. The Google Lens API gives you 2 endpoints of named JSON fields for 1 credit per successful call, and failed calls cost nothing. A scraper makes sense only for data these endpoints don't return, so check the response in the playground on this page first.

Try the Google Lens API with 100 free credits

No credit card. Failed calls are never billed.