# Google Images Scraper 🖼️ Search & Image URLs — Only $0.5/1K 💰 (`viralanalyzer/google-images-scraper`) Actor

Scrape Google Images search results. Extract image URLs, source pages, titles and dimensions for any search query. Lower-cost default proxy with optional residential fallback. Pay Per Event: $0.001 per image ($1 per 1,000).

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

## Pricing

from $0.50 / 1,000 item processeds

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 — Search & Image URLs

> 🔗 [View on Apify Store](https://apify.com/viralanalyzer/google-images-scraper) | 🇺🇸 English | [🇧🇷 Português](#português)
>
> 💰 **Only $0.50/1K** — Pay Per Event: $0.0005 per image

Scrape **Google Images search results** for any query. Extract image URLs, source page URLs, titles, and dimensions — no Google API key required.

### ✨ Features

- 🔍 **Search any query** — "red porsche", "aurora borealis", "modern architecture"
- 🖼️ **Image URLs** — Full-size image URL when resolvable from the result anchor
- 🔗 **Source page URL** — Always included, so you can resolve the original image
- 📐 **Dimensions** — Width/height when Google exposes them (never fabricated)
- 🌐 **Localized results** — `hl` (language) and `gl` (country) parameters
- 🛡️ **Anti-bot hardened** — Cookie seeding + stealth fingerprint masking + default Apify proxy
- 🛡️ **Validated output** — Every output validated before delivery
- 💰 **Pay per image** — $0.0005 per image ($0.50 per 1,000)

### How it works

1. The actor visits `https://www.google.com/search?q={query}&tbm=isch&hl={language}&gl={gl}` with a headful Chromium (XVFB) that mimics a real browser.
2. It waits for the image grid (`#islrg` / `div[data-surl]` / `img.rg_i`) and scrolls until `maxResultsPerQuery` images are loaded (Google renders ~100 per page via scroll).
3. For each result it extracts the title, image URL, source page URL, thumbnail URL, and dimensions (when available).

#### Thumbnail vs Full Image (honest mode)

Google Images serves most thumbnails through its own proxy (`encrypted-tbn0.gstatic.com`). This actor is **honest about it**:

- When the **full-size image URL** is resolvable from the result anchor (`imgurl`), it is delivered as `image_url` with `is_proxy_thumbnail: false`.
- When only the proxy thumbnail is available, the item is flagged **`is_proxy_thumbnail: true`** and you receive `source_page_url` — the page where the original image lives — so you can resolve it yourself.
- Dimensions are only reported when Google exposes them; the actor **never fabricates** width/height.

### 📥 Input

| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| `searchQueries` | string\[] | ✅ | — | Search queries for Google Images |
| `maxResultsPerQuery` | integer | ❌ | 10 | Max images per query (1-100) |
| `language` | string | ❌ | "en" | Google interface language (hl): en, pt-BR, es, fr, de, ja, zh |
| `gl` | string | ❌ | "us" | Google country code (e.g., "us", "br") |
| `proxyConfig` | object | ❌ | Apify Proxy | Proxy settings. Lower-cost proxy is the default; use `RESIDENTIAL` only when needed |

#### Input Example

```json
{
  "searchQueries": [
    "red porsche",
    "aurora borealis"
  ],
  "maxResultsPerQuery": 10,
  "language": "en",
  "gl": "us"
}
```

### 📤 Output

Every image includes these fields:

| Field | Type | Description |
|---|---|---|
| `query` | string | Search query that produced the result |
| `position` | integer | Position of the result (1-based) |
| `title` | string | Image title / alt text from Google Images |
| `image_url` | string | Image URL (full-size when resolvable, proxy thumbnail otherwise) |
| `thumbnail_url` | string | Google proxy thumbnail URL |
| `source_page_url` | string | URL of the web page where the image lives |
| `width` | integer | Image width in pixels (when Google exposes it, else null) |
| `height` | integer | Image height in pixels (when Google exposes it, else null) |
| `is_proxy_thumbnail` | boolean | true when `image_url` is only Google's proxy thumbnail |
| `domain` | string | Domain of `source_page_url` |
| `hl` | string | Language used for the search |
| `gl` | string | Country code used for the search |

#### Output Example

```json
{
  "query": "red porsche",
  "position": 1,
  "title": "Red Porsche 911 Carrera on the road",
  "image_url": "https://www.example.com/photos/porsche-911-red.jpg",
  "thumbnail_url": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9Gc...",
  "source_page_url": "https://www.example.com/photo-gallery",
  "width": 1200,
  "height": 800,
  "is_proxy_thumbnail": false,
  "domain": "www.example.com",
  "hl": "en",
  "gl": "us"
}
```

### 📋 Use Cases

- **Content research** — Find images for blog posts, social media, and design
- **Competitor analysis** — See which images rank for a keyword
- **Dataset building** — Collect image URLs + source pages for ML training sets
- **Media monitoring** — Track where brand images appear across the web

### ⚠️ Limitations

- **Google captcha in high volume.** Google may show a captcha when too many requests come from the same datacenter IP. If that happens, enable `RESIDENTIAL` proxies in `proxyConfig` and reduce volume.
- **Dimensions are not always available.** Google does not expose `data-sz` for every result; in those cases `width`/`height` are `null` (never fabricated).
- **Thumbnails are proxied.** When only `encrypted-tbn0.gstatic.com` is available, the actor honestly flags `is_proxy_thumbnail: true` and provides `source_page_url` so you can resolve the original image.
- **No image download.** This actor collects URLs only — it does not download or store image bytes (no Google thumbnail endpoint abuse).

### ❓ FAQ

**Q: Does this need a Google API key?**
A: No! This actor works without any Google API credentials.

**Q: What is a "proxy thumbnail"?**
A: Google serves most image previews through `encrypted-tbn0.gstatic.com`, a Google proxy. When the actor can only obtain this URL, the item is flagged `is_proxy_thumbnail: true`. Use the provided `source_page_url` to locate the original image on its source page.

**Q: What proxy does it need?**
A: The default is the lower-cost Apify proxy. Use `RESIDENTIAL` only when Google starts returning captchas or zero results.

**Q: Why are dimensions sometimes null?**
A: Google only exposes dimensions (`data-sz`) for some results. The actor never invents dimensions.

**Q: Can I search in other languages or countries?**
A: Yes! Set `language` (hl) and `gl` (e.g., "br") to localize results.

**Q: How many results can I get per query?**
A: Up to 100 via scrolling, controlled by `maxResultsPerQuery`.

### 💰 Pricing

This actor uses **Pay Per Event (PPE)** pricing:

| Metric | Cost |
|--------|------|
| `image-scraped` | $0.0005 per image |

**Examples**: 100 images = **$0.10** · 1,000 images = **$1.00** · 10,000 images = **$10.00**.

**Free tier**: Non-paying users get up to **5 images per query** free. Upgrade your Apify plan to unlock the full `maxResultsPerQuery`.

### 🔗 Related Actors

- [Google Maps BR Scraper](https://apify.com/viralanalyzer/google-maps-br-scraper) — Business data, reviews & CEP
- [Google Trends Scraper](https://apify.com/viralanalyzer/google-trends-scraper) — Trending topics
- [YouTube Fast Scraper](https://apify.com/viralanalyzer/youtube-fast-scraper) — YouTube video metrics
- [Instagram Reels Scraper](https://apify.com/viralanalyzer/instagram-reels-scraper) — Instagram metrics

### 📝 Changelog

#### v1.0 (Current)

- ✅ Search Google Images by query with `hl`/`gl` localization
- ✅ Image URL + thumbnail URL + source page URL extraction
- ✅ Dimensions (`data-sz`) when available — never fabricated
- ✅ Honest `is_proxy_thumbnail` flag for Google proxy thumbnails
- ✅ Scroll accumulation up to 100 images per query
- ✅ FREE tier cap (5 images/query), owner-skip PPE, UAG-SG diagnostic guide
- ✅ Bilingual support (EN + PT)

***

<a name="português"></a>

## 🖼️ Google Images Scraper — Busca e URLs de Imagens

> [🇺🇸 English](#️-google-images-scraper--search--image-urls) | 🇧🇷 Português
>
> 💰 **Apenas $0,50/1K** — Pay Per Event: $0,0005 por imagem

Extraia **resultados do Google Images** para qualquer busca. Obtenha URLs de imagem, URLs da página de origem, títulos e dimensões — sem chave de API do Google.

### ✨ Funcionalidades

- 🔍 **Busque qualquer termo** — "red porsche", "aurora borealis", "arquitetura moderna"
- 🖼️ **URLs de imagem** — URL da imagem em tamanho cheio quando resolvível pelo anchor do resultado
- 🔗 **URL da página de origem** — Sempre incluída, para você resolver a imagem original
- 📐 **Dimensões** — Largura/altura quando o Google expõe (nunca fabricadas)
- 🌐 **Resultados localizados** — Parâmetros `hl` (idioma) e `gl` (país)
- 🛡️ **Proteção anti-bot** — Cookie seeding + mascaramento de fingerprint + proxy padrão Apify
- 🛡️ **Output validado** — Todo output validado antes da entrega
- 💰 **Pague por imagem** — $0,0005 por imagem ($0,50 por 1.000)

### Como funciona

1. O actor visita `https://www.google.com/search?q={query}&tbm=isch&hl={language}&gl={gl}` com um Chromium com interface (XVFB) que imita um navegador real.
2. Aguarda a grade de imagens (`#islrg` / `div[data-surl]` / `img.rg_i`) e rola até carregar `maxResultsPerQuery` imagens (o Google renderiza ~100 por página via scroll).
3. Para cada resultado extrai título, URL da imagem, URL da página de origem, thumbnail e dimensões (quando disponíveis).

#### Thumbnail vs Imagem Cheia (modo honesto)

O Google Images serve a maioria dos previews através do próprio proxy (`encrypted-tbn0.gstatic.com`). Este actor é **honesto sobre isso**:

- Quando a **URL da imagem em tamanho cheio** é resolvível pelo anchor do resultado (`imgurl`), ela é entregue como `image_url` com `is_proxy_thumbnail: false`.
- Quando só o thumbnail proxy está disponível, o item é marcado com **`is_proxy_thumbnail: true`** e você recebe `source_page_url` — a página onde a imagem original está — para resolver você mesmo.
- Dimensões só são reportadas quando o Google expõe; o actor **nunca fabrica** largura/altura.

### 📥 Entrada

| Parâmetro | Tipo | Obrigatório | Padrão | Descrição |
|---|---|---|---|---|
| `searchQueries` | string\[] | ✅ | — | Buscas para o Google Images |
| `maxResultsPerQuery` | inteiro | ❌ | 10 | Máx imagens por busca (1-100) |
| `language` | string | ❌ | "en" | Idioma da interface Google (hl): en, pt-BR, es, fr, de, ja, zh |
| `gl` | string | ❌ | "us" | Código de país Google (ex.: "us", "br") |
| `proxyConfig` | objeto | ❌ | Apify Proxy | Config de proxy. O modo padrão é mais barato; use `RESIDENTIAL` só quando precisar |

#### Exemplo de Entrada

```json
{
  "searchQueries": [
    "red porsche",
    "aurora borealis"
  ],
  "maxResultsPerQuery": 10,
  "language": "en",
  "gl": "us"
}
```

### 📤 Saída

Cada imagem inclui estes campos:

| Campo | Tipo | Descrição |
|---|---|---|
| `query` | string | Busca que gerou o resultado |
| `position` | inteiro | Posição do resultado (a partir de 1) |
| `title` | string | Título / texto alternativo da imagem no Google Images |
| `image_url` | string | URL da imagem (tamanho cheio quando resolvível, thumbnail proxy caso contrário) |
| `thumbnail_url` | string | URL do thumbnail proxy do Google |
| `source_page_url` | string | URL da página web onde a imagem está |
| `width` | inteiro | Largura em pixels (quando o Google expõe; senão null) |
| `height` | inteiro | Altura em pixels (quando o Google expõe; senão null) |
| `is_proxy_thumbnail` | boolean | true quando `image_url` é só o thumbnail proxy do Google |
| `domain` | string | Domínio de `source_page_url` |
| `hl` | string | Idioma usado na busca |
| `gl` | string | Código de país usado na busca |

#### Exemplo de Saída

```json
{
  "query": "red porsche",
  "position": 1,
  "title": "Red Porsche 911 Carrera on the road",
  "image_url": "https://www.example.com/photos/porsche-911-red.jpg",
  "thumbnail_url": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9Gc...",
  "source_page_url": "https://www.example.com/photo-gallery",
  "width": 1200,
  "height": 800,
  "is_proxy_thumbnail": false,
  "domain": "www.example.com",
  "hl": "en",
  "gl": "us"
}
```

### 📋 Casos de Uso

- **Pesquisa de conteúdo** — Encontre imagens para posts, redes sociais e design
- **Análise de concorrência** — Veja quais imagens rankeiam para uma palavra-chave
- **Construção de datasets** — Colete URLs de imagem + páginas de origem para treino de ML
- **Monitoramento de mídia** — Acompanhe onde imagens da sua marca aparecem na web

### ⚠️ Limitações

- **Captcha do Google em volume alto.** O Google pode exibir captcha quando muitas requisições vêm do mesmo IP datacenter. Se isso ocorrer, ative proxies `RESIDENTIAL` em `proxyConfig` e reduza o volume.
- **Dimensões nem sempre disponíveis.** O Google não expõe `data-sz` para todos os resultados; nesses casos `width`/`height` são `null` (nunca fabricados).
- **Thumbnails são proxy.** Quando só `encrypted-tbn0.gstatic.com` está disponível, o actor marca honestamente `is_proxy_thumbnail: true` e fornece `source_page_url` para você resolver a imagem original.
- **Sem download de imagem.** Este actor coleta apenas URLs — não baixa nem armazena bytes de imagem (sem abuso do endpoint de thumbnail do Google).

### ❓ Perguntas Frequentes

**P: Precisa de chave da API do Google?**
R: Não! Este actor funciona sem nenhuma credencial de API do Google.

**P: O que é um "proxy thumbnail"?**
R: O Google serve a maioria dos previews através de `encrypted-tbn0.gstatic.com`, um proxy do Google. Quando o actor só consegue essa URL, o item é marcado com `is_proxy_thumbnail: true`. Use a `source_page_url` fornecida para localizar a imagem original na página de origem.

**P: Que tipo de proxy precisa?**
R: O padrão usa o proxy mais barato da Apify. Ative `RESIDENTIAL` apenas quando o Google começar a devolver captcha ou zero resultados.

**P: Por que as dimensões às vezes são null?**
R: O Google só expõe dimensões (`data-sz`) em alguns resultados. O actor nunca inventa dimensões.

**P: Posso buscar em outros idiomas ou países?**
R: Sim! Defina `language` (hl) e `gl` (ex.: "br") para localizar os resultados.

**P: Quantos resultados por busca?**
R: Até 100 via scroll, controlado por `maxResultsPerQuery`.

### 💰 Preços

Este actor usa precificação **Pay Per Event (PPE)**:

| Métrica | Custo |
|---------|-------|
| `image-scraped` | $0,0005 por imagem |

**Exemplos**: 100 imagens = **$0.10** · 1.000 imagens = **$1.00** · 10.000 imagens = **$10.00**.

**Free tier**: Usuários não pagantes recebem até **5 imagens por busca** grátis. Faça upgrade do seu plano Apify para liberar o `maxResultsPerQuery` completo.

### 🔗 Actors Relacionados

- [Google Maps BR Scraper](https://apify.com/viralanalyzer/google-maps-br-scraper) — Dados de empresas, avaliações e CEP
- [Google Trends Scraper](https://apify.com/viralanalyzer/google-trends-scraper) — Tópicos em alta
- [YouTube Fast Scraper](https://apify.com/viralanalyzer/youtube-fast-scraper) — Métricas do YouTube
- [Instagram Reels Scraper](https://apify.com/viralanalyzer/instagram-reels-scraper) — Métricas do Instagram

### 📝 Changelog

#### v1.0 (Atual)

- ✅ Busca no Google Images por query com localização `hl`/`gl`
- ✅ Extração de URL da imagem + thumbnail + URL da página de origem
- ✅ Dimensões (`data-sz`) quando disponíveis — nunca fabricadas
- ✅ Flag honesta `is_proxy_thumbnail` para thumbnails proxy do Google
- ✅ Scroll acumulativo até 100 imagens por busca
- ✅ Free tier (5 imagens/busca), owner-skip no PPE, guia diagnóstico UAG-SG
- ✅ Suporte bilíngue (EN + PT)

# Actor input Schema

## `searchQueries` (type: `array`):

List of search queries (e.g., 'red porsche', 'aurora borealis'). Each query is searched on Google Images.

## `maxResultsPerQuery` (type: `integer`):

Maximum number of images to extract per search query (Google loads about 100 per page via scroll)

## `language` (type: `string`):

Google interface language for the search (hl parameter)

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

Google country code used for search results (e.g., 'us', 'br')

## `proxyConfig` (type: `object`):

Proxy settings for the scraper. Default mode uses the lower-cost Apify proxy; enable RESIDENTIAL only if Google starts returning captchas or zero results.

## Actor input object example

```json
{
  "searchQueries": [
    "red porsche",
    "aurora borealis",
    "modern architecture"
  ],
  "maxResultsPerQuery": 10,
  "language": "en",
  "gl": "br",
  "proxyConfig": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (type: `string`):

Dataset containing all scraped results. Each item follows the dataset schema.

# 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 = {
    "searchQueries": [
        "red porsche"
    ],
    "maxResultsPerQuery": 10,
    "language": "en",
    "gl": "us",
    "proxyConfig": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("viralanalyzer/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 = {
    "searchQueries": ["red porsche"],
    "maxResultsPerQuery": 10,
    "language": "en",
    "gl": "us",
    "proxyConfig": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("viralanalyzer/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 '{
  "searchQueries": [
    "red porsche"
  ],
  "maxResultsPerQuery": 10,
  "language": "en",
  "gl": "us",
  "proxyConfig": {
    "useApifyProxy": true
  }
}' |
apify call viralanalyzer/google-images-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,viralanalyzer/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/kZmtZWsTDJpmYajL8/builds/6lgTGveLabVS2R1TR/openapi.json
