# Startpage Image Scraper (`searchapi/startpage-image-scraper`) Actor

Scrapes Startpage Images for any query. Extracts the full canonical images-vertical schema: image URL + thumbnail, title, alt, dimensions, filesize, source page, MIME type, color, animated/stock flags, license, language, region, and more.

- **URL**: https://apify.com/searchapi/startpage-image-scraper.md
- **Developed by:** [Search API](https://apify.com/searchapi) (community)
- **Categories:** Developer tools, Automation, SEO tools
- **Stats:** 2 total users, 1 monthly users, 96.6% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.99 / 1,000 search 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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## Startpage Image Scraper

Search Startpage Images and collect source-backed image records with direct image and thumbnail URLs, source pages, dimensions, format, MIME type, file size, orientation, megapixels, and complete query provenance.

### Features

- Single-query and fair multi-query modes
- Native Startpage pagination with overall `maxItems`
- Width, height, orientation, format, and source-domain filters
- Relevance, largest, and smallest ordering
- Stable IDs, direct URL deduplication, and matched-query tracking
- Startpage embedded structured-data extraction with DOM fallback
- Optional Apify Residential or custom proxies, persistent sessions, consistent browser fingerprints, and bounded retries
- Clean no-results behavior and fail-closed challenge detection

Startpage Images uses a browser page over HTTPS. `GOOGLE_SERP` is therefore rejected; that proxy group supports specific Google HTTP requests, not Startpage. The Actor does not solve or bypass CAPTCHAs.

### Example input

```json
{
  "queries": ["nature wallpaper", "city skyline"],
  "maxItems": 50,
  "maxPages": 2,
  "minWidth": 1920,
  "minHeight": 1080,
  "orientation": "landscape",
  "formats": ["jpeg", "png"],
  "sortBy": "largest",
  "safeSearch": "moderate",
  "proxyConfiguration": { "useApifyProxy": false }
}
```

### Output

Each record contains stable identity and ranking, title, direct image URL, direct thumbnail URL when available, source-page provenance, numeric dimensions, derived aspect ratio/megapixels/orientation, source format and file size when available, extraction method, query/matched-query context, Safe Search, locale, and scrape time. Missing optional values are omitted rather than emitted as nulls.

Startpage-proxy URLs containing ephemeral signatures are not stored. The Actor prefers the source-provided `rawImageUrl` and decodes proxied thumbnails to their direct image host.

### Local development

```sh
npm ci
npm test
node validate-datasets.js
apify run --purge --input-file INPUT.json
node scripts/validate-output.mjs storage/datasets/default
```

Use at least 1 GB of memory; 2 GB is recommended for reliable cloud Firefox startup. Effective browser concurrency is automatically capped to the run memory (roughly one browser per 900 MB) to prevent browser crashes. Search inventory and optional metadata vary by query, locale, network route, and time.

# Actor input Schema

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

One image-search phrase. Use this or Queries.

## `queries` (type: `array`):

Up to 20 searches. Output is selected fairly across queries.

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

Overall record limit across all searches.

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

Maximum native Startpage result pages inspected per search.

## `safeSearch` (type: `string`):

Startpage Safe Search level.

## `minWidth` (type: `integer`):

Keep images at least this many pixels wide.

## `minHeight` (type: `integer`):

Keep images at least this many pixels high.

## `maxWidth` (type: `integer`):

Keep images no wider than this pixel value.

## `maxHeight` (type: `integer`):

Keep images no taller than this pixel value.

## `orientation` (type: `string`):

Filter by dimensions derived from the source metadata.

## `formats` (type: `array`):

Optional formats such as jpeg, png, gif, or webp.

## `includeDomains` (type: `array`):

Optional source-domain allowlist.

## `excludeDomains` (type: `array`):

Optional source-domain blocklist.

## `sortBy` (type: `string`):

Ordering within each query before fair selection.

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

Startpage result-language preference.

## `region` (type: `string`):

Locale provenance such as us, gb, de, or in.

## `maxConcurrency` (type: `integer`):

Maximum searches processed in parallel.

## `maxRequestRetries` (type: `integer`):

Bounded retries for temporary browser, proxy, or blocking failures.

## `navigationTimeoutSecs` (type: `integer`):

Maximum seconds per browser navigation.

## `requestHandlerTimeoutSecs` (type: `integer`):

Maximum seconds for one query handler.

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

Optional Apify Residential or custom proxy. GOOGLE\_SERP is incompatible with Startpage HTTPS browser traffic.

## `debug` (type: `boolean`):

Log safe structural diagnostics only. HTML and response bodies are never stored.

## Actor input object example

```json
{
  "query": "nature wallpaper",
  "queries": [],
  "maxItems": 50,
  "maxPages": 2,
  "safeSearch": "moderate",
  "orientation": "any",
  "formats": [],
  "includeDomains": [],
  "excludeDomains": [],
  "sortBy": "relevance",
  "language": "english",
  "region": "",
  "maxConcurrency": 3,
  "maxRequestRetries": 2,
  "navigationTimeoutSecs": 45,
  "requestHandlerTimeoutSecs": 180,
  "proxyConfiguration": {
    "useApifyProxy": false
  },
  "debug": false
}
```

# Actor output Schema

## `dataset` (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 = {
    "query": "nature wallpaper",
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("searchapi/startpage-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 = {
    "query": "nature wallpaper",
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("searchapi/startpage-image-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": "nature wallpaper",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call searchapi/startpage-image-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,searchapi/startpage-image-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/11MSa1G4XYmxu4hQm/builds/1z9DVrbB2z7wOPGEm/openapi.json
