Skip to content

About

Reverse image search API for Python and the command line: give a public image URL and get the pages that use it, with title, page URL, site, domain and full-size image, as JSON or CSV. Built on Google Lens matches. Free and open source; no Google API key or proxies needed.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Reverse Image Search API

ci python license dependencies

Find where an image is used on the web, from Python or the command line: give a public image URL (the file, or a page whose preview image is the picture) and get back the matching pages from Google Lens, each with its title, page URL, site name, domain and the full-size image, as JSON or CSV. The code is free and open source (MIT). It runs on the QuanticData Data API, so there is no Google API key to request and no proxy to rotate: sign in once and run a command.

pip install git+https://github.com/quantumproxies/reverse-image-search-api
reverse-image-search login
reverse-image-search search https://www.python.org/static/img/python-logo.png --max-results 20 -o matches.csv

login opens the QuanticData sign-in page in your browser. New accounts get $2 of free usage every month, no card required: create one.

What it scrapes

Command Input Returns Per run
reverse-image-search search image URL Title, page URL, site, domain, full-size image, 8 fields per row (fields and price) up to 40

Sample output

A real row from reverse-image-search search https://www.python.org/static/img/python-logo.png --country us --lang en --max-results 3 (2026-10-23):

{
  "link": "https://www.mybluelinux.com/building-python-real-world-application-part-01-interactive-dictionary/",
  "rank": 2,
  "image": "https://www.mybluelinux.com/img/post/featured-images/0057.python-building_real_world_application.svg",
  "title": "Building Python Real World Application - part 01 - Interactive Dictionary - MyBlueLinux.com",
  "domain": "mybluelinux.com",
  "source": "mybluelinux.com",
  "thumbnail": null,
  "description": "The first application we are going to build is a dictionary."
}

Python

from quanticdata_reverse_image_search_api import ReverseImageSearch

lens = ReverseImageSearch()  # saved login, or QUANTICDATA_API_KEY

matches = lens.search("https://www.python.org/static/img/python-logo.png", max_results=20)
for m in matches:
    print(m["rank"], m["domain"], m["title"], m["link"])

domains = sorted({m["domain"] for m in matches if m.get("domain")})
print(len(domains), "sites use this image")
matches.to_csv("matches.csv")

Each call returns a Run: iterate it for the rows (plain dicts), take len(), or save it with to_csv(), to_json(), to_jsonl() or to_dataframe() (pandas). Errors are specific: InsufficientCredit, RateLimited, InvalidInput, JobFailed, AuthError.

Examples

  • Brand image monitoring: Check your product shots or logo every week, skip your own domains and append only the pages that are new since the last run to a CSV. See examples/brand_image_watch.py.
  • Where an image comes from: Group the matches of one image by site, with the number of pages and the best rank on each, to see who published it first or uses it most. See examples/image_sources.py.
  • Batch reverse search: Read a CSV with a column of image URLs and write every match of every image to one CSV, with the image it belongs to. See examples/batch_search.py.

Command line

Results print as a table; -o file.csv, -o file.json or -o file.jsonl writes a file. List inputs take a b c, a,b,c, @file.txt (one per line) or - (stdin). --no-wait starts a long run in the background and prints its id; reverse-image-search run <id> -o out.csv collects it later.

reverse-image-search search

Find the pages that use a given image — title, page URL, site and full-size image.

reverse-image-search search IMAGE_URL [options]
Option Type Default Description
IMAGE_URL string Public http(s) link to the image: the file itself, or a page whose og:image is the picture (a product or news page, an image host). No login walls; up to 12 MB.
--country string Google market of the search, as an ISO country code (us, gb, de...).
--lang string Interface language, e.g. en, it, de.
--max-results integer 20 How many matches to deliver at most (1 to 40, default 20).

Output fields

reverse-image-search search: 8 fields
Field Type Description
rank integer 1-based position.
title string or null Match title.
link string or null Page the matching image lives on.
source string or null Site name shown on the card.
domain string or null Registrable host of the source page.
image string or null Full-size image URL when exposed.
thumbnail string or null Thumbnail of the matching image, when the publisher hosts one.
description string or null Snippet shown next to the match.

Sign-in and API keys

  • reverse-image-search login signs you in with OAuth 2.1 and PKCE in the browser. The token is stored in ~/.config/quanticdata/credentials.json (readable only by you) and refreshed automatically. One login serves every QuanticData tool on the machine.
  • No browser on the machine (SSH, Docker, Colab): run reverse-image-search login --no-browser, open the link anywhere, then paste back the address the browser ends on.
  • Scripts and CI: set QUANTICDATA_API_KEY to a key from the dashboard, or store one with reverse-image-search login --api-key.
  • reverse-image-search logout revokes the token. The connection is listed under API keys in the dashboard as "API · QuanticData CLI"; deleting that key disconnects every machine that uses it.

Pricing

The code is free and MIT-licensed. Runs are billed to your QuanticData account per delivered row, at the price shown on each collector page linked above; $2 of usage is free every month and failed runs are never billed. Plans with higher limits: pricing.

Other ways to call it

The same data over plain HTTP:

curl -X POST https://api.quanticdata.io/v1/scraper/collectors/google_lens/run \
  -H "Authorization: Bearer $QUANTICDATA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input": {"image_url": "https://www.python.org/static/img/python-logo.png", "country": "us", "lang": "en", "max_results": 3}}'
  • API reference with Python, Node, PHP and curl examples.
  • MCP server to give Claude, Cursor or any MCP client the same tools.
  • n8n node for no-code workflows.

FAQ

Is this reverse image search API free?

The code is free and MIT-licensed. Scraping runs on your QuanticData account: $2 of usage is free every month with no card, then you pay per delivered row at the price shown on each collector page. Failed runs are never billed.

Do I need proxies or a Google API key?

No. There is no Google Cloud project, key or proxy to set up: you send an image URL and get the matching pages back; the requests run on QuanticData's side.

Which images can I search?

Any image reachable by a public http(s) link, up to 12 MB: the file itself, or a public page whose og:image is the picture, such as a product page or a news article.

How many matches does one search return?

Up to 40 per run, 20 by default; set the number with --max-results.

Can I export to CSV or Excel?

Add -o matches.csv (or .json, .jsonl). Each match is one row with rank, title, page link, site, domain and image URLs, so it opens cleanly in Excel or Google Sheets.

Can I run it on a schedule?

Yes. Set QUANTICDATA_API_KEY in the environment and call the CLI or examples/brand_image_watch.py from cron, GitHub Actions or any scheduler.

Related scrapers

License

MIT. Built and maintained by QuanticData.

About

Reverse image search API for Python and the command line: give a public image URL and get the pages that use it, with title, page URL, site, domain and full-size image, as JSON or CSV. Built on Google Lens matches. Free and open source; no Google API key or proxies needed.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages