# Google Lens Reverse Image Search API with Prices (`wheaten_steelpan/google-lens-reverse-image-search`) Actor

Search Google Lens with image URLs and get each image's visual matches: page title, link, website and preview, plus price, currency and stock where Google shows them. Find sellers, compare prices, see where an image appears. You pay per image searched, with no start fee; failed searches are free.

- **URL**: https://apify.com/wheaten\_steelpan/google-lens-reverse-image-search.md
- **Developed by:** [Vanja V](https://apify.com/wheaten_steelpan) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$5.00 / 1,000 image searches

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Google Lens Reverse Image Search API with Prices

Give it image links and get Google Lens's visual matches for each one: the matching page's title, link, website and preview, plus the price, currency and stock where Google shows them.

**$5 per 1,000 images searched.** No start fee, and searches that fail cost nothing.

![Output rows: preview, page title, website, price, stock and rank for each match](https://api.apify.com/v2/key-value-stores/zwnLGKwH1eIW8eEAj/records/output-example.png)

*Six of the 11 priced matches for one photo of a Nintendo Switch Pro Controller, with "Only matches with a price" on.*

### What it's for

- **Find sellers and compare prices from a product photo.** Turn on *Only matches with a price* and pick a country to see which shops list the item and at what price.
- **Find other listings of a product.** Matches for a product photo usually include Amazon, eBay, Walmart and smaller shops selling the same item.
- **Find where an image appears online.** Lens returns pages that show your image together with visually similar ones. Open the page to tell copies from look-alikes; the actor doesn't separate them.
- **Name what's in a picture.** `imageLabel` holds Google's name for the product, artwork or landmark, such as "Nintendo Switch Pro Controller", "The Starry Night" or "Matterhorn".
- **Give an AI agent reverse image search**, through Apify's MCP server or the API (examples below).

### Example

Input:

```json
{
  "images": ["https://api.apify.com/v2/key-value-stores/uN1Gioxdj8TWWlPDJ/records/p01.jpg"],
  "country": "us"
}
```

This photo of a Nintendo Switch Pro Controller returned 59 matches, 8 of them with a price. Two of the rows:

```json
[
  {
    "sourceImage": "https://api.apify.com/v2/key-value-stores/uN1Gioxdj8TWWlPDJ/records/p01.jpg",
    "imageLabel": "Nintendo Switch Pro Controller",
    "position": 3,
    "title": "Genuine Official Nintendo Switch Pro Controller Wireless HAC ...",
    "url": "https://www.ebay.com/itm/226062921359",
    "domain": "ebay.com",
    "thumbnail": "https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcRR2EOAtQ1U76n1LiB-wYgkMRSHAjW8Hz7z33Olh3yGeq2DhN0O",
    "price": null,
    "currency": null,
    "inStock": true,
    "error": null
  },
  {
    "sourceImage": "https://api.apify.com/v2/key-value-stores/uN1Gioxdj8TWWlPDJ/records/p01.jpg",
    "imageLabel": "Nintendo Switch Pro Controller",
    "position": 4,
    "title": "Nintendo Switch Pro Controller, Motion Controls, HD Rumble ...",
    "url": "https://www.walmart.com/ip/Nintendo-Switch-Pro-Controller/6167318001",
    "domain": "walmart.com",
    "thumbnail": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSJyWGmOoBf-CB8Y0Z_apBd0bnUdptsqM7fIVM8Ndj5PFHCgVkF",
    "price": 45,
    "currency": "$",
    "inStock": true,
    "error": null
  }
]
```

### What you get

One dataset row per match:

| Field | What it holds |
|---|---|
| `sourceImage` | The image link you gave, so rows from several images stay apart |
| `imageLabel` | Google's name for what's in the image; `null` when it gives none |
| `position` | Rank among the matches, 1 being the closest. Filters keep the original ranks, so gaps are normal |
| `title` | The matching page's title, often shortened by Google |
| `url` | Link to the matching page |
| `domain` | The page's website, without `www.` |
| `thumbnail` | Google's small preview of the matching image |
| `price`, `currency` | The price and currency symbol ($, £, €) where Google shows one, mostly on shop listings |
| `inStock` | Whether the listing shows the item in stock; `null` when Google shows no stock status |
| `error` | Why an image couldn't be searched; `null` on match rows |

An image that couldn't be searched, such as a broken link or a file that isn't an image, gets one row with `error` filled in and costs nothing. An image with no matches gets no rows; the run's status message lists it.

The `SUMMARY` record in the run's key-value store lists every image with its outcome (matched, no matches, failed or not searched), its match count and whether it was charged.

Download the rows as CSV, Excel or JSON from the Output tab, or read them through the API.

### Input

| Field | Default | What it does |
|---|---|---|
| Image URLs (`images`) | required | Public links to JPEG, PNG, WebP, GIF or BMP images, up to 20 MB each. Each image is one search; duplicates are searched once. |
| Country (`country`) | `us` | Two-letter code of the country Google searches from. It changes which shops and prices you see. |
| Language (`language`) | `en` | Language of Google's interface, such as `de` or `pt-BR`. |
| Only matches with a price (`onlyWithPrice`) | off | Keep only the matches that have a price. |
| Max matches per image (`maxResultsPerImage`) | all, about 60 | Keep only the closest matches. |

Links must open without logging in. To search a photo from your computer, put it anywhere that gives you a public link and paste that link.

### Pricing

**$5.00 per 1,000 images searched**, which is $0.005 per image. Apify's platform usage is included, and there's no start fee or charge per row.

| Images | Cost |
|---|---|
| 1 | $0.005 |
| 100 | $0.50 |
| 1,000 | $5.00 |
| 10,000 | $50.00 |

- An image is charged once its search succeeds, including when Lens finds no matches.
- Links that can't be downloaded or aren't images, and searches that fail, cost nothing.
- *Only matches with a price* and *Max matches per image* filter the rows after the search, so they don't change the price.
- To cap what a run can cost, set a maximum cost when you start it (`maxTotalChargeUsd` in the API). The actor searches only as many images as fit under the cap and lists the rest in `SUMMARY` as not searched, free of charge.

### Use it through the API

Run it and get the rows back in one call:

```bash
curl -X POST "https://api.apify.com/v2/acts/wheaten_steelpan~google-lens-reverse-image-search/run-sync-get-dataset-items" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"images": ["https://api.apify.com/v2/key-value-stores/uN1Gioxdj8TWWlPDJ/records/p01.jpg"], "onlyWithPrice": true}'
```

That call waits at most 5 minutes, enough for about 50 images. For longer lists, the Apify clients start the run and wait for it to finish.

JavaScript (`npm install apify-client`):

```js
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('wheaten_steelpan/google-lens-reverse-image-search').call({
    images: ['https://api.apify.com/v2/key-value-stores/uN1Gioxdj8TWWlPDJ/records/p01.jpg'],
    country: 'gb',
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

Python (`pip install apify-client`):

```python
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("wheaten_steelpan/google-lens-reverse-image-search").call(run_input={
    "images": ["https://api.apify.com/v2/key-value-stores/uN1Gioxdj8TWWlPDJ/records/p01.jpg"],
    "onlyWithPrice": True,
})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(row["price"], row["currency"], row["domain"], row["url"])
```

### Use it from an AI agent (MCP)

Add Apify's MCP server with this actor as its tool, for example in Claude Desktop, Cursor or VS Code:

```json
{
  "mcpServers": {
    "google-lens": {
      "url": "https://mcp.apify.com?tools=wheaten_steelpan/google-lens-reverse-image-search"
    }
  }
}
```

Clients that support OAuth sign you in to Apify on first use. Other clients can send your token in a header: `"headers": { "Authorization": "Bearer <APIFY_TOKEN>" }`. The agent gets a tool that takes image links and returns the matches as rows.

### Speed and limits

- A search takes about 9 seconds, and the actor runs three at a time.
- Lens returns about 60 matches per image, closest first.
- Prices appear only where Google shows them, mostly on shop listings. In our tests, 8 to 11 of about 60 matches for a product photo had a price, and none for a landscape.
- Currencies are symbols as Google shows them, with no conversion.
- Results change between runs: two searches of the same photo a day apart shared 44 of 59 links.
- The actor returns Lens's visual matches. It has no exact-matches-only mode, no text extraction (OCR) and no AI Mode answers.
- Don't use it to identify people from photos of them.

### Notes

- Google offers no public Lens API. This actor returns Lens's visual matches as data and isn't affiliated with Google.
- Each image is downloaded, checked and copied into the run's own storage. The search reads that copy through a signed link, and the copy is deleted when the search is done.
- Found a problem or need a field? Open an issue in the Issues tab.

# Actor input Schema

## `images` (type: `array`):

Public links to the images to search: JPEG, PNG, WebP, GIF or BMP, up to 20 MB each. A link must open without logging in. Each image is one search. Duplicates are searched once.

## `country` (type: `string`):

Two-letter country code Google searches from, e.g. us, gb or de. It changes which shops and prices you see.

## `language` (type: `string`):

Language code for Google's interface, e.g. en, de or pt-BR.

## `onlyWithPrice` (type: `boolean`):

Keep only the matches where Google shows a price, for finding sellers and comparing prices. The search is charged per image either way.

## `maxResultsPerImage` (type: `integer`):

Keep at most this many matches per image, closest first. Google Lens returns about 60. Leave empty to keep all.

## Actor input object example

```json
{
  "images": [
    "https://api.apify.com/v2/key-value-stores/uN1Gioxdj8TWWlPDJ/records/p01.jpg"
  ],
  "country": "us",
  "language": "en",
  "onlyWithPrice": false
}
```

# Actor output Schema

## `matches` (type: `string`):

One row per visual match: page title, link, website, preview, and price and stock where Google shows them. Images that couldn't be searched get one error row each. Download as CSV, JSON or Excel from the Export button.

## `summary` (type: `string`):

What happened to each image: matched, no matches, failed or not searched, with its match count and whether it was charged.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "images": [
        "https://api.apify.com/v2/key-value-stores/uN1Gioxdj8TWWlPDJ/records/p01.jpg"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("wheaten_steelpan/google-lens-reverse-image-search").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "images": ["https://api.apify.com/v2/key-value-stores/uN1Gioxdj8TWWlPDJ/records/p01.jpg"] }

# Run the Actor and wait for it to finish
run = client.actor("wheaten_steelpan/google-lens-reverse-image-search").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "images": [
    "https://api.apify.com/v2/key-value-stores/uN1Gioxdj8TWWlPDJ/records/p01.jpg"
  ]
}' |
apify call wheaten_steelpan/google-lens-reverse-image-search --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,wheaten_steelpan/google-lens-reverse-image-search"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/Mv95e9lg2qQhvyik9/builds/lnsBECJY8dv8lnO0C/openapi.json
