Google Lens API

Our Google Lens API gives you programmatic access to Google Lens data that isn't available through any official API. Get data on OCR text extraction, reverse image search, object recognition, visual matching, structured data extraction, and more. And the best part? You can try the Google Lens API entirely for free, no credit card required.

Trusted by industry leaders all over the world

Integrate our Google Lens API

Access the Google Lens API using Python, JavaScript, CLI, cURL, OpenAPI, or MCP. Choose your preferred option and start extracting Google Lens data in minutes.

Python

Python

JavaScript

JavaScript

HTTP

HTTP

MCP

MCP

1from apify_client import ApifyClient
2
3# Initialize the ApifyClient with your Apify API token
4# Replace '<YOUR_API_TOKEN>' with your token.
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7# Prepare the Actor input
8run_input = {
9 "type": "all",
10 "imageUrls": [{ "url": "https://console.apify.com/img/logos_apify/logo_apify_full_white_text.svg" }],
11}
12
13# Run the Actor and wait for it to finish
14run = client.actor("borderline/google-lens").call(run_input=run_input)
15
16# Fetch and print Actor results from the run's dataset (if there are any)
17print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
18for item in client.dataset(run["defaultDatasetId"]).iterate_items():
19 print(item)
20
21# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

Get data with Google Lens API

Extract Google Lens data by providing image URLs and operation type (translate, exact-match, visual-match, all, products, or homework). The Google Lens API returns structured JSON data with OCR text segments, similar images with thumbnails and sources, object classifications, and detailed metadata including bounding boxes and confidence scores.

Input

{
"type": "all",
"imageUrls": [
{
"url": "<https://console.apify.com/img/logos_apify/logo_apify_full_white_text.svg>"
}
]
}

Output

[
{
"site": {
"url": "https://aselahhome.com/the-power-of-giving-raising-generous-kids/",
"name": "aselahhome.com",
"favicon": [
"https://encrypted-tbn0.gstatic.com/favicon-tbn?q=tbn:ANd9GcRYJ_aMUCZdBu7vW8jSzk57cUDU_mxz_Ez4iKw5sLNYcXOic6KlEMEnqzZQODLO_cS82RCF1irDU5MPr_uaFOAQNbQNUf43ukwDSAcT26st3gcUlg"
]
},
"title": "The Power of Giving: Raising Generous Kids - Selah Home",
"thumbnail": {
"url": "https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcRnwAEqKNTA9OBnhxGWeyPVkoXUT11TOWh3ySf8pqK2yd6eH3Bf",
"width": 1024,
"height": 768
}
},
{
"site": {
"url": "https://www.renestance.com/blog/muguet-de-mai-a-french-tradition/",
"name": "Renestance",
"favicon": [
"https://encrypted-tbn0.gstatic.com/favicon-tbn?q=tbn:ANd9GcTz8E-EUG55uY8K04JyHy2ZIBtIxHUCE17zNPUZOC-oKeP7jhFLQjGJYFDPjMh1weyWJYHGcJx3EzPNcenNOZjzSCCZcsbQcoHAmC5nzbIWt4HvLZH4ImY"
]
},
"title": "Muguet de Mai - A French Tradition - Renestance",
"thumbnail": {
"url": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSuOm9d1E1X7e2Jp5Rt27KbNjuNUmpDYstBhC8hDgQTi1N3Dslg",
"width": 1200,
"height": 800
}
}
]
Sign up for Apify account01

Creating an account is quick and free — no credit card required. Your account gives you access to more than 5,000 scrapers and APIs.

Get started for free
Get your Apify API token02

Go to settings in the Apify console and navigate to the “API & Integrations” tab. There, create a new token and save it for later.

Integrate Google Lens API03

Navigate to the Google Lens API page and click on the API dropdown menu in the top right corner. In the dropdown menu, you can see API clients, API endpoints, and more.

Open Google Lens API
Get your Google Lens data via API04

Now, you can use the API and get the data you need from Google Lens.

Why use Apify?

Never get blocked

Every plan (free included) comes with Apify Proxy, which is great for avoiding blocking and giving you access to geo-specific content.

Customers love us

We truly care about the satisfaction of our users and thanks to that we're one of the best-rated data extraction platforms on both G2 and Capterra.

Monitor your runs

With our latest monitoring features, you always have immediate access to valuable insights on the status of your web scraping tasks.

Export to various formats

Your datasets can be exported to any format that suits your data workflow, including Excel, CSV, JSON, XML, HTML table, JSONL, and RSS.

Integrate Apify to your workflow

You can integrate your Apify runs with platforms such as Zapier, Make, Keboola, Google Drive, or GitHub. Connect with practically any cloud service or web app.

Large developer community

Apify is built by developers, so you'll be in good hands if you have any technical questions. Our Discord server is always here to help!

Frequently asked questions

No, there is no official Google Lens API available for developers. Google does not provide a public API for Google Lens functionality. However, this Apify Actor serves as an unofficial Google Lens API that replicates the core features of Google Lens, allowing you to programmatically analyze images for text recognition, reverse image search, and object identification through a reliable web scraping solution.

Yes, you can try the Google Lens API for free! Apify offers a free tier that includes $5 of platform credits each month, which is typically enough for testing and small-scale usage. Simply create a free Apify account, navigate to the Google Lens Actor, and click "Try for free" to start processing images without any upfront payment.

With the Google Lens API, you can extract OCR text with language detection and bounding box coordinates, find similar images through reverse image search with source URLs and thumbnails, identify and classify objects in images, discover exact image matches with hosting site information, translate extracted text into different languages, and obtain structured metadata including image dimensions, confidence scores, and pixel coordinates for all detected elements.

Getting started with the Google Lens API is simple:

  1. Create a free Apify account,
  2. Navigate to the Google Lens Actor page and click "Try for free",
  3. Provide your input with image URLs and specify the operation type (translate, exact-match, visual-match, all, products, or homework),
  4. Click "Start" to begin processing, and
  5. Download your results in JSON, CSV, Excel, or HTML format from the Storage tab. The Actor processes images in seconds and delivers structured data ready for your applications.

Get started with Google Lens API today

Get your first Google Lens data in less than 5 minutes. No credit card required. No commitment. Cancel anytime.