# Google Lens API | Reverse Image and Visual Product Search (`johnvc/google-lens-api`) Actor

Google Lens API for reverse image search and visual product search. Give it any public image URL and get visually similar results, shoppable product matches with prices, or every page carrying that exact image, for image attribution and licensing checks. Pay per result, MCP ready for AI agents.

- **URL**: https://apify.com/johnvc/google-lens-api.md
- **Developed by:** [John](https://apify.com/johnvc) (community)
- **Categories:** AI, E-commerce, MCP servers
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.01 / 1,000 dataset item storeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Google Lens API

The Google Lens API turns any image into structured data. Give it a public image URL and get back visually similar results, shoppable product listings with prices, or every page on the web carrying that exact image.

This is the working path to Google visual search, and it covers the three jobs people actually hire reverse image search for: find where this came from, find where else it is being used, and find where I can buy it.

### Use cases

- **Image attribution and licensing.** Run exact matches to find every page publishing a specific image, then work the list for missing credit or unlicensed reuse.
- **Counterfeit and brand monitoring.** Feed a product photo and see who else is selling it, and at what price.
- **Visual product search.** Turn a photo into shoppable listings with price, currency and stock where the retailer publishes them.
- **Content provenance.** Establish where an image first appeared and how widely it has spread.
- **Catalogue enrichment.** Match a supplier photo to live retail listings to fill gaps in your own product data.
- **Feeding an AI agent.** Let an assistant look up an image through [Google Lens](https://lens.google.com) mid-conversation instead of guessing at it.

### Input parameters

| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| `image_url` | string | yes | none | Public http or https link to the image. Must be reachable without a login. Data URIs and local paths are rejected before any billable call. |
| `search_type` | string | no | `visual_matches` | `visual_matches` for similar images, `products` for shoppable listings, `exact_matches` for pages carrying the identical file. |
| `query` | string | no | none | Words to narrow results. Applies to visual matches and products; the source ignores it for exact matches. |
| `max_results` | integer | no | `50` | Rows to return, 1 to 400. One lookup returns everything available, so this trims rather than pages. |
| `country` | string | no | none | Two letter country code, such as `us` or `de`. |
| `language` | string | no | none | Two letter language code. Coverage genuinely varies by language, so try without it first if results look thin. |

### Example output

```json
{
  "resultType": "match",
  "searchType": "visual_matches",
  "queryImage": "https://example.com/photo.png",
  "position": 1,
  "title": "Example product listing",
  "source": "Wikimedia Commons",
  "url": "https://commons.wikimedia.org/wiki/File:Example.jpg",
  "thumbnail": "https://encrypted-tbn0.gstatic.com/images?q=tbn:example",
  "image": "https://upload.wikimedia.org/wikipedia/commons/example.jpg",
  "imageWidth": 1280,
  "imageHeight": 720,
  "date": "Apr 13, 2026",
  "price": 49.99,
  "currency": "$",
  "inStock": true
}
```

`price`, `currency` and `inStock` populate on product matches. `image` is null on exact matches, where the source returns only a thumbnail plus the pixel dimensions. Failures arrive as one `resultType: "error"` row, and a lookup with no matches finishes cleanly at zero rows rather than erroring.

### Three search types

| Type | What it answers | Typical volume per lookup |
|---|---|---|
| Visual matches | "What else looks like this?" | around 59 results |
| Products | "Where can I buy this, and for how much?" | around 19 results |
| Exact matches | "Where else is this exact image published?" | up to 400 results |

Exact matches is the one to reach for when you are checking attribution, tracking licensing, or looking for unauthorised reuse of your own images.

### What the Google Lens API returns

| Field | Description |
|---|---|
| `title` | Title of the page or product listing |
| `source` | Site the match was found on |
| `url` | Link to the page carrying the image |
| `thumbnail` | Small preview, rendered inline in the output |
| `image` | Full-resolution image URL |
| `imageWidth` / `imageHeight` | Pixel dimensions of the source image |
| `date` | Publication date, where the source reports one |
| `price` / `currency` | Product price, on product matches |
| `inStock` | Stock status, on product matches |
| `rating` / `reviewCount` | Product rating, where the listing carries one |

### How to get started

1. Paste a public image URL into the Image URL field.
2. Pick a search type. Visual matches is the general-purpose default.
3. Set how many results you want and run it.

[View on Apify Store](https://apify.com/johnvc/google-lens-api?fpr=9n7kx3)

Prefer to start from working code? The [example repo](https://github.com/johnisanerd/Apify-Google-Lens-API) has a Python quick start plus MCP install walkthroughs for Claude, Cursor and ChatGPT.

### Honest limitations

These are real gaps in the underlying data source, not bugs in this Actor. They are listed here so you can decide before you spend anything.

- **Exact matches return no full-resolution image URL.** You get the page link, the source name, a thumbnail and the source image's pixel dimensions, but the `image` field is null on those rows. Visual and product matches do carry it.
- **Coverage varies by language.** The same image searched with different language codes can return different numbers of matches. If results look thin, try without a language code first.
- **Product data is uneven.** Price, stock and rating appear only where the underlying listing publishes them. Expect gaps rather than a complete product feed.
- **The image must be publicly reachable.** Anything behind a login, a signed URL, or a local file path will not work.

### Pricing

Pay per result, so a lookup that returns 8 matches costs less than one that returns 400. There is no per-run setup fee.

| Event | When it is charged |
|---|---|
| Visual match returned | Once per visually similar result |
| Product match returned | Once per shoppable listing |
| Exact match returned | Once per page carrying the exact image |

Exact matches carry the lowest unit price because one lookup returns far more of them. Current per-unit prices are on the Actor's Store card and in the Console before you run.

### 🔌 Use this API from Claude (MCP)

Add this Actor as a tool in [Claude Code](https://claude.ai/referral/uIlpa7nPLg) (free trial), [Claude Cowork](https://claude.ai/referral/uIlpa7nPLg) (free trial), or any other MCP client, via the hosted Apify MCP server. Use this Actor-specific URL:

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

Setup walkthrough:

https://www.youtube.com/watch?v=jREWahDGhJM

Apify MCP integration docs: https://docs.apify.com/platform/integrations/mcp

### 💸 Pay per run with crypto (x402)

The Google Lens API supports agentic payments via the [x402 protocol](https://docs.apify.com/platform/integrations/x402).
AI agents and MCP clients can pay for runs in USDC (on Base) with no Apify account or API token needed:
point your agent at the [Apify MCP server](https://mcp.apify.com/?tools=actors,docs,johnvc/google-lens-api) and it can
discover, pay for, and run this Actor autonomously. Read the
[Apify x402 announcement](https://apify.com/change-log/pay-for-apify-actors-with-x402?fpr=9n7kx3) for details.

### 🔌 Integrations: run visual search on a schedule

**Tasks and Schedules first.** Save an image lookup as a Task and attach a Schedule. A weekly exact-match sweep over your own product photography is a standing check for unlicensed reuse, and it needs no code.

**n8n, Make and Zapier.** Trigger the Actor from a workflow and route matches onward: new unattributed uses into a legal review queue, or competitor listings into a pricing sheet.

**Storage.** Write results into Supabase, Postgres or Google Sheets through the Apify integrations tab so each sweep adds to a history rather than replacing it.

**MCP.** Point an AI assistant at the Actor and let it look up an image mid-conversation. Server URL is in the MCP section above.

**Webhooks.** Fire an HTTP callback on run completion so your service can collect the dataset without polling.

### 🔗 Related Tools

Visual search spans two ecosystems, and covering both tells a story neither half tells alone:

- [Yandex Reverse Image Search API](https://apify.com/johnvc/yandex-reverse-image-search?fpr=9n7kx3) is the other major reverse image engine, and it often surfaces matches this one misses. Run both against the same image for the widest net.
- [Google Images API](https://apify.com/johnvc/google-images-api?fpr=9n7kx3) for keyword-driven image search rather than image-driven search
- [Google Shopping API](https://apify.com/johnvc/google-shopping-api?fpr=9n7kx3) for text-based product search across retailers

Alternatives such as [devcake/google-lens-scraper](https://apify.com/devcake/google-lens-scraper?fpr=9n7kx3) exist, but it sits at around 2 users with no published rating. This API is actively maintained, exposes all three search types behind one input, and documents its coverage gaps rather than leaving you to discover them.

### FAQ

#### Can I use this for Google reverse image search?

Yes, and it is the right tool for it. This is what a reverse image lookup on Google actually runs through today. Pick the visual matches type for the general "where does this image come from" question, or exact matches to find every page carrying the identical file.

#### How do I find out if someone is using my image without permission?

Use the exact matches type. It returns every page where the same image file appears, up to 400 results per lookup, with the page URL and source site for each. That is the list you would work through for an attribution or takedown check.

#### Why is the image field empty on my results?

You ran an exact matches lookup. That mode returns a thumbnail and the source image's dimensions but no full-resolution URL. Switch to visual matches if you need the full image link.

#### Can I search by uploading a file instead of a URL?

Not directly. The image has to be reachable at a public http or https URL. If your image is local, upload it to any public host first and pass that link.

#### Does it find products I can actually buy?

The products type returns shoppable listings with price, currency and stock where the retailer publishes them. Coverage is good for mainstream retail and thinner for niche or secondhand items.

#### Is this a Google Lens API or a web scraper?

You use it as an API: an image URL in, structured JSON out, with a documented schema and pay-per-result billing. It reads public [Google Lens](https://lens.google.com) results, so it is not an official product and is not affiliated with, endorsed by, or connected to Google.

#### Can I use it as a bulk reverse image scraper?

Yes, within one image per run. Exact matches returns up to 400 rows from a single lookup, which is the cheapest per-row mode here. For many images, drive it from a Task plus a Schedule or from a workflow tool as described in the Integrations section.

#### How do I call this from an AI agent using MCP?

Point any [Model Context Protocol](https://modelcontextprotocol.io) client at the server URL in the MCP section above. The agent reads the input schema itself and can run an image lookup during a conversation.

#### How do I run this on a schedule?

Save the configuration as a Task and attach a Schedule. The Integrations section above covers the downstream options.

#### What other tools work well alongside this one?

See Related Tools above. Running this and the Yandex Reverse Image API over the same photo is the single highest-value pairing, because the two engines index different corners of the web and each surfaces matches the other misses.

#### What happens if the image has no matches?

The run finishes cleanly with zero rows and a status message explaining what to try next. You are not charged for results you did not receive.

### Agent Skills

Ready-made skills for [Claude Code](https://claude.ai/referral/uIlpa7nPLg) (free trial) and other agents that drive this Actor. Install with `npx skills add johnisanerd/<name>`.

- [claude-skill-google-lens-api](https://github.com/johnisanerd/claude-skill-google-lens-api): reverse image search as structured JSON
- [claude-skill-image-attribution-checker](https://github.com/johnisanerd/claude-skill-image-attribution-checker): find every page using your exact image

### n8n integration

Available as an n8n community node, **[n8n-nodes-google-lens-api](https://www.npmjs.com/package/n8n-nodes-google-lens-api)**. In n8n: Settings, Community Nodes, install `n8n-nodes-google-lens-api`, then use it in any workflow (it also works as an AI Agent tool).

### Featured Tasks

Ready-to-run examples on the Apify Store.

- [Bulk Reverse Image Search From a URL List](https://apify.com/johnvc/google-lens-api/examples/bulk-reverse-image-search?fpr=9n7kx3)
- [Check If Your Photos Are Stolen, in Bulk](https://apify.com/johnvc/google-lens-api/examples/check-if-photos-are-stolen?fpr=9n7kx3)
- [Reverse Image Search API With a Free Tier](https://apify.com/johnvc/google-lens-api/examples/reverse-image-search-api-free-tier?fpr=9n7kx3)
- [Reverse Image Search in Python via API](https://apify.com/johnvc/google-lens-api/examples/reverse-image-search-python?fpr=9n7kx3)
- [Google Lens Visual Search From Claude via MCP](https://apify.com/johnvc/google-lens-api/examples/google-lens-claude-mcp?fpr=9n7kx3)
- [以图搜图API：谷歌智能镜头风格识图](https://apify.com/johnvc/google-lens-api/examples/yitu-soutu-api?fpr=9n7kx3)
- [图片盗用检测：查找使用您图片的网页](https://apify.com/johnvc/google-lens-api/examples/tupian-daoyong-jiance?fpr=9n7kx3)

***

### 🌐 About Alpha OSINT

This Actor is part of [Alpha OSINT](https://www.alphaosint.com), toolset of financial and operations data sources and APIs.
For support or requests for this actor, please start a ticket [directly on our support page](https://apify.com/johnvc/google-lens-api/issues/open?fpr=9n7kx3).

Last Updated: 2026.08.08

# Actor input Schema

## `image_url` (type: `string`):

REQUIRED. A public http or https link to the image you want to look up. The image must be reachable without a login. Local file paths and data URIs are not supported.

## `search_type` (type: `string`):

What kind of matches to return. 'Visual matches' finds visually similar images and is the general reverse image search. 'Products' returns shoppable listings with prices. 'Exact matches' finds every page carrying this exact image, which is what you want for attribution and licensing checks.

## `query` (type: `string`):

Optional. Add words to narrow the results, for example 'blue' or 'leather'. Applies to visual matches and products only; the source ignores it for exact matches.

## `max_results` (type: `integer`):

How many matches to return. One lookup returns roughly 59 visual matches, 19 products, or up to 400 exact matches, so set this to whichever slice you actually need.

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

Optional two letter country code such as us, gb or de. Affects which regional results and shopping listings are returned.

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

Optional two letter language code such as en, es or fr. Note that match coverage genuinely varies by language: some languages return fewer results for the same image.

## Actor input object example

```json
{
  "image_url": "https://i.imgur.com/HBrB8p0.png",
  "search_type": "visual_matches",
  "max_results": 50
}
```

# Actor output Schema

## `allResults` (type: `string`):

Every match row from this run.

## `overview` (type: `string`):

Matches with source, thumbnail and link in a scannable table.

## `products` (type: `string`):

Shoppable matches with price, currency and stock status.

# 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 = {
    "image_url": "https://i.imgur.com/HBrB8p0.png"
};

// Run the Actor and wait for it to finish
const run = await client.actor("johnvc/google-lens-api").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 = { "image_url": "https://i.imgur.com/HBrB8p0.png" }

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

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

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

```

## CLI example

```bash
echo '{
  "image_url": "https://i.imgur.com/HBrB8p0.png"
}' |
apify call johnvc/google-lens-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=johnvc/google-lens-api",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

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