Google Lens avatar

Google Lens

Try for free

Pay $10.00 for 1,000 images

View all Actors
Google Lens

Google Lens

alexey/google-lens
Try for free

Pay $10.00 for 1,000 images

Google Lens API alternative with no limits. Use this OCR shortcut to recognize text on the image, find alt text, identify language, recognize image type, find similar products and visuals by image URL. Just copy-paste an image URL you need OCR data from.

This Actor is an unofficial Google Lens API capable to identify text on images, recognize objects on images even without text, and search by images. Provided with an image URL, this Google Lens API will extract the image type, an array of OCR text fragments, locale, and optional site links for visual matches.

What is a Google Lens Actor and what does it do?

It does pretty much the same thing as Google Lens itself except it also provides you with programmatic access to the results, namely the results of:

🔍 OCR, text and alt text recognition, and translation

🎁 Object recognition and classification

🕵️‍ Reverse image search

📚 Converting images into text

💽 Double use as Google Lens API

How do I get OCR data from Google Lens?

  1. Create a free Apify account using your email.
  2. Open Google Lens Actor.
  3. Find an image link.
  4. Feed the image link to the Actor.
  5. Click "Start" and wait for the data to be extracted and matched.
  6. Download your Google Lens data in JSON, XML, CSV, Excel, or HTML.

If you need guidance on how to run the scraper, you can follow our step-by-step tutorial 🔗

How can I use Google Lens Actor?

🦾 Bootstrap AI training with image datasets

🪞 Find similar products and visuals

✨ Support creative work such as graphic or web design

🔦 Detect specific content across the web

Input example

The input for Google Lens API should be an image URL you need OCR data from. The image can be from anywhere on the web: blog, newspaper, e-shop, social media posts such as Instagram or Twitter, etc. You can add one or multiple image URLs with an image format at the end such as .png or .jpg. See the input tab for a full explanation of input in JSON.

1{
2    "startUrls": [
3        { "url": "https://hips.hearstapps.com/hmg-prod/images/two-glasses-of-wine-and-summer-fruits-on-the-beach-royalty-free-image-1635272439.jpg" },
4        { "url": "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDXLWcWMSy7iTEEmJZmwDG7mzCXNjB0NJ-M33XyIPmEHu7EAN7NTQF6wrxI5O895zmRo9KReAAi2eoeQFE_W6WqmCc-IeKa9L2wCJ9fyijXwLlYzNQAv3BMRK0yQmqQbG_g3wbg1tTcsWO-AGH6TRtcA1ZXYT102FGAngVS9KHNXBvcYuUT6I77cYt/s4032/SeoulProSoyFront.JPG" }
5    ],
6    "addMatchedImageSources": true
7}

Output example

The results will be wrapped into a dataset which you can find in the Storage tab. You can choose in which format to download your Google Lens data: JSON, JSONL, Excel spreadsheet, HTML table, CSV, or XML.

Images containing text

If the image has text on it, you can easily get all the OCR data. Moreover, if your image includes a product type known to Google Lens, you will get a short imageType description:

1[{
2  "url": "https://www.maisonmargiela-fragrances.eu/dw/image/v2/BDCR_PRD/on/demandware.static/-/Sites-margiela-master-catalog/default/dw3fbc4479/images/products/MM003/MM003_002.jpg?sw=750&sh=750&sm=cut&sfrm=jpg&q=70",
3  "imageType": "MAISON MARGIELA Replica Eau De Toilette Spray",
4  "ocrTextLocale": "en",
5  "ocrText": [
6    "Musc",
7    "REPLICA",
8    "REPRODUCTION OF FAMILIAR SCENTS AND MOMENTS OF VARYING LOCATIONS AND PERIODS",
9    "Originally:",
10    "Beach Walk",
11    "Calvi 1972",
12    "Provenance and Period:Fragrance Description:Style Description:",
13    "Sun kissed salty skin",
14    "Female fragrance",
15    "Maison Margiela PARIS",
16    "Bergamot",
17    "Coconut Milk",
18    "Ylang Ylang"
19  ],
20  "matchesCount": 42
21}]

Images containing no text

In case there is no text on the image to be scanned and referred to, you might still get an imageType in description if it is known to Google Lens.

1{
2	"url": "https://hips.hearstapps.com/hmg-prod/images/index1-1605618242.jpg",
3	"imageType": "Pierce Brosnan",
4	"matchesCount": 60
5}

Image matches found

Sometimes the imageType cannot be identified. In that case, you can also search for visual matches without spending extra CUs. However, please note that the resulting matches wouldn't be direct image links but thumbnails, a.k.a static images generated by Google. You can use the matched images as a reference or as a wide guess for cases when the image can not be recognized as specific type.

1{
2  "url": "https://blog.apify.com/content/images/size/w600/2023/03/Screenshot-2023-03-20-at-17.01.39-1.png",
3  "imageType": "Unknown Type",
4  "matchesCount": 60,
5  "matches": [
6    {
7      "thumb": "https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcTLT_m1JfUJQp4UY_HfbAFOMJleG7gxh88GHoDZuQgjhBo858gD",
8      "websiteTitle": "Coming soon: National Opportunity Zones Marketplace - Smart Growth America",
9      "websiteUrl": "https://smartgrowthamerica.org/coming-soon-national-opportunity-zones-marketplace/"
10    },
11    {
12      "thumb": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQinUS15ZYiWRAv8E46mcoYelLBej6nkyA9hVwikCqJzoim0KKp",
13      "websiteTitle": "Zones (green) and corridors (red lines) of clusters of inner city... | Download Scientific Diagram",
14      "websiteUrl": "https://www.researchgate.net/figure/Zones-green-and-corridors-red-lines-of-clusters-of-inner-city-biophilic-elements-in_fig2_337842964"
15    },
16    {
17      "thumb": "https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcSsoteufMUU8fSATFX6TuInnLbUlD_FlocAmUMe1F915z6gyTsm",
18      "websiteTitle": "Climate Change and The Greenway - The Rose Kennedy Greenway",
19      "websiteUrl": "https://www.rosekennedygreenway.org/climate-change-and-the-greenway/"
20    },
21    {
22      "thumb": "https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcQsxZhcKPyZLqJbrRuGkt23zHm_naRzeXPJlgYbwyWa2SoZ9EnN",
23      "websiteTitle": "Archive: Governor Andrew Cuomo on Twitter: \"We have a clear and effective plan to respond to any clusters that threaten our progress. We will attack each area in the cluster with appropriate restrictions. Here is the map of the Brooklyn cluster along with the rules. https://t.co/xdV84gcQJg\" / Twitter",
24      "websiteUrl": "https://twitter.com/NYGovCuomo/status/1313588620264124416"
25    },
26    {
27      "thumb": "https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcRQ59PgMbOgex0LAFBVw4GKkjzdHt0oZ6RMliw6eRogTDZow7BD",
28      "websiteTitle": "(PDF) Predicting Taxi and Uber Demand in Cities: Approaching the Limit of Predictability",
29      "websiteUrl": "https://www.researchgate.net/publication/337876513_Predicting_Taxi_and_Uber_Demand_in_Cities_Approaching_the_Limit_of_Predictability"
30    }
31  ]
32}

Need more Google scraping tools?

You can use the dedicated scrapers below if you want to scrape specific Google data. Each of them is built particularly for the relevant Google scraping case be it Maps, Trends, Reviews, or Google Search itself. Feel free to browse them:

🗺 Google Maps with Contact Details🎮 Google Play Scraper
🔍 Google Search Results Scraper📈 Google Trends Scraper
💼 Google Jobs Scraper📰 Google News Scraper
📍 Google Maps Scraper🤖 AI Text Analyzer for Google Reviews

Our Google scrapers are ethical and do not extract any private user data, such as email addresses, gender, or location. They only extract what the user has chosen to share publicly. However, you should be aware that your results could contain personal data. You should not scrape personal data unless you have a legitimate reason to do so. If you're unsure whether your reason is legitimate, consult your lawyers. You can also read our blog post on the legality of web scraping and ethical scraping.

Your feedback

We’re always working on improving the performance of our Actors. So if you’ve got any technical feedback for Google Lens Scraper or simply found a bug, please create an issue on the Actor’s Issues tab in Apify Console.

Developer
Maintained by Community

Actor Metrics

  • 26 monthly users

  • 12 stars

  • >99% runs succeeded

  • Created in Feb 2023

  • Modified a year ago

Categories