🔍 Google Images Scraper Bookmarklet

Quickly extract all image URLs from Google Image search results with a single click!

📦 Installation

Drag this button to your bookmarks bar:

Scrape Google Images

Or manually create a bookmark with the URL set to the JavaScript code below:

✨ Features

📖 How to Use

  1. Go to Google Images and search for any topic
  2. Click the bookmarklet in your bookmarks bar
  3. Wait for the "X Image URLs copied" notification
  4. Paste the URLs anywhere (text editor, spreadsheet, etc.)

💡 Use Cases

⚠️ Important Notes:

🔧 Technical Details

View Source Code (Formatted)
javascript:!function(){
    // Check if on Google Images page
    if(!window.location.href.startsWith("https://www.google.com/search")){
        alert("This tool only works with a Google Images results page. Please perform a Google image search and try again.");
        return
    }
    
    // Create mouse event to trigger image loading
    var e = new MouseEvent("mouseover", {
        bubbles: true,
        cancelable: true,
        view: window
    });
    
    // Find all image containers
    var o = document.querySelectorAll("h3.ob5Hkd");
    var r = [];
    
    // Trigger mouseover to load images
    o.forEach(function(o){
        var r = o.querySelector("a div");
        if(r) r.dispatchEvent(e)
    });
    
    // Extract URLs after a delay
    setTimeout(() => {
        o.forEach(function(e){
            var o = e.querySelector("a");
            if(o && o.href.includes("/imgres?")){
                console.log(o.href);
                var t = new URL(o.href).searchParams.get("imgurl");
                if(t) r.push(t)
            }
        });
        
        if(r.length === 0){
            alert("No image URLs found.");
            return
        }
        
        // Copy to clipboard
        navigator.clipboard.writeText(r.join("\n"))
            .then(function(){
                alert(r.length + " Image URLs copied to your clipboard")
            })
            .catch(function(e){
                console.error("Could not copy text: ", e);
                alert("Failed to copy image URLs to the clipboard.")
            })
    }, 1000)
}();

🎯 Pro Tips


Created by PropelDMS | View on GitHub