# Google Lens OCR Scraper (`parseforge/google-lens-scraper`) Actor

Extract text from any image with Google Lens OCR. Get full text, detected language, line and word bounding boxes in pixels. Export to CSV, Excel, JSON or XML.

- **URL**: https://apify.com/parseforge/google-lens-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** AI, Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 image reads

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/actors/running/actors-in-store.md#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

![ParseForge Banner](https://github.com/ParseForge/apify-assets/blob/ad35ccc13ddd068b9d6cba33f323962e39aed5b2/banner.jpg?raw=true)

## 🔍 Google Lens OCR Scraper

> 🚀 **Turn any image into text in seconds.** Google Lens read 12 lines and 95 words from a test sheet in 815 ms, with a pixel box for every word.

The Google Lens OCR Scraper sends your image URLs to the same text-recognition service that powers Google Lens in Chrome and returns everything it sees: the full text, the detected language, and each paragraph, line and word with its position, size and rotation in pixels of the original image. No browser is rendered and no proxy is needed, so a batch of 5 images finishes in about 3 seconds.

Every run delivers one row per image with 15 fields. The service reads printed and stylized text in any script it knows (Latin, Chinese, Korean, Cyrillic, Arabic and more), keeps reading direction and line rotation, and returns LaTeX for formulas when it recognizes one.

| 🎯 Target Audience | 💡 Primary Use Cases |
|---|---|
| Developers building OCR pipelines | Extract text from screenshots, scans, receipts and product photos |
| Data teams and analysts | Index image archives and social media screenshots by their text |
| E-commerce and marketplace operators | Read labels, packaging and price tags at scale |
| Researchers and archivists | Digitize signs, posters and historical documents with coordinates |

### 📋 What the Google Lens OCR Scraper does

Give it a list of public image URLs (or base64 data URLs) and it returns, for each image:

- 📝 The **full text**, paragraphs separated by blank lines
- 🌐 The **detected language** as an ISO code and a readable name
- 📏 Every **line** with `x`, `y`, `width`, `height` and `rotation` in degrees
- 🔤 Every **word** inside each line with its own box (switch off when you only need lines)
- ¶ Every **paragraph** with its writing direction and box
- 🔢 Line, word and character counts plus the original image size

> 💡 **Why it matters:** most OCR tools give you text or boxes, rarely both, and almost never rotation. With word-level coordinates you can highlight matches on the image, redact fields, crop regions or feed structured layout into an LLM. Failed images are reported as error rows and are never charged.

### 🎬 Full Demo (🚧 Coming soon)

### 📊 Output

| Field | Description |
|---|---|
| 🖼 `imageUrl` | The image that was read |
| 📝 `text` | Full recognized text, paragraphs separated by blank lines |
| 🌐 `language` | Detected language code, e.g. `en`, `fr`, `zh-Hans` |
| 🗣 `languageName` | Readable language name, e.g. `Simplified Chinese` |
| 🔤 `hasText` | `Yes` or `No` |
| ¶ `paragraphCount` | Number of paragraphs found |
| 📏 `lineCount` | Number of lines found |
| 🔢 `wordCount` | Number of words found |
| 🔠 `charCount` | Characters without whitespace |
| ↔ `imageWidth` | Original image width in pixels |
| ↕ `imageHeight` | Original image height in pixels |
| ¶ `paragraphs` | Array of `{ index, text, writingDirection, lineCount, x, y, width, height, rotation }` |
| 📏 `lines` | Array of `{ paragraph, text, x, y, width, height, rotation, wordCount, words[] }` |
| 🕒 `scrapedAt` | ISO timestamp of the read |
| ❌ `error` | `null` on success, otherwise the reason the image failed |

Three real records from a run (word arrays shortened):

```json
{
  "imageUrl": "https://raw.githubusercontent.com/JaidedAI/EasyOCR/master/examples/english.png",
  "text": "Reduce your risk of coronavirus infection:\n\nClean hands with soap and water\nor alcohol-based hand rub\n\nCover nose and mouth when coughing and\nsneezing with tissue or flexed elbow",
  "language": "en",
  "languageName": "English",
  "hasText": "Yes",
  "paragraphCount": 7,
  "lineCount": 12,
  "wordCount": 61,
  "charCount": 294,
  "imageWidth": 905,
  "imageHeight": 480,
  "paragraphs": [
    { "index": 1, "text": "Reduce your risk of coronavirus infection:", "writingDirection": "Left to right", "lineCount": 1, "x": 235, "y": 37, "width": 431, "height": 24, "rotation": 0 }
  ],
  "lines": [
    {
      "paragraph": 1,
      "text": "Reduce your risk of coronavirus infection:",
      "x": 235, "y": 37, "width": 431, "height": 24, "rotation": 0,
      "wordCount": 7,
      "words": [
        { "text": "Reduce", "x": 235, "y": 37, "width": 74, "height": 24, "rotation": 0 },
        { "text": "your", "x": 314, "y": 37, "width": 49, "height": 23, "rotation": 0 },
        { "text": "risk", "x": 370, "y": 37, "width": 36, "height": 23, "rotation": 0 }
      ]
    }
  ],
  "scrapedAt": "2026-09-02T22:04:55.648Z",
  "error": null
}
```

```json
{
  "imageUrl": "https://raw.githubusercontent.com/JaidedAI/EasyOCR/master/examples/chinese.jpg",
  "text": "西\n\n315\n\n愚园路\n\n东\n\n309\n\nW\n\nYuyuan Rd.\n\nE",
  "language": "zh-Hans",
  "languageName": "Simplified Chinese",
  "hasText": "Yes",
  "paragraphCount": 8,
  "lineCount": 8,
  "wordCount": 11,
  "charCount": 22,
  "imageWidth": 640,
  "imageHeight": 339,
  "lines": [
    { "paragraph": 3, "text": "愚园路", "x": 191, "y": 85, "width": 265, "height": 67, "rotation": 0, "wordCount": 3 }
  ],
  "scrapedAt": "2026-09-02T22:04:54.370Z",
  "error": null
}
```

```json
{
  "imageUrl": "https://raw.githubusercontent.com/JaidedAI/EasyOCR/master/examples/french.jpg",
  "text": "←\n\nMairie du lor\n\nPalais du LOUVRE\n\nLES ARTS DÉCORATIFS\n\nMusée du LOUVRE",
  "language": "fr",
  "languageName": "French",
  "hasText": "Yes",
  "paragraphCount": 6,
  "lineCount": 7,
  "wordCount": 18,
  "charCount": 77,
  "imageWidth": 692,
  "imageHeight": 1024,
  "paragraphs": [
    { "index": 1, "text": "←", "writingDirection": "Top to bottom", "lineCount": 1, "x": 71, "y": 247, "width": 29, "height": 35, "rotation": -90.6 },
    { "index": 2, "text": "Mairie du lor", "writingDirection": "Left to right", "lineCount": 1, "x": 217, "y": 228, "width": 150, "height": 29, "rotation": -6.3 }
  ],
  "scrapedAt": "2026-09-02T22:04:55.430Z",
  "error": null
}
```

### ✨ Why choose this Actor

- 🧭 **Word-level boxes with rotation.** Every word carries `x`, `y`, `width`, `height` and `rotation` in degrees, mapped back to the original image size.
- 🌍 **Any script, auto-detected.** English, French, Portuguese, Simplified Chinese and Korean came back correctly labeled in the verification run, with no language hint required.
- ⚡ **No browser, no proxy.** The Actor talks to the Lens recognition API directly, so a typical image takes 0.8 to 2.5 seconds and a run costs almost nothing in compute.
- 🧱 **Robust image fetching.** Images are downloaded by the Actor with browser headers and sent as bytes, so hosts that refuse Google's own fetcher still work. Base64 `data:image` inputs are accepted.
- 💸 **No start fee and no charge for failures.** You pay per image successfully read, nothing per run.

### 📈 How it compares to alternatives

| Feature | Google Lens OCR Scraper | Typical Lens OCR actors | Cloud vision APIs |
|---|---|---|---|
| Word boxes with rotation | ✅ | ⚠️ Lines or words, rarely rotation | ✅ |
| Paragraph writing direction | ✅ | ❌ | ⚠️ |
| Language name in plain English | ✅ | ❌ | ❌ |
| Base64 input | ✅ | ⚠️ | ✅ |
| Start fee per run | ❌ None | $0.002 to $0.01 | n/a |
| Visual matches / reverse image search | ❌ Text only | ⚠️ Some | ❌ |

### 🚀 How to use

1. [Create a free Apify account](https://console.apify.com/sign-up?fpr=vmoqkp) and get $5 of monthly credit.
2. Open the **Google Lens OCR Scraper** and paste your image URLs into **Image URLs**, one per line.
3. Set **Max Items** if you want to read only the first N images.
4. Leave **Include word boxes** on for per-word coordinates, or switch it off for smaller rows.
5. Click **Start**. When the run finishes, open the **Dataset** tab and export to CSV, Excel, JSON or XML.

Example input:

```json
{
  "imageUrls": [
    "https://raw.githubusercontent.com/tesseract-ocr/tessdoc/main/images/eurotext.png",
    "https://raw.githubusercontent.com/JaidedAI/EasyOCR/master/examples/english.png"
  ],
  "maxItems": 10,
  "includeWords": true
}
```

### 💼 Business use cases

#### 🧾 Receipts, invoices and forms

Read scanned documents and use the line coordinates to map each value to its label, then push the structured result into your accounting or CRM system.

#### 🛒 Product and shelf photos

Extract brand names, ingredient lists and price tags from marketplace listings or store photos, and compare them against your catalog.

#### 📱 Social media and ad monitoring

Screenshots of posts, stories and ads become searchable text. Track competitor claims, promo codes and disclaimers across thousands of images.

#### 🗂 Archive digitization

Convert posters, signs and historical scans into text with positions, keep the writing direction and rotation, and build a searchable index with highlights.

### 🔌 Automating Google Lens OCR Scraper

- **Make / Zapier**: trigger a run whenever a new image lands in Google Drive, Dropbox or an S3 bucket and write the text back to a sheet.
- **Slack**: post the recognized text of every image shared in a channel.
- **Airbyte**: sync the dataset into your warehouse on a schedule.
- **GitHub Actions**: run OCR on images committed to a repo and fail the build when required text is missing.
- **Google Drive**: batch-process a folder of scans and store the JSON next to each file.

Every run is also available through the [Apify API](https://docs.apify.com/api/v2) and the Apify client libraries for JavaScript and Python.

### 🌟 Beyond business use cases

- 🔬 **Research**: build multilingual OCR datasets with ground-truth positions.
- 🏠 **Personal**: turn photos of recipes, whiteboards and book pages into notes.
- 🤝 **Non-profit**: make image-only flyers and announcements accessible as text.
- 🧪 **Experimentation**: feed word coordinates into layout-aware LLM prompts and compare against other OCR engines.

### 🤖 Ask an AI assistant about this scraper

Paste this into ChatGPT, Claude or Gemini: *"I have a dataset from the Apify Google Lens OCR Scraper with fields text, language, lines and words with x, y, width, height and rotation. Write code that draws the word boxes over the original image."*

### ❓ Frequently Asked Questions

#### 🖼 Which image formats are supported?

JPEG, PNG, WebP, GIF, BMP and TIFF, up to 20 MB per image. Images are downscaled to 1000 px on the long side before recognition; coordinates are mapped back to the original size.

#### 🔗 Can I send base64 images instead of URLs?

Yes. Put a `data:image/png;base64,...` string in the Image URLs list and it is read like any other image.

#### 🌐 Do I need to tell it the language?

No. The language is detected automatically and returned as both a code and a name.

#### 📐 What does `rotation` mean?

The tilt of the text line in degrees, counter-clockwise positive. A vertical line reads as about 90 or -90.

#### 🔍 Does it return visual matches or similar images?

No. This Actor is text recognition only. Google serves the visual-match results page only to interactive browser sessions, so this Actor focuses on what the Lens recognition API returns reliably: text, layout and language.

#### 🖊 Does it read handwriting?

Clear handwriting is often recognized, but accuracy is best on printed text with good contrast.

#### 🧮 What about formulas?

When Google recognizes a formula, the word carries an extra `latex` field.

#### 💵 Am I charged for images that fail?

No. Failed images produce an `error` row and are never charged.

#### 🚦 Is there a rate limit?

None was hit at 5 parallel images. You can raise **Concurrency** up to 20; lower it if you see API errors.

#### 🛡 Do I need a proxy?

No. The recognition API is open. A proxy option exists in case your own network is restricted.

#### 📦 How do I get the results?

Open the run, click **Dataset** and export CSV, Excel, JSON or XML, or fetch them through the API.

### 🔌 Integrate with any app

The dataset is available through the Apify API, webhooks and integrations with Make, Zapier, Slack, Airbyte, Google Drive, GitHub and more.

### 🔗 Recommended Actors

- [Google Search Scraper](https://apify.com/parseforge/google-search-scraper)
- [Google News Scraper](https://apify.com/parseforge/google-news-scraper)
- [Google Trends Scraper](https://apify.com/parseforge/google-trends-scraper)
- [Google Patents Scraper](https://apify.com/parseforge/google-patents-scraper)

> 💡 **Pro Tip:** browse the complete [ParseForge collection](https://apify.com/parseforge).

**🆘 Need Help?** [Open our contact form](https://tally.so/r/BzdKgA)

> **⚠️ Disclaimer:** This is an independent tool and is not affiliated with, endorsed by, or connected to Google. It only processes images you provide and uses publicly reachable services.

# Actor input Schema

## `imageUrls` (type: `array`):

Public image URLs (JPEG, PNG, WebP, GIF, BMP, TIFF) or data:image/...;base64 strings. One result row per image.

## `maxItems` (type: `integer`):

Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000

## `includeWords` (type: `boolean`):

Add a words array (text + pixel box + rotation) to every line. Makes rows larger.

## `concurrency` (type: `integer`):

How many images are processed in parallel.

## `proxyConfiguration` (type: `object`):

Optional Apify Proxy settings used both to download the images and to call the Lens API.

## Actor input object example

```json
{
  "imageUrls": [
    "https://raw.githubusercontent.com/tesseract-ocr/tessdoc/main/images/eurotext.png",
    "https://raw.githubusercontent.com/JaidedAI/EasyOCR/master/examples/english.png",
    "https://raw.githubusercontent.com/JaidedAI/EasyOCR/master/examples/chinese.jpg"
  ],
  "maxItems": 10,
  "includeWords": true,
  "concurrency": 5,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

Key fields: image, text, language, counts

## `fullData` (type: `string`):

Complete dataset with all 15 fields including paragraph, line and word boxes

# 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 = {
    "imageUrls": [
        "https://raw.githubusercontent.com/tesseract-ocr/tessdoc/main/images/eurotext.png",
        "https://raw.githubusercontent.com/JaidedAI/EasyOCR/master/examples/english.png",
        "https://raw.githubusercontent.com/JaidedAI/EasyOCR/master/examples/chinese.jpg"
    ],
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/google-lens-scraper").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 = {
    "imageUrls": [
        "https://raw.githubusercontent.com/tesseract-ocr/tessdoc/main/images/eurotext.png",
        "https://raw.githubusercontent.com/JaidedAI/EasyOCR/master/examples/english.png",
        "https://raw.githubusercontent.com/JaidedAI/EasyOCR/master/examples/chinese.jpg",
    ],
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("parseforge/google-lens-scraper").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 '{
  "imageUrls": [
    "https://raw.githubusercontent.com/tesseract-ocr/tessdoc/main/images/eurotext.png",
    "https://raw.githubusercontent.com/JaidedAI/EasyOCR/master/examples/english.png",
    "https://raw.githubusercontent.com/JaidedAI/EasyOCR/master/examples/chinese.jpg"
  ],
  "maxItems": 10
}' |
apify call parseforge/google-lens-scraper --silent --output-dataset

```

## MCP server setup

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

```

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/Sv5WliUidCF2FLF4Q/builds/UmONBlHgX17dYNTiy/openapi.json
