DEV Community

Cover image for Google Images Scraper: How to Bulk-Export Image Search Results as JSON in 2026
Truffle Pig Data
Truffle Pig Data

Posted on

Google Images Scraper: How to Bulk-Export Image Search Results as JSON in 2026

Google Images is the biggest visual index there is, and getting results out of it in bulk is weirdly hard. The grid scrolls forever, thumbnails are inlined, and the full-size URL hides until you click each result. I needed a few thousand image rows for a dataset once and burned a weekend on it. This post covers the manual route and its failure points, then the shortcut: the Google Images API on Apify, which takes a list of queries and returns one clean JSON row per image at $0.10 per 1,000 results.

Disclosure: the Apify links in this post are affiliate links. If you run the Actor, I may earn a referral commission at no extra cost to you.

Does Google Images have an API?

Sort of, and that is the problem. Google's developer route is the Custom Search JSON API, which can return image results, but it wants a configured search engine, an API key, daily quotas, and paid tiers once you pass the free allowance. For bulk work, the quota math stops making sense fast. A scraper consumed like an API skips the setup: send queries, get image rows back, no key configuration, priced per image returned.

What the Google Images scraper returns

The Google Images scraper returns one row per image as structured JSON: the full-size image URL with width and height, a thumbnail, the source site and domain, the page the image appears on, and Google's reference URL.

Field Example Notes
imageUrl https://images.example.com/products/57215/golden-retriever-puppy.jpg Full-size file
imageWidth, imageHeight 1047, 699 Pixel dimensions
thumbnailUrl https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9Gc... With its own width and height
source, domain "Photowall", "www.photowall.com" Where the image lives
link https://www.photowall.com/us/golden-retriever-puppy-wallpaper Page the image appears on
query, position "golden retriever puppy", 1 Which query found it, and where it ranked

Every row is tagged with its source query, so multi-query runs stay sortable.

Who this is for

Machine-learning folks building training datasets, SEO and brand teams checking how a product shows up in image search, and designers sourcing reference imagery at a scale no browser tab survives.

The manual way, and where it breaks

The DIY version drives a headless browser: search, scroll the infinite grid, click each thumbnail to coax out the full-size URL, parse, repeat. It breaks in layers. The grid loads through JavaScript, so plain requests see almost nothing. The inline thumbnails are compressed stand-ins, so skipping the click step leaves you with junk resolution. Scrolling thousands of results in a real browser is slow, and Google throttles it anyway. By the time you add proxies and retries, the scraper is a bigger project than the dataset.

The faster way: run the Google Images scraper

Apify Console

  1. Open the Google Images API and click Try for free.
  2. Enter one or more queries and set maxResultsPerQuery.
  3. Run it and export the dataset as JSON, CSV, or Excel.

No Google API key involved at any step; the task Get Google Images results without an API key makes that point in one click.

REST

curl -X POST "https://api.apify.com/v2/acts/johnvc~google-images-api/runs?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "queries": ["golden retriever puppy"], "maxResultsPerQuery": 50, "gl": "us", "hl": "en" }'
Enter fullscreen mode Exit fullscreen mode

Run endpoint reference: the Apify API docs.

Get Google Images results in Python

from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")

run = client.actor("johnvc/google-images-api").call(
    run_input={
        "queries": ["golden retriever puppy", "eiffel tower at night"],
        "maxResultsPerQuery": 100,
        "gl": "us",
        "hl": "en",
    }
)

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["imageUrl"], f'{item["imageWidth"]}x{item["imageHeight"]}', item["domain"])
Enter fullscreen mode Exit fullscreen mode

A runnable version lives in the task Get Google Images results in Python.

Build an image dataset for machine learning

Build image dataset for machine learning batches many queries into one run, which is how you get class-labeled rows for a training set. There is a Chinese-language version of the same recipe: AI training image dataset.

Export image results to CSV

Spreadsheet people are covered twice over: Download Google Images results to CSV, Export Google Images results to CSV, and the Chinese-language bulk CSV export.

Find high-resolution images by keyword

Find high resolution images by keyword filters on the returned imageWidth and imageHeight, so you keep only rows big enough for print or hero images.

Track image rankings over time

Image SERPs move like web SERPs do. Track Google Images rankings reruns the same queries and watches position per domain, which tells you whether your product shots are gaining or losing ground.

Pull image results into n8n

Pull Google Images into n8n drops the Actor into an n8n workflow, so image rows can feed a database, a report, or an alert without custom glue.

Use it from Claude and other MCP clients

The Actor is MCP-ready. Add the Apify MCP server (https://mcp.apify.com/?tools=actors,docs,johnvc/google-images-api) and Claude, Claude Code, or Cursor can fetch a hundred image rows mid-conversation. The task Run image SERP research in Claude via MCP shows the setup, and claude.ai is where to start if you have not run Claude with tools yet.

FAQ about scraping Google Images

How much does the Google Images scraper cost?

A flat $0.0001 per image returned, which is $0.10 per 1,000 images, with no setup fee, no per-run fee, and no monthly minimum. You pay only for rows you actually receive, and maxResultsPerQuery caps each query before the run starts.

Does the scraper download the actual image files?

No. You get imageUrl and thumbnailUrl for every row and fetch the files yourself if you need them. That keeps runs fast and cheap, and it leaves hosting decisions with you.

Can this scraper do reverse image search?

No, it takes text queries only. If you need to find where an image appears, that is a different job; the Yandex Reverse Image Search Actor handles that direction.

Can Claude run the Google Images scraper through MCP?

Yes. Connected through the Apify MCP server, it shows up as a callable tool, so "get me 100 image results for vintage road bikes" returns rows instead of a description of rows.

Can I schedule the scraper to monitor image rankings?

Yes. Save your queries as a task, attach an Apify Schedule, and compare position across runs. Start from the Google Images API.

Why did the scraper return fewer images than I asked for?

maxResultsPerQuery is a ceiling, not a guarantee. Niche queries run out of matching images, the run stops early, and you are not charged for rows that never existed.

More from Truffle Pig Data

Related Actors from the same shelf, all returning structured JSON: Yandex Reverse Image Search for the reverse direction, Google Short Videos API for short-form video results, and the Google News API for headlines.

Wrapping up

Bulk image search data does not need a headless browser or a quota spreadsheet. Point the Google Images API at your queries and get rows back for a dime per thousand.

Top comments (0)