# Google Image Scraper (`thodor/google-image-scraper`) Actor

Google image scraper is a scraping tool that helps you extract up to 30,000 full-size image URLs from Google Images by keyword.

- **URL**: https://apify.com/thodor/google-image-scraper.md
- **Developed by:** [Thodor](https://apify.com/thodor) (community)
- **Categories:** SEO tools, Automation, Other
- **Stats:** 21 total users, 5 monthly users, 91.3% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 unique image scrapeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

Google image scraper tool to pull every full-size image for a keyword from Google Images — the real image files and their source pages, as JSON or CSV, not gstatic thumbnails. A Google Images API alternative, no API key required.

### Why use this Google image scraper

Most Google Images scrapers return only the first 100 results and give you thumbnail URLs from `encrypted-tbn0.gstatic.com` instead of the actual images. This actor solves both problems. It follows Google's "related images" graph for every result, expanding a single keyword into up to 30,000 unique full-size image URLs, and resolves every URL back to the source webpage so you get the real image file, the page it came from, and the alt text.

**Common use cases:**

- Building image datasets for machine learning and computer vision training
- E-commerce product image research and competitor monitoring
- SEO and brand monitoring: tracking how your product images rank in Google Images across different countries
- Stock photo and creative reference collection
- Reverse image search source discovery

### Features

- **Full-size image URLs:** not `encrypted-tbn0.gstatic.com` thumbnails
- **Related images:** automatically opens the related images page for every found image, massively expanding your results (up to 30,000 in my testing)
- **Structured output:** clean JSON with image URL, source page, title, and relationships
- **Pay only for unique results:** duplicates and nulls don't count, you only get charged for images with a resolved full-size URL

### How to scrape Google Images by keyword

1. Enter your search keyword in the `search_query` field
2. Set `max_results` to how many images you need (up to 30,000)
3. Enable `get_related_images` to follow the related-images graph for maximum volume
4. Optionally set `country` and `language` for geo-targeted results
5. Run the actor and export results from the dataset

#### Two modes: fast or deep

With `get_related_images` **disabled**, the actor returns the first page of Google Images results, the same ~450 images you would see if you typed the keyword into Google Images yourself. This is fast, around 30 seconds, and ideal when you just need a representative sample.

With `get_related_images` **enabled**, the actor clicks into each of those initial images to open Google's "related images" panel (the visually similar images you see when you click a result), and resolves every one of those back to its full-size source URL. This is how it expands a single keyword into up to 30,000 unique images, but resolving that many URLs takes time, expect 45-50 minutes for a full 30k run. Enable it when volume and dataset diversity matter more than turnaround.

### Input

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `search_query` | string | Yes | | Search term for Google Images |
| `max_results` | integer | No | 200 | Maximum total images to collect |
| `get_related_images` | boolean | No | false | Follow visually similar image links to expand results (up to 30k) |
| `country` | string | No | US | Country for search results and proxy geolocation (ISO 3166-1 alpha-2 code) |
| `language` | string | No | en | Language for search results (ISO 639-1 code) |

#### Example input

```json
{
  "search_query": "cat",
  "max_results": 500,
  "get_related_images": true,
  "country": "US",
  "language": "en"
}
````

### Google image scraper in Python

Call this Google image scraper from Python using the Apify SDK:

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_API_TOKEN")

run = client.actor("thodor/google-image-scraper").call(run_input={
    "search_query": "cat",
    "max_results": 500,
    "get_related_images": True,
    "country": "US",
    "language": "en",
})

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["image_url"])

```

### Run times

Actual run times using the keyword "cat". Your times may vary depending on the query and number of available results.

| Mode | Images | Time |
|------|--------|------|
| Without related images | 438 | 0m 32s |
| With related images | 29,870 | 48m 33s |

Without related images, expect ~450 results in about 30 seconds. With related images enabled, expect up to 30,000 results in roughly 45-50 minutes. It's a trade-off between depth and speed, enable related images when volume matters more than turnaround.

### Output

Each result contains:

| Field | Description |
|-------|-------------|
| `image_url` | Full-size image URL (the actual image, not thumbnail) |
| `thumbnail_url` | Google's thumbnail URL |
| `width` | Image width in pixels |
| `height` | Image height in pixels |
| `page_url` | URL of the webpage containing the image |
| `title` | Image title/alt text |
| `related_link` | Google link to visually similar images |
| `search_query` | The search term used |
| `depth_level` | 0 = main results, 1 = from related images |

#### Example output

```json
[
  {
    "image_url": "https://upload.wikimedia.org/wikipedia/commons/thumb/example.jpg",
    "thumbnail_url": "https://encrypted-tbn0.gstatic.com/images?q=tbn:...",
    "width": 1920,
    "height": 1080,
    "page_url": "https://en.wikipedia.org/wiki/Example",
    "title": "Example cat photo",
    "related_link": "https://www.google.com/search?tbs=rimg:...",
    "search_query": "cat",
    "depth_level": 0
  },
  {
    "image_url": "https://example.com/similar-cat.jpg",
    "thumbnail_url": "https://encrypted-tbn0.gstatic.com/images?q=tbn:...",
    "width": 1600,
    "height": 900,
    "page_url": "https://example.com/gallery",
    "title": "Similar cat photo",
    "related_link": "https://www.google.com/search?tbs=rimg:...",
    "search_query": "cat",
    "depth_level": 1
  }
]
```

### Google Image Search API alternative (no API key)

Google discontinued its official Image Search API in 2011. Since then, developers have relied on third-party APIs like SerpApi, Zenserp, and ScrapingBee, all of which require an API key, charge per request, and typically cap out around 100 results per query.

This actor is a Google Image Search API alternative that works differently:

- **No API key to manage**: authenticate with your Apify token, same as any other actor
- **Pay per result, not per request**: you only pay for unique results you actually receive
- **Up to 30,000 results per query**: by following Google's related-images graph instead of stopping at the first results page
- **Full-size source URLs**: resolved back to the origin webpage, not gstatic thumbnails

### FAQ

#### Is there an official Google Images API?

No. Google discontinued its official Image Search API in 2011. This actor works as a Google Image Search API alternative: you send a keyword, you get structured JSON back with full-size image URLs, source pages, and metadata.

#### How is this different from SerpApi or Zenserp?

SerpApi and Zenserp return the first ~100 results per query and charge per request. This actor follows the related-images graph to return up to 30,000 unique images from a single query, and charges per result so you only pay for what you get. No API key to manage either.

#### Can I scrape Google Images by country?

Yes. Set the `country` parameter (ISO 3166-1 alpha-2) and `language` parameter (ISO 639-1). The actor routes through a proxy in the target country so results match what a local user would see, which matters for branded queries, e-commerce, and SEO research.

#### Does it return full-size images or thumbnails?

Full-size original URLs from the source website. The thumbnail URL is included as a separate field if you need it, but the main `image_url` is always the actual image, not a `gstatic.com` thumbnail.

#### Can I export results to CSV or Excel?

Yes. All Apify datasets export to JSON, CSV, Excel, XML, RSS, and HTML from the console, or via the Dataset API.

#### Can I use this Google image scraper with Python?

Yes. Use the Apify Python SDK (`apify-client`) to call the actor, pass your input, and iterate the resulting dataset. See the Python example above.

#### What happens if Google rate-limits my run?

Google may rate-limit requests at very high volumes and abort the request early. The actor will save all results collected up to that point and restart. You only pay for unique results. For maximum reliability, run multiple smaller queries instead of one massive one.

### Limitations

- Google may rate-limit requests for very high volumes, aborting the request early
- **Platform migrations**: If Apify [migrates the run](https://docs.apify.com/academy/expert-scraping-with-apify/migrations-maintaining-state) to a different server, the actor will stop and save all results collected so far. This actor cannot resume after migration because it relies on browser state that cannot be serialized. It will restart.

### Related actors

Scraping a different source? Try the [Bing Images Scraper](https://apify.com/thodor/bing-images) — the same full-size image URL extraction, for Bing Images.

### Support

Something not working as expected? Message me in the Issues tab and I'll look into it as quickly as possible. I'm a solo dev, so don't hesitate to reach out with any other questions.

- Thodor

P.S. If everything works well, please leave a review! And if it doesn't, you don't know me!

# Actor input Schema

## `search_query` (type: `string`):

The search term to use on Google Images

## `max_results` (type: `integer`):

Maximum number of images to scrape

## `get_related_images` (type: `boolean`):

Follow visually similar image links to massively expand results (up to 30k images from a single query)

## `country` (type: `string`):

Country for search results and proxy geolocation (ISO 3166-1 alpha-2 code)

## Actor input object example

```json
{
  "search_query": "cat",
  "max_results": 200,
  "get_related_images": false,
  "country": "US"
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "search_query": "cat"
};

// Run the Actor and wait for it to finish
const run = await client.actor("thodor/google-image-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "search_query": "cat" }

# Run the Actor and wait for it to finish
run = client.actor("thodor/google-image-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "search_query": "cat"
}' |
apify call thodor/google-image-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=thodor/google-image-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Google Image Scraper",
        "description": "Google image scraper is a scraping tool that helps you extract up to 30,000 full-size image URLs from Google Images by keyword.",
        "version": "0.8",
        "x-build-id": "M2WiWrOVDekma2zvU"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/thodor~google-image-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-thodor-google-image-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/thodor~google-image-scraper/runs": {
            "post": {
                "operationId": "runs-sync-thodor-google-image-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/thodor~google-image-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-thodor-google-image-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "search_query"
                ],
                "properties": {
                    "search_query": {
                        "title": "Search Query",
                        "type": "string",
                        "description": "The search term to use on Google Images"
                    },
                    "max_results": {
                        "title": "Max Results",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of images to scrape",
                        "default": 200
                    },
                    "get_related_images": {
                        "title": "Get Related Images",
                        "type": "boolean",
                        "description": "Follow visually similar image links to massively expand results (up to 30k images from a single query)",
                        "default": false
                    },
                    "country": {
                        "title": "Country",
                        "enum": [
                            "US",
                            "GB",
                            "DE",
                            "FR",
                            "NL",
                            "BE",
                            "ES",
                            "IT",
                            "PT",
                            "BR",
                            "CA",
                            "AU",
                            "IN",
                            "JP",
                            "KR",
                            "MX",
                            "AR",
                            "CL",
                            "CO",
                            "PL",
                            "CZ",
                            "AT",
                            "CH",
                            "SE",
                            "NO",
                            "DK",
                            "FI",
                            "IE",
                            "ZA",
                            "RU",
                            "TR",
                            "UA",
                            "RO",
                            "HU",
                            "GR",
                            "IL",
                            "SA",
                            "AE",
                            "EG",
                            "NG",
                            "KE",
                            "TH",
                            "VN",
                            "ID",
                            "MY",
                            "SG",
                            "PH",
                            "TW",
                            "HK",
                            "NZ"
                        ],
                        "type": "string",
                        "description": "Country for search results and proxy geolocation (ISO 3166-1 alpha-2 code)",
                        "default": "US"
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
