Google Lens API

Give it any image and get ranked matches back as JSON. Three lookup types cover the distinct jobs: visual matches for similar images, products for shoppable listings with price and stock, and exact matches for every page using that same image, which is how you check attribution or find unlicensed reuse. Images can be a public URL, an upload from your computer, or raw base64.

MEDIAN LAGon demand
PARAMETERS8
TOTAL USERS428
MONTHLY ACTIVE167
TOTAL RUNS32,396
SUCCESS (30D)99.8%
RATINGno ratings yet
LAST MODIFIED2026-11-18
PUBLISHED2026-08

Input parameters

PARAMETERTYPEREQDEFAULTDESCRIPTION
image_url string no — A public http or https link to the image. Also accepts a data URI.
image_upload string[] no — Upload up to 10 images from your computer, or point at files already stored on Apify. Takes priority over image_url.
image_base64 string[] no — Raw image bytes as base64, one entry per image, with or without the data URI prefix. Built for API and automation callers holding a local file.
search_type enum no visual_matches visual_matches for similar images, products for shoppable listings with price and stock, exact_matches for pages using the identical image.
query string no — Optional words to narrow the results, such as 'blue' or 'leather'. Applies to visual matches and products only.
max_results integer no 50 How many matches to return. One lookup yields roughly 59 visual matches, 19 products, or up to 400 exact matches. — drives your bill
country string no — Two letter country code, which shifts regional results and shopping listings.
language string no — Two letter language code. Match coverage genuinely varies by language.

Worked examples

Basic — reverse image search from a URL
{
  "image_url": "https://example.com/photo.jpg",
  "max_results": 20
}
Attribution check — every page using this exact image
{
  "image_url": "https://example.com/my-photo.jpg",
  "search_type": "exact_matches",
  "max_results": 100
}
Shoppable matches — product rows carry price, currency and stock
{
  "image_url": "https://example.com/sneaker.jpg",
  "search_type": "products",
  "query": "leather"
}
Upload a batch — up to 10 local images, no public link needed
{
  "image_base64": ["", ""],
  "search_type": "exact_matches"
}
POWER-USER TIP
Uploads are staged behind a signed private link — An uploaded or base64 image is written to your run's own key-value store and handed upstream as a signed URL. It is never published anywhere else, and the link stops working when the store expires. Note that very large base64 payloads exceed the MCP request limit, so agent callers should prefer image_url or the console upload.
POWER-USER TIP
Coverage varies by subject — Product photos and recognisable objects return dense match sets. Landmarks and artworks sometimes return nothing at all for visual matches, which is an upstream coverage gap rather than a failure. Exact matches are the more reliable mode for attribution work.

Coverage

3
lookup types — visual matches · products · exact matches
10
images per run — batch upload or base64
400
matches per lookup — up to 400 exact · ~59 visual · ~19 product

n8n templates

Free n8n workflows that run this source. Import one, add your Apify token, and it runs on a schedule.

N8N Log image copyright usages from Google Lens in Google Sheets ↗ Runs your images through Google Lens each week and logs every page that shows them, so uncredited copies are easy to spot.

All n8n templates →

Code

curl

curl -X POST "https://api.apify.com/v2/acts/johnvc~google-lens-api/run-sync-get-dataset-items" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"image_url":"https://example.com/photo.jpg","search_type":"exact_matches","max_results":25}'

Python

from apify_client import ApifyClient

client = ApifyClient("APIFY_TOKEN")
run = client.actor("johnvc/google-lens-api").call(
    run_input={"image_url": "https://example.com/photo.jpg", "search_type": "exact_matches", "max_results": 25}
)
for match in client.dataset(run.default_dataset_id).iterate_items():
    print(match.get("title"), "-", match.get("source"), match.get("url"))

MCP

Apify's hosted MCP server loads this source from the URL below as the tool johnvc--google-lens-api. Sign in to Apify when your client asks (OAuth), or send an Apify token as an Authorization: Bearer header.

https://mcp.apify.com/?tools=johnvc/google-lens-api

What people use it for

  • Finding unlicensed reuse of your photography
  • Image attribution and licensing audits
  • Visual product matching for ecommerce catalogues
  • Dropship and counterfeit listing discovery
  • Feeding an AI agent visual lookup as a tool

More sources for Transcripts, images and content pipelines, Product and price intelligence, Grounding AI agents and MCP tools →

Alternatives

Questions people ask

Is there a public Google Lens API for reverse image search?

This Google Lens API gives you reverse image search as structured JSON. Give it any image and it returns ranked matches in three lookup types: visual matches for similar images, products for shoppable listings with price and stock, and exact matches for every page using the identical image.

How do I use the Google Lens API with my own image?

Pass a public link as image_url, upload up to 10 files with image_upload, or send raw bytes as image_base64. Choose search_type (default visual_matches), add an optional query word such as leather to narrow results, and set max_results, which defaults to 50.

Is the Google Lens API free to use?

There is a free tier on Apify. Beyond it, you pay per match: 0.0003 USD per visual match, 0.0004 USD per exact match and 0.001 USD per product match.

Can AI agents use the Google Lens API as a tool?

Yes. It is exposed as an MCP tool on Apify's hosted MCP server, so Claude, Cursor and other agents can call it directly, and it is also available over REST. Agent callers should prefer image_url, since very large base64 payloads exceed the MCP request limit.

How do I find pages using my photo with the Google Lens API?

Set search_type to exact_matches and pass your image. One lookup returns up to 400 exact matches, each a pointer to a public page carrying the same image, which is how you check attribution or find unlicensed reuse. Exact matches are the more reliable mode for attribution work.

How does the Google Lens API differ from a keyword image search API?

Google Lens searches by image rather than by keyword. The Google Images API is keyword image search, the Google Shopping API is keyword product search, and the Yandex Reverse Image Search API is the other visual-search ecosystem, worth running alongside for real coverage.

⌂ 换网址