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.
Input parameters
| PARAMETER | TYPE | REQ | DEFAULT | DESCRIPTION |
|---|---|---|---|---|
| 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
{
"image_url": "https://example.com/photo.jpg",
"max_results": 20
}
{
"image_url": "https://example.com/my-photo.jpg",
"search_type": "exact_matches",
"max_results": 100
}
{
"image_url": "https://example.com/sneaker.jpg",
"search_type": "products",
"query": "leather"
}
{
"image_base64": ["", ""],
"search_type": "exact_matches"
}
Coverage
n8n templates
Free n8n workflows that run this source. Import one, add your Apify token, and it runs on a schedule.
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.