# Google Images Scraper (`scrapeai/google-images-scraper`) Actor

Collect native Google Images metadata: original image and thumbnail URLs, publisher pages, titles and reported dimensions, bound to exact image cards. Configured Apify GOOGLE_SERP HTTP service; no browser or separate provider key.

- **URL**: https://apify.com/scrapeai/google-images-scraper.md
- **Developed by:** [ScrapeAI](https://apify.com/scrapeai) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 91.7% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.49 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Google Images Scraper

Collect real Google Images search-result metadata for an explicit keyword query. Each result is tied to its native Google image document ID, exact source-page URL, original image URL and thumbnail metadata. The Actor parses the public response as data and never executes its scripts. It does not use a separate language model or another site's stock records to fill a dataset.

The default transport is the explicitly configured Apify GOOGLE_SERP managed service. Its documented interface supports HTTP Google Search requests and has no sessions. Native image search uses the search endpoint with tbm=isch. The runtime uses the service's HTTP interface and retains the canonical HTTPS search URL in output. Existing Apify credentials and service billing apply; no additional provider API key or source login is required. Direct/residential modes retain their own source robots checks and may be unavailable. No automatic route, identity or browser fallback is attempted after source failure. See https://docs.apify.com/proxy/google-serp-proxy .

### Inputs

query is required. maxItems is an upper bound and defaults to100; it is not a guarantee that Google exposes that many results. An optional maxResults provides an additional global cap, and the smallest cap applies. Set minItems to10 for a strict ten-record check; it otherwise defaults to1. gl and hl preserve the requested source representation. imageSize accepts any, large, medium or icon; imageType accepts any, photo, clipart, lineart or animated. Filters are sent as the native source tbs parameters and are not locally guessed from filenames. maxPages limits the source pages, and requestTimeoutSecs limits each request. The runtime follows only an actual source-provided next-page link with the same query and Images mode; it never invents a hidden cursor or claims exhaustive pagination.

### Native output

Records include original imageUrl, thumbnailUrl, sourceUrl, native title and alt text, publisher label where exposed, sourceDomain, original width/height, separate thumbnail width/height, query and source evidence keys. Native JSON height/width ordering is converted explicitly into the output width/height fields. The original file URL is never replaced with an encrypted thumbnail, placeholder data URI or navigation link. Unknown fields are omitted. Dimensions are source-reported metadata rather than independently decoded image dimensions. The Actor does not download publisher images or visit source pages, so availability, image licensing, actual byte dimensions and visual content are not verified.

The parser reads only balanced strict JSON object literals from the source metadata assignment. It resolves the exact JSON key named by each visible native card, then checks the native image ID and source page. It does not correlate unrelated URL/title arrays by position. IDs and original URLs are deduplicated before global caps. Selected original native records and sanitized card/query markup are stored as same-run evidence, with hashes and timestamps. Source scripts, event handlers, placeholder images and unrelated visitor configuration are excluded from that evidence.

Output is buffered until the requested minimum succeeds. An unavailable source or too few genuine records exits nonzero without publishing partial results. The run summary records source pages, native counts and any error. Nine constructed regressions cover ID/page binding, dimensions, duplicate cards, strict non-executing JSON parsing, unsafe/thumbnail-only records, query identity and source filter/cap handling. These checks are separate from live local and production verification. Run apify run locally and inspect the actual dataset and source evidence before deploying. The package uses pinned Node22, SDK3.7.2 and a reproducible lockfile including the reviewed basic-ftp6.2.5 transitive security fix.

# Actor input Schema

## `query` (type: `string`):

The image search term to use

## `maxItems` (type: `integer`):

Maximum number of image results to retrieve

## `gl` (type: `string`):

The Google country to use for the query

## `hl` (type: `string`):

The Google UI language to return results

## `imageSize` (type: `string`):

Filter images by size

## `imageType` (type: `string`):

Filter images by type

## `imageColor` (type: `string`):

Filter images by color mode

## `proxyConfiguration` (type: `object`):

Configured managed Google SERP service by default; existing Apify proxy access/billing, no separate provider key. No route fallback after failure.

## `minItems` (type: `integer`):

Fail with no dataset publication if fewer genuine native image records are available.

## `maxPages` (type: `integer`):

Maximum source pages; only actual native next-page links are followed.

## `requestTimeoutSecs` (type: `integer`):

Timeout per source request.

## `maxResults` (type: `integer`):

The minimum maxItems/maxResults cap is enforced.

## Actor input object example

```json
{
  "query": "sunset photography",
  "maxItems": 100,
  "imageSize": "any",
  "imageType": "any",
  "imageColor": "any",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "GOOGLE_SERP"
    ]
  },
  "minItems": 1,
  "maxPages": 10,
  "requestTimeoutSecs": 60
}
```

# Actor output Schema

## `dataset` (type: `string`):

Structured records produced by this Actor.

# 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 = {
    "query": "sunset photography",
    "maxItems": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapeai/google-images-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 = {
    "query": "sunset photography",
    "maxItems": 100,
}

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

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

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

```

## CLI example

```bash
echo '{
  "query": "sunset photography",
  "maxItems": 100
}' |
apify call scrapeai/google-images-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapeai/google-images-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/8KjmcijWYdySIPUKj/builds/aJdh4mX9e6Y1cpdDk/openapi.json
