# Image Scraper (`ib4ngz/image-scraper`) Actor

Extract image URLs from one or more webpages with optional browser rendering and proxy support.

- **URL**: https://apify.com/ib4ngz/image-scraper.md
- **Developed by:** [Iqbal R](https://apify.com/ib4ngz) (community)
- **Categories:** Developer tools, Automation, Other
- **Stats:** 2 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.70 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## Image Scraper

Extract image URLs from one or more webpages and export them as a clean dataset. Image Scraper supports standard HTML pages, JavaScript-rendered websites, optional link following, extension filters, concurrent processing, and proxy connections.

### What you can do

- Scan any number of start URLs in one run
- Find images in common page elements, metadata, responsive image sets, and page styles
- Follow links to a configurable depth
- Restrict results to selected image extensions
- Render JavaScript-powered pages when needed
- Use Apify Proxy or your own proxy URLs
- Export results as JSON, CSV, Excel, XML, RSS, or JSONL

### Input

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `startUrls` | array | Required | Webpages to scan. There is no Actor-defined upper limit on the number of entries. |
| `maxDepth` | integer | `0` | Number of link levels to follow from each start URL. `0` scans only the submitted URLs. |
| `allowedImageExtensions` | array | Common image formats | File extensions included in the results. |
| `crawlerType` | string | `Crawlee + Cheerio` | Use fast HTML loading or browser rendering for JavaScript-powered pages. |
| `proxyConfiguration` | object | Proxy disabled | Apify Proxy or custom proxy configuration. |
| `minConcurrency` | integer | `1` | Minimum number of webpages processed concurrently. |
| `maxConcurrency` | integer | `10` | Maximum number of webpages processed concurrently. |

#### Example input

```json
{
    "startUrls": [
        {
            "url": "https://apify.com"
        },
        {
            "url": "https://apify.com/store"
        }
    ],
    "maxDepth": 0,
    "allowedImageExtensions": [
        "jpg",
        "jpeg",
        "png",
        "webp",
        "svg"
    ],
    "crawlerType": "Crawlee + Cheerio",
    "proxyConfiguration": {
        "useApifyProxy": false
    },
    "minConcurrency": 1,
    "maxConcurrency": 10
}
```

For websites that render images with JavaScript, set `crawlerType` to `Crawlee + Puppeteer + Chrome`.

### Output

Each unique image URL is stored as one item in the default dataset:

```json
{
    "image": "https://apify.com/path/to/image.png"
}
```

Results are available from the run's **Output** tab and through the Apify Dataset API. Dataset exports can be downloaded in supported formats such as JSON, CSV, Excel, XML, RSS, and JSONL.

### Proxy usage

Proxy use is disabled by default. Enable Apify Proxy or provide custom proxy URLs in `proxyConfiguration` when a target website restricts direct requests or requires IP rotation.

### Practical guidance

- Start with fast HTML loading and switch to browser rendering only when the page requires JavaScript.
- Keep `maxDepth` at `0` when you only need images from the submitted pages.
- Higher concurrency can improve throughput, but aggressive settings may trigger rate limits.
- Ensure that your use of scraped content complies with the target website's terms and applicable laws.

# Actor input Schema

## `startUrls` (type: `array`):

One or more webpages to scan. Add as many start URLs as your run requires.

## `maxDepth` (type: `integer`):

How many link levels to follow from every start URL. Use 0 to scan only the submitted URLs.

## `allowedImageExtensions` (type: `array`):

Only image URLs with these file extensions are saved.

## `crawlerType` (type: `string`):

Choose fast HTML loading for standard pages or browser rendering for JavaScript-powered pages.

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

Use Apify Proxy or custom proxy URLs when required.

## `minConcurrency` (type: `integer`):

Minimum number of webpages processed concurrently.

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

Maximum number of webpages processed concurrently.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://apify.com"
    },
    {
      "url": "https://apify.com/store"
    }
  ],
  "maxDepth": 0,
  "allowedImageExtensions": [
    "jpg",
    "jpeg",
    "png",
    "gif",
    "webp",
    "svg",
    "ico"
  ],
  "crawlerType": "Crawlee + Cheerio",
  "proxyConfiguration": {
    "useApifyProxy": false
  },
  "minConcurrency": 1,
  "maxConcurrency": 10
}
```

# Actor output Schema

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

Dataset containing the discovered image URLs.

# 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 = {
    "startUrls": [
        {
            "url": "https://apify.com"
        },
        {
            "url": "https://apify.com/store"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("ib4ngz/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 = { "startUrls": [
        { "url": "https://apify.com" },
        { "url": "https://apify.com/store" },
    ] }

# Run the Actor and wait for it to finish
run = client.actor("ib4ngz/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 '{
  "startUrls": [
    {
      "url": "https://apify.com"
    },
    {
      "url": "https://apify.com/store"
    }
  ]
}' |
apify call ib4ngz/image-scraper --silent --output-dataset

```

## MCP server setup

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