# Google Lens OCR — Image to Text & Word Boxes (`sian.agency/google-lens-data-scraper`) Actor

Extract visible text from a public image URL with Google Lens OCR. Get the recognized text, language and available paragraph, sentence and word boxes in one image record. Export JSON, CSV or Excel. This actor handles image-to-text only; it does not search for visual matches or products.

- **URL**: https://apify.com/sian.agency/google-lens-data-scraper.md
- **Developed by:** [SIÁN OÜ](https://apify.com/sian.agency) (community)
- **Categories:** AI, Developer tools, Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $125.72 / 1,000 completed ocr image records

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?

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 OCR — Image to Text 🔤

[![SIÁN Agency Store](https://img.shields.io/badge/Store-SI%C3%81N%20Agency-1AE392)](https://apify.com/sian.agency?fpr=sian) [![Reverse Image Search](https://img.shields.io/badge/Store-Reverse%20Image%20Search-1AE392)](https://apify.com/sian.agency/reverse-image-search-scraper?fpr=sian) [![Google Maps Photos](https://img.shields.io/badge/Store-Google%20Maps%20Photos-4285F4)](https://apify.com/sian.agency/google-maps-photos-scraper?fpr=sian) [![Google Autocomplete](https://img.shields.io/badge/Store-Google%20Autocomplete-4285F4)](https://apify.com/sian.agency/google-search-autocomplete-scraper?fpr=sian)

#### 🔤 Read one public image and export its recognized text

##### For researchers, editors and teams working with image text

### 🔎 What is the Google Lens OCR — and when should you use it?

The **Google Lens OCR** turns a public HTTPS image URL into clean, structured rows you can filter, export and feed straight into a spreadsheet, database or AI agent. No account, no portal API key, no browser automation to maintain.

**Use it when you need:** recognized text, detected language and available paragraph, sentence and word boxes from one public image.

**Use something else when:** you need matching web pages for an image. Use [Reverse Image Search Scraper](https://apify.com/sian.agency/reverse-image-search-scraper?fpr=sian) for reverse-image page matching. This actor extracts text only. It does not perform visual search, object detection or PDF processing.

### 🤖 Use with AI agents

Already connected to the [Apify MCP server](https://mcp.apify.com)? Just ask for this Actor by name: sian.agency/google-lens-data-scraper

**Agentic payments:** Availability of [x402](https://www.x402.org/) and [Skyfire](https://www.skyfire.xyz/) depends on this Actor's current Store eligibility. Check the published listing for supported payment methods. One image with recognized non-empty text is one OCR-image event. Images without recognized text and failed retrievals have no OCR-image charge. A separate run-start fee applies.

Otherwise copy this prompt into Claude, ChatGPT, Cursor or any MCP-enabled assistant:

```text
I want image-to-text exports for research and editorial review using the Apify Actor `sian.agency/google-lens-data-scraper`.

Use it when I need: recognized text, detected language and available paragraph, sentence and word boxes from one public image.

Don't use it when: you need matching web pages for an image — use reverse-image-search-scraper instead.

How to call it: set operation to ocr and supply imageUrl. Inspect text and the full paragraphs array in the output record.

Start with this input:
{
  "operation": "ocr",
  "imageUrl": "https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"
}

Ask me which public image URL they want read, then run the Actor and summarise the results as a table.
```

**Things you can ask your agent for:**

- *Read the text in this public image and preserve its source URL.*
- *Export recognized text and word boxes from this screenshot to JSON.*
- *Show the words recognized in this image so I can check them against the original.*

Machine-readable API, MCP config and OpenAPI definition for this Actor are published at [apify.com/sian.agency/google-lens-data-scraper.md](https://apify.com/sian.agency/google-lens-data-scraper.md).

### 📋 Overview

Google Lens OCR turns a public image URL into recognized text and available paragraph, sentence and word boxes. The text and box hierarchy stay together in one image record. Use JSON to preserve that structure.

- 🔤 **Text export:** get the recognized words without a generated summary.
- 📐 **Word boxes:** keep the available position fields for your own analysis.
- 🖼️ **Image preview:** inspect the source image beside its text.
- 💰 **Clear billing:** one image event when non-empty text is returned.
- 📊 **Exports:** download JSON, CSV or Excel from Apify.
- 📄 **Processing report:** review image counts and accepted charges.

### ✨ Features

- 🖼️ **Public image input:** paste one HTTPS image URL.
- 🔤 **Complete text:** retain the recognized text as returned.
- 📐 **Box hierarchy:** preserve paragraphs, sentences and words together.
- 🗣️ **Detected language:** keep it when the result includes one.
- 📏 **Character count:** see the size of the returned text.
- 🕒 **Retrieval date:** record when the image was read.
- 📄 **JSON export:** retain nested box data without flattening.

This actor handles image-to-text only. It does not return visual matches, products, objects or knowledge panels. Text recognition can contain mistakes; check the image before quoting it.

### 🎬 Quick Start

Open the actor in Apify Console and use the prefilled Google logo image. Press Start and inspect the recognized text. The example returns “Google” with its available word box.

```json
{
  "operation": "ocr",
  "imageUrl": "https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"
}
```

### 🚀 Getting Started

#### Step 1: Choose an image

Use a public HTTPS image URL containing clear text. Private links, PDFs, local files and sign-in pages are not supported.

#### Step 2: Start the run

Submit one image URL. This focused version reads one image per run.

#### Step 3: Inspect the text

Compare the recognized text with the image. Download JSON when you need the full box structure.

### 📥 Input Configuration

| Field | Type | Meaning |
|---|---|---|
| operation | string | ocr |
| imageUrl | string | Public HTTPS image containing readable text |

The image field has a Console prefill. API calls must supply an imageUrl. There are no language, image-processing or visual-search controls in this version.

### 📤 Output

| Field | Type | Meaning |
|---|---|---|
| imageUrl | string | Requested public image |
| text | string | Recognized non-empty text |
| characterCount | integer | Text length |
| paragraphCount | integer | Returned paragraph count |
| paragraphs | array | Full paragraph, sentence and word hierarchy |
| language | string/null | Detected language when available |
| processedAt | string | ISO 8601 processing timestamp |
| scrapingDate | string | UTC processing date (YYYY-MM-DD) |
| status | string | Record status |

```json
{"imageUrl":"https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png","text":"Google","characterCount":6,"paragraphCount":1,"language":"en","status":"success"}
```

The example omits the paragraph structure for brevity. Actual records preserve every returned box. Coordinates are provided as returned; this actor does not convert or calibrate their geometry.

### 💼 Use Cases & Examples

#### 1. Screenshot text export

Researchers can turn a public screenshot URL into text for their notes. Keep the image URL beside the export so the words can be checked.

#### 2. Image text review

Editors can inspect the recognized text before quoting an image. Check the original: recognition can contain mistakes.

#### 3. Word location research

Developers can inspect the paragraph, sentence and word boxes returned with the text. Test the coordinates against the original image before using them in a layout.

#### 4. Catalog text checks

Retail teams can compare visible image text with their own catalog records. This actor exports text; it does not identify products or correct the catalog.

#### 5. Research archives

Analysts can save the text with its image URL and retrieval date. Only submit images you are authorized to process.

#### 6. Spreadsheet workflows

Operations teams can send the text field into a spreadsheet. Use JSON when the next step also needs the complete box structure.

### 🔗 Integration Examples

#### JavaScript

```javascript
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_TOKEN' });
const run = await client.actor('sian.agency/google-lens-data-scraper').call({"operation": "ocr", "imageUrl": "https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items[0].text);
```

#### Python

```python
from apify_client import ApifyClient
client = ApifyClient('YOUR_TOKEN')
run = client.actor('sian.agency/google-lens-data-scraper').call(run_input={"operation": "ocr", "imageUrl": "https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"})
for item in client.dataset(run['defaultDatasetId']).iterate_items():
    print(item['text'])
```

#### cURL

```bash
curl -X POST 'https://api.apify.com/v2/acts/sian.agency~google-lens-data-scraper/runs?token=YOUR_TOKEN' \
-H 'Content-Type: application/json' -d '{"operation": "ocr", "imageUrl": "https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"}'
```

#### Automation Workflows (N8N / Zapier / Make)

1. Trigger a workflow with an image URL you are authorized to process.
2. Start the actor with an HTTP request.
3. Wait for the run and read the dataset.
4. Save the text and source URL to your notes, spreadsheet or database.

### 📊 Performance & Pricing

An image with non-empty recognized text produces one record and one OCR-image event. Images without recognized text and failed retrievals have no OCR-image charge. A separate run-start fee applies, including invalid input and early stops.

| Apify plan | Per image with text | Run start |
|---|---:|---:|
| Free | $0.57144 | $0.020 |
| Bronze | $0.14286 | $0.005 |
| Silver | $0.13429 | $0.005 |
| Gold | $0.12572 | $0.005 |

Enterprise customers should check their live quote. One image is read per run on every plan. Processing time and recognition quality depend on the image. No accuracy percentage or processing-time guarantee is offered.

[Check current pricing](https://apify.com/sian.agency/google-lens-data-scraper?fpr=sian).

### ❓ Frequently Asked Questions

**Does this perform reverse image search?**

No. This actor extracts text only. Use the Reverse Image Search Scraper when you need matching pages.

**What images are supported?**

Supply a public HTTPS image URL with readable text. Sign-in links, local files, PDFs and private images are not supported.

**Are empty images charged?**

No OCR-image event applies when recognized text is absent. The platform run-start fee applies separately.

**Are word boxes exact?**

The returned boxes are preserved as provided. Test them against your own images before relying on them for layout or measurement.

**Does this support multiple images?**

This focused version retrieves one image per run. You can schedule or orchestrate separate runs in your workflow.

**Can I export the full boxes?**

Yes. JSON retains the paragraph, sentence and word structures. CSV and Excel are useful for the image text fields.

### 🐛 Troubleshooting

**No readable text was returned**

Check that the image opens publicly and contains clear text. Try a sharper image or a tighter crop. No OCR-image event is charged when text is absent.

**The image URL was rejected**

Use HTTPS without embedded credentials or a custom port. Local addresses and private-network targets are not accepted.

**The run stopped before reading the image**

Check credits and the run budget. Free API-origin runs are restricted; use Console or MCP for evaluation.

**Box positions do not match my display**

The box values are preserved without conversion. Test them against the original image dimensions and your own display before using them for layout calculations.

### ⚖️ Legal Disclaimer

Google and Google Lens are trademarks of Google LLC. SIÁN Agency is independent and is not endorsed by Google. Supply images you are authorized to process. Images and recognized text can contain personal data; check your purpose and applicable rules, including GDPR, before sharing the results.

Read Apify’s [web scraping legal guide](https://blog.apify.com/is-web-scraping-legal/) for background.

### 🤝 Support

Open an [issue](https://apify.com/sian.agency/google-lens-data-scraper/issues) with the run link and an image you are allowed to share. Avoid posting private images or account tokens.

Email <apify@sian-agency.online>. See more tools in the [SIÁN Agency Store](https://apify.com/sian.agency?fpr=sian).

**Built by [SIÁN Agency](https://www.sian-agency.online)**

# Changelog

This Actor's version history is a separate document: https://apify.com/sian.agency/google-lens-data-scraper/changelog.md

# Actor input Schema

## `operation` (type: `string`):

Extract recognized text and available paragraph, sentence and word boxes from one public HTTPS image.

## `imageUrl` (type: `string`):

🖼️ Enter a public HTTPS URL for an image containing readable text. The prefilled example reads the Google logo. Private links, sign-in pages, PDFs and local files are not supported. Images with no recognized text produce retry advice without an OCR-image charge.

## Actor input object example

```json
{
  "operation": "ocr",
  "imageUrl": "https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"
}
```

# Actor output Schema

## `googleLensOcrRecords` (type: `string`):

Google Lens OCR image records containing text, detected language and available word boxes.

## `scrapingSummary` (type: `string`):

HTML summary showing successful and failed results with key metrics

# 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 = {
    "operation": "ocr",
    "imageUrl": "https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"
};

// Run the Actor and wait for it to finish
const run = await client.actor("sian.agency/google-lens-data-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 = {
    "operation": "ocr",
    "imageUrl": "https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png",
}

# Run the Actor and wait for it to finish
run = client.actor("sian.agency/google-lens-data-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 '{
  "operation": "ocr",
  "imageUrl": "https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"
}' |
apify call sian.agency/google-lens-data-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,sian.agency/google-lens-data-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/qcGGiCyaHYRBJW1ru/builds/hYQ8doJLpsFK9uaXt/openapi.json
