# Bulk Image and File Downloader (`fecklesspleb/bulk-image-downloader`) Actor

Download images and files in bulk from direct URLs or from every image on a list of web pages (img, srcset, og:image), plus linked PDFs, CSVs or ZIPs. Files saved to Apify storage with links, size, dimensions, alt text and SHA-256. Dedupe and size filters. $1 per 1,000 files.

- **URL**: https://apify.com/fecklesspleb/bulk-image-downloader.md
- **Developed by:** [Scott Williams](https://apify.com/fecklesspleb) (community)
- **Categories:** Developer tools, Automation, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## Bulk Image and File Downloader

Download images and files in bulk. Give it direct file URLs, web page URLs, or a mix. Direct URLs are downloaded as they are; for page URLs the Actor collects every image on the page (`img`, `picture`/`srcset` at the largest size, lazy-load attributes, `og:image`) and, if you want, linked files such as PDF, CSV, ZIP or DOCX. Each file is saved to an Apify key-value store and listed in the dataset with a download link, content type, size, image width and height, alt text and SHA-256 hash.

**At a glance:** $1.00 per 1,000 files saved, plus $0.00005 per run start. Pay per result with no subscription, set a maximum cost per run, export to JSON, CSV or Excel, or call it from the Apify API, Make, Zapier or n8n.

Identical files are saved once (de-duplicated by hash). Filters skip tiny images, narrow images and oversized files. robots.txt is respected (RFC 9309) on every request.

### Use cases

- Archive product photos, press-kit images or logos from pages you have rights to.
- Collect all PDFs (reports, manuals, filings) linked from a page into one store.
- Build an image dataset for computer vision from openly licensed sources.
- Migrate media from an old CMS by downloading every image on a list of pages.
- Check image sizes and dimensions across a site for performance work.

### Input

```json
{
  "urls": [{"url": "https://www.python.org/"}, {"url": "https://upload.wikimedia.org/wikipedia/commons/c/c3/Python-logo-notext.svg"}],
  "fileTypes": "images",
  "minSizeKb": 2,
  "maxFileSizeMb": 10
}
```

To grab linked documents, set `"fileTypes": "custom"` and `"extensions": ["pdf"]`.

### Output example

Real output from a test run (the link is a signed Apify storage URL):

```json
{
  "sourceUrl": "https://www.python.org/static/img/python-logo.png",
  "pageUrl": "https://www.python.org/",
  "finalUrl": "https://www.python.org/static/img/python-logo.png",
  "fileUrl": "https://api.apify.com/v2/key-value-stores/<storeId>/records/9c121e619bfe02eaba582d70.png?signature=...",
  "key": "9c121e619bfe02eaba582d70.png",
  "contentType": "image/png",
  "sizeBytes": 15770,
  "width": 580,
  "height": 164,
  "sha256": "9c121e619bfe02eaba582d7080eea46fd53ec0b50717e6794a948fada4ae8f3c",
  "altText": "python\u2122",
  "downloadedAt": "2026-10-28T04:05:00+00:00"
}
```

Download everything at once from the key-value store in Apify Console, or fetch each `fileUrl`.

### Pricing

Pay per saved file: **$1.00 per 1,000 files** ($0.001 per file), plus the standard Apify run start event of $0.00005 per run. Pages, duplicates, filtered files and failed downloads are free. Set **Maximum cost per run** and the Actor stops cleanly when it is reached.

### Limits

- No JavaScript rendering, so images added by scripts after load are not found. Server-rendered pages, lazy-load attributes and srcset work.
- CSS background images are not collected.
- No login support.
- On the Apify platform, pages and files whose address is private, loopback or link-local (also after a redirect) are not downloaded and are free. They count as failed ("not fetched: private, loopback and link-local addresses are not allowed").

### Is this legal?

The Actor downloads only public files from URLs you give it and obeys robots.txt. Images and documents are usually protected by copyright: make sure you have the right to download and use them, and follow each site's terms.

# Changelog

This Actor's version history is a separate document: https://apify.com/fecklesspleb/bulk-image-downloader/changelog.md

# Actor input Schema

## `urls` (type: `array`):

Direct file URLs (downloaded as they are) and/or web page URLs (images and matching file links on the page are downloaded).

## `fileTypes` (type: `string`):

For image tags the largest srcset candidate is used.

## `extensions` (type: `array`):

Linked file types to download, for example pdf, csv, zip, docx.

## `maxFilesPerPage` (type: `integer`):

Limit for each page URL.

## `minSizeKb` (type: `number`):

Skip tiny files such as tracking pixels and icons.

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

Skip images narrower than this. 0 keeps all.

## `maxFileSizeMb` (type: `number`):

Larger files are skipped.

## `keyValueStoreName` (type: `string`):

Save files to a named store (kept indefinitely) instead of the run's default store (kept for your plan's data retention period).

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

Downloads in parallel. Requests to one host are spaced at least 0.25 s apart.

## `maxFiles` (type: `integer`):

Stop after saving this many files. 0 means no cap.

## Actor input object example

```json
{
  "urls": [
    {
      "url": "https://www.python.org/"
    }
  ],
  "fileTypes": "images",
  "extensions": [],
  "maxFilesPerPage": 5,
  "minSizeKb": 0,
  "minWidth": 0,
  "maxFileSizeMb": 10,
  "maxConcurrency": 10,
  "maxFiles": 0
}
```

# Actor output Schema

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

No description

## `summary` (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 = {
    "urls": [
        {
            "url": "https://www.python.org/"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("fecklesspleb/bulk-image-downloader").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 = { "urls": [{ "url": "https://www.python.org/" }] }

# Run the Actor and wait for it to finish
run = client.actor("fecklesspleb/bulk-image-downloader").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 '{
  "urls": [
    {
      "url": "https://www.python.org/"
    }
  ]
}' |
apify call fecklesspleb/bulk-image-downloader --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,fecklesspleb/bulk-image-downloader"
        }
    }
}
```

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/UFGR4ahrde6Xy6BAA/builds/7UBKz7YAVvkZhLloQ/openapi.json
