Use the Google Lens API to run visual product search, match a photo to live listings, and pull prices and stock as structured JSON.
I do a lot of e-commerce data work, and I kept hitting the same wall: a product photo with no SKU, no title, and no source page. Matching that image to a real listing by hand does not scale past a handful of items.
Visual product search takes an image and returns the products that match it, with the source page, price, and stock, as structured data instead of a screen full of thumbnails. The Google Lens API does exactly that: send a public image URL, set the search type to products, and it returns match rows you can parse.
Each match row is one JSON object with these fields:
title and source: the product and the page that lists it
url and thumbnail, plus the full image with imageWidth and imageHeight
price, currency, and inStock for shopping results
date the source was last seen
Two honest limits: the full image field is null on exact-match searches, and rating and reviewCount are rarely published by the source, so do not build a pipeline that depends on them.
1. Point it at a public image URL and set the search type to products.
2. Run the Actor; each match comes back as one JSON row.
3. Read the JSON directly or export the run to CSV.
Call the run-sync endpoint and read the dataset in one request:
POST api.apify.com/v2/acts/johnvc~google-lens-api/run-sync-get-dataset-items?token=YOUR_TOKEN
Content-Type: application/json
{
"image_url": "IMAGE_URL_HERE",
"search_type": "products"
}You get back an array of match rows, ready to load into a catalog or a spreadsheet.
The Actor also runs over MCP, so an AI agent can call it as a tool with no scraping code. Point your client at the Apify MCP server (mcp.apify.com) and ask it something concrete:
Identify the product in this photo and list any shopping
results with prices: https://example.com/sneaker.jpgClaude, Cursor, or ChatGPT then runs the search and hands you the structured rows.
A few patterns from real use: catalog enrichment that turns a supplier photo into a titled, priced listing; resale and dropshipping price checks; and brand monitoring to spot where product images get reused. The examples gallery has runnable versions, including bulk reverse image search from a URL list and visual search from Claude via MCP.
For the reverse-image side of the same Actor, there is a full walkthrough on Medium and a local-file how-to on Dev.to.
Set the search type to products and read the price, currency, and inStock fields on each match row. Shopping results carry them; general visual matches usually do not.
Results come from live visual search at request time, so each run reflects what is visible right then. There is no cached index, you get current matches.
Pricing is pay per result, so a single-image lookup costs cents and a bulk job scales in a straight line. You are billed for the match rows you get back, not for a monthly seat.
Yes. The Actor is exposed over MCP, so Claude, Cursor, or ChatGPT can call it as a tool and read the JSON directly. No client code, just a prompt with an image URL.
Yes. The Google Lens API supports agentic payments via the x402 protocol, so AI agents and MCP clients can pay for runs in USDC on Base with no Apify account or API token. Point your agent at the Apify MCP server (mcp.apify.com) and it can discover, pay for, and run the scraper autonomously; the Apify x402 announcement has the details.
If you hit a bad result or a field you did not expect, open an issue on the Actor and I usually reply within a day.
0
0
0