# There's no official Google Lens API: 3 ways to get text out of images in code

By Devansh Tiwari (https://www.devanshtiwari.com/)

Published 31 Oct 2026 · https://www.getascraper.com/blog/google-lens-api-alternatives

Google Lens has no documented public API. Here are three working routes to the text in an image, with the price and the catch of each.

> As of 31 October 2026 we found no documented, public Google Lens API. For production, use Google Cloud Vision, which is official and priced per image. Use the open-source chrome-lens-py library for experiments, or a hosted Actor if you want one HTTP call and no Google Cloud account. The two Lens routes can break without notice.

## Is there a Google Lens API?

No. As of 31 October 2026 we could not find a documented, public Google Lens API. A web search for one returns unofficial tools and marketing posts, no Google documentation. Google's closest official product is Cloud Vision OCR, which is a separate service.

You can paste a photo into Google Lens and get its text back, but not from code through anything Google supports.

You still have three ways to get text out of an image:

- **Google Cloud Vision:** Google's official OCR, supported and billed per image.
- **chrome-lens-py:** an open-source Python library that talks to Lens.
- **A hosted Actor:** the same Lens route, run for you and called over HTTP.

Disclosure: GetAScraper (that's us) built the Actor in option 3. Each option below comes with its limits, ours included. We have not benchmarked the three against each other, so test your own images before you pick.

## Option 1: Google Cloud Vision

This is the only option Google supports. Its docs describe two modes. `TEXT_DETECTION` "detects and extracts text from any image." `DOCUMENT_TEXT_DETECTION` "also extracts text from an image, but the response is optimized for dense text and documents."

Prices from [Google's Vision pricing page](https://cloud.google.com/vision/pricing), read on 31 October 2026:

- **Free tier:** the first 1,000 units each month cost nothing.
- **Paid rate:** $1.50 per 1,000 units from 1,001 to 5,000,000, then $0.60.
- **What a unit is:** one image. Each page of a multi-page file such as a PDF counts as one image.

Limits from [Google's quota page](https://docs.cloud.google.com/vision/quotas), same date: 20 MB per image, 16 images per synchronous request, 1,800 requests per minute and a 10 MB JSON request.

Setup is the real cost. Google's [OCR guide](https://docs.cloud.google.com/vision/docs/ocr) asks you to create a Cloud project, enable billing, enable the Vision API and set up Application Default Credentials. Here is the core of Google's own Python sample, trimmed:

```python
from google.cloud import vision

client = vision.ImageAnnotatorClient()

with open(path, "rb") as image_file:
    content = image_file.read()

image = vision.Image(content=content)
response = client.text_detection(image=image)

for text in response.text_annotations:
    print(text.description)
```

**The catch:** it is a different engine from Lens, and it needs a billing account and credentials before the first request. If you want what Lens returns for your image, Vision may not match it.

## Option 2: the chrome-lens-py library

[chrome-lens-py](https://pypi.org/project/chrome-lens-py/) calls itself "Google Lens from the command line and from Python." On 31 October 2026 PyPI showed version 3.8.2, released 17 October 2026, under the MIT licence, for Python 3.9 or later.

Usage, as the PyPI page shows it:

```python
async with LensAPI() as api:
    result = await api.process_image(
        "image.png", ocr_language="ja", target_translation_language="en"
    )
    print(result["ocr_text"])
    print(result["translated_text"])
```

It costs nothing to install, and the requests leave from your own machine or server.

**The catch:** it is unofficial, and the project says so. The PyPI page calls it "intended for educational and experimental purposes only" and reminds you that "Use of Google's services must comply with their Terms of Service." It says nothing about rate limits or what happens when Google changes the route. When it breaks, the fix is yours to wait for or write.

## Option 3: a hosted Actor

Our [Google Lens OCR Actor](https://apify.com/getascraper/google-lens-ocr) runs the same kind of Lens request for you. You send an image URL, a Base64 payload or a stored file. It returns the text, the detected language and line boxes, with word boxes and translation if you ask for them.

There are two ways to call it. A normal run takes one image or a batch. A single-image HTTP endpoint (Apify calls this Standby) answers without waiting for a container to start. The Store page says it takes about a second once warm.

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("getascraper/google-lens-ocr").call(
    run_input={"imageUrl": "https://example.com/photo.jpg", "outputDetail": "full"}
)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["language"], item["fullText"])
```

Here is a real run. On 21 October 2026 we sent it a public photo of a Swiss restaurant receipt from Wikimedia Commons.

![Apify run input for the Google Lens OCR Actor with one image URL and the output detail set to full](https://www.getascraper.com/blog/google-lens-api-alternatives/run-input.png "The input of the run: one public image URL, with output detail set to full.")

The run finished in under five seconds. It returned one row for the image, with the language marked `en` and 70 words found.

![Apify dataset row for the receipt image showing status SUCCEEDED, detected language en, the start of the OCR text and a word count of 70](https://www.getascraper.com/blog/google-lens-api-alternatives/run-output.png "The result: status, detected language, the start of the extracted text and the word count.")

A second run, on a Korean street sign, returned the language as `ko` and kept the Korean line and its Latin-letter line apart: `대덕대로 577번길` and `Daedeok-daero 577beon-gil`.

On 31 October 2026 the live Apify API listed the Free plan price at $0.00399 per image, plus $0.00005 per run. Paid Apify plans pay less, and the Store page shows prices from $2.99 per 1,000 images.

**The catch:** it costs more per image than Vision. Past Vision's free 1,000 images, the Free plan rate is more than double. The Store page also lists a 25 MB limit per image, and the single-image endpoint takes one image per call, so batches need a normal run. It uses the same unofficial route as option 2, so a change on Google's side stops it until we ship a fix.

At 10,000 images a month, the rates above work out to $13.50 on Vision (1,000 free, then 9,000 at $1.50 per 1,000), $39.90 for the Actor on the Free Apify plan and about $29.90 at the $2.99 per 1,000 paid rate. chrome-lens-py costs only the machine you run it on.

## Which one to pick

- **Production, and a billing account is fine:** Google Cloud Vision. It is the only supported route.
- **A script, a test or a one-off, on your own machine:** chrome-lens-py. It is free, and you accept the risk.
- **An agent or workflow that needs one HTTP call, with no Google Cloud account:** the Actor, if the per-image price suits your volume.

If the text quality matters more than the setup, run 20 of your own images through all three and compare. A receipt and a street sign tell you little about your documents.

## What can break

Options 2 and 3 depend on a route we could not find documented for outside use. Google can change it without notice, and either tool may then fail until its author ships a fix.

Option 1 carries far less of that risk, because Google supports it. If an image pipeline is part of your product, that alone may decide it.

Check Google's terms before you use any unofficial route in production. This post is not legal advice.

## Questions people ask

### Is there an official Google Lens API?

We found none. As of 31 October 2026 we saw no documented, public Lens API from Google, only unofficial tools. Google Cloud Vision is its supported OCR product, but it is a separate service from Lens, with its own pricing.

### Is Google Cloud Vision the same as Google Lens?

We have not seen Google say they share an engine, so treat them as different. Results for the same image may differ. Test your own images on both before you move a pipeline from one to the other.

### Can I get text from images for free?

Partly. Google Cloud Vision gives the first 1,000 images each month free, though it needs a billing account. The chrome-lens-py library costs nothing to install. The Actor charges per image, at the Free plan rate given above.