npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

image-reverse-search

v2.0.0

Published

A powerful and easy-to-use library for performing reverse image searches using Google Lens with Puppeteer

Downloads

13

Readme

Image Reverse Search

npm npm

A powerful and easy-to-use TypeScript library for performing reverse image searches using Google Lens with Puppeteer.

Features

  • 🔍 Reverse image search using Google Lens
  • 🎯 Extract titles, links, sources, and images from search results
  • ⚙️ Configurable wait times and browser options
  • 🤖 Anti-detection measures with human behavior simulation
  • 📦 Full TypeScript support with type definitions
  • 🚀 Built on Puppeteer for reliable browser automation
  • 🎨 Clean and simple API

Installation

npm install image-reverse-search

Usage

Basic Example

import { reverseImageSearch } from 'image-reverse-search';

const imageUrl = 'https://example.com/image.jpg';
const results = await reverseImageSearch(imageUrl);
console.log(results);

With Options

const results = await reverseImageSearch('https://example.com/image.jpg', {
  waitTime: 8000,
  headless: 'new',
  humanBehavior: true,
  viewport: { width: 1920, height: 1080 }
});

API

reverseImageSearch(imageUrl, options?)

| Option | Type | Default | Description | |--------|------|---------|-------------| | waitTime | number | 5000 | Time in ms to wait for page load | | headless | boolean | 'new' | 'new' | Puppeteer headless mode | | viewport | object | { width: 1080, height: 1920 } | Browser viewport size | | humanBehavior | boolean | true | Simulate human-like mouse movements |

Result Type

interface ReverseImageSearchResult {
  title: string;
  link: string;
  source: string;
  image: string;
}

Troubleshooting

CAPTCHA / "Unusual Traffic" Errors

Google may show CAPTCHA challenges. To reduce this:

  • Add delays - Wait 30-60 seconds between searches

  • Enable human behavior (default):

    reverseImageSearch(url, { humanBehavior: true });
  • Use residential proxies - Datacenter IPs are flagged more

  • Increase wait time:

    reverseImageSearch(url, { waitTime: 10000 });
  • Run visible browser:

    reverseImageSearch(url, { headless: false });

Note: For production at scale, use Google Cloud Vision API.

No Results

  • Increase waitTime (try 8000-10000ms)
  • Ensure image URL is publicly accessible
  • Try headless: false to debug
  • Check if image loads in regular browser

Anti-Detection Features

  • Removes navigator.webdriver flag
  • Sets proper Chrome runtime objects
  • Configures realistic browser headers
  • Simulates human mouse movements (optional)
  • Uses latest Chrome user agent
  • Disables automation features

License

MIT

Author

TejasLamba2006

Links

Disclaimer

This library automates Google Lens access. Please comply with Google's Terms of Service. Use responsibly and avoid excessive requests.