# Bulk File Downloader - PDFs, Images & Docs from URLs or Pages (`cuestadata/bulk-file-downloader`) Actor

Download files in bulk from a list of URLs, or find every PDF, image, document or ZIP linked on web pages and download them. Get one ZIP link for everything plus a record per file with name, size, type, SHA-256 hash and a direct download URL.

- **URL**: https://apify.com/cuestadata/bulk-file-downloader.md
- **Developed by:** [Cuesta Data](https://apify.com/cuestadata) (community)
- **Categories:** Automation, Developer tools, AI
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.60 / 1,000 file downloadeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
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?

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

### What does Bulk File Downloader do?

**Bulk File Downloader** downloads files in bulk. Paste a list of file URLs (PDFs, images, spreadsheets, ZIPs, audio, video, anything) or give it **web pages** and let it **find every matching file linked on them**: all the PDFs on a reports page, all the images in a gallery, all the CSVs on a data portal. You get:

- **One ZIP download link** with every file from the run
- A record per file with **file name, size, content type, SHA-256 hash, a direct download URL**, the original URL and the page it was found on
- Clear statuses for anything that failed or was skipped, so you know exactly what you got

### Why use this file downloader?

- **URLs or pages.** Works with direct links and with pages that link to files (`<a>`, `<img>`, `srcset`, `<embed>`, `<object>`, `<video>`, `<audio>`).
- **Filter precisely.** Pick extensions (`pdf`, `docx`, `xlsx`, `csv`, `zip`, `jpg`, `png`...), keep only same-domain files, or match a regex like `annual-report|10-k`.
- **ZIP of everything.** The SUMMARY record contains a ready ZIP link. No need to click through hundreds of files.
- **Integrity built in.** Every file gets a SHA-256 hash, and duplicate URLs are downloaded only once.
- **Safe limits.** Max file size, max files per page and per run, polite per-site concurrency, and robots.txt support for files found on pages.
- **Pay only for files you get.** Failed downloads, error pages, skipped and oversized files are free.
- **API, schedules and integrations.** Run it from the Apify API, Make, Zapier, n8n or any MCP-enabled AI agent.

### What can I use it for?

- **Document collection:** download all PDFs from a government, investor-relations or documentation page.
- **Research and RAG pipelines:** gather source PDFs, then feed them to a text extractor or vector database.
- **Asset backups:** save every image or media file referenced on your own site.
- **Data portals:** pull all CSV or XLSX files from an open-data page on a schedule.
- **Archiving deliverables:** turn a list of file links from a spreadsheet into one ZIP.

### How to download files in bulk

1. Paste your **URLs** (one per line).
2. If they are web pages, turn on **Find files on pages** and set the **file extensions** you want.
3. Optionally limit by **regex**, **same domain**, **max file size** and **max files**.
4. Click **Start**. Open the **SUMMARY** record for the ZIP link, or use the table to download single files.

### Input example

Find all PDFs on a page:

```json
{
    "urls": ["https://www.irs.gov/forms-instructions-and-publications"],
    "findFilesOnPages": true,
    "fileExtensions": ["pdf"],
    "maxFilesPerPage": 50,
    "maxFileSizeMb": 20
}
```

Download a list of direct links:

```json
{
    "urls": [
        "https://www.irs.gov/pub/irs-pdf/fw9.pdf",
        "https://pdfobject.com/pdf/sample.pdf"
    ]
}
```

### Output example

One record per file:

```json
{
    "url": "https://www.irs.gov/pub/irs-pdf/p1.pdf",
    "sourcePage": "https://www.irs.gov/forms-instructions-and-publications",
    "fileName": "p1.pdf",
    "key": "file-p1.pdf",
    "fileUrl": "https://api.apify.com/v2/key-value-stores/<storeId>/records/file-p1.pdf?signature=...",
    "contentType": "application/pdf",
    "sizeBytes": 324302,
    "sizeMb": 0.309,
    "sha256": "b76c98a9...",
    "status": "downloaded",
    "httpStatus": 200,
    "downloadedAt": "2026-11-19T02:43:12Z"
}
```

The **SUMMARY** record in the key-value store:

```json
{
    "downloaded": 48,
    "failed": 1,
    "skipped": 2,
    "megabytes": 61.4,
    "zipDownloadUrl": "https://api.apify.com/v2/key-value-stores/<storeId>/records?signature=...&prefix=file-"
}
```

Statuses: `downloaded`, `failed` (HTTP error, timeout or an error page instead of a file), `skipped-too-large`, `skipped-robots-txt`, `skipped-charge-limit`, `no-files-found`, `invalid`.

### How much does it cost?

This Actor uses **pay-per-event** pricing:

- **$2 per 1,000 files downloaded** ($0.002 per file), which covers files up to 1 MB
- **$0.50 per GB above the first MB of each file** ($0.0005 per extra MB, rounded up per file)
- plus a tiny Apify start fee per run

Most PDFs and images are under 1 MB, so 1,000 typical files cost about **$2**. A 10 MB PDF costs $0.002 + 9 x $0.0005 = **$0.0065**. Failed and skipped files are free. Set **Maximum cost per run** in the run options and the Actor stops cleanly when it is reached.

### Tips

- **Big jobs:** raise memory to 2-4 GB and **Max parallel downloads** to 10-20 for thousands of small files.
- **Only what you need:** combine **file extensions** with a **regex** to avoid downloading every icon or logo on a page.
- **Schedules:** save a task for a page you watch and run it weekly. Compare `sha256` values to spot files that changed.
- **Next step for documents:** pass the `fileUrl` values to our PDF & Image Text Extractor to get the text.

### Use with AI agents (MCP)

Connect this tool to Claude, ChatGPT, Cursor or any other MCP client through the [Apify MCP server](https://docs.apify.com/mcp). Add this server URL to your client and sign in with your Apify account:

```json
{
  "mcpServers": {
    "apify": { "url": "https://mcp.apify.com/?tools=actors,docs,cuestadata/bulk-file-downloader" }
  }
}
```

Then ask in plain words, for example: *"Download every PDF linked on this reports page and give me a ZIP."* The agent fills in the input, runs Bulk File Downloader and reads the results.

AI agents without an Apify account can pay per run with a prepaid token (x402, Skyfire or card) through [Apify agentic payments](https://docs.apify.com/agents/payments). This tool uses limited permissions, so it works with those tokens.

### More tools from Cuesta Data

| Tool | What it does |
|---|---|
| [Website Screenshot & PDF](https://apify.com/cuestadata/website-screenshot-pdf) | Full-page, mobile and element screenshots or PDFs of any list of URLs, with change detection. |
| [PDF & Image to Text (OCR)](https://apify.com/cuestadata/pdf-image-text-extractor) | Text from digital and scanned PDFs and images, page by page, with OCR in 7 languages. |
| [Company Jobs API](https://apify.com/cuestadata/company-jobs-feed) | Every open job from company career pages on Greenhouse, Lever, Ashby, Workable and more. |
| [SEO Site Audit](https://apify.com/cuestadata/seo-site-audit) | Crawl a site and check titles, meta tags, headings, broken links, duplicates and schema, with an HTML report. |
| [PageSpeed & Lighthouse Bulk Audit](https://apify.com/cuestadata/pagespeed-lighthouse-audit) | Lighthouse scores, Core Web Vitals and top fixes for many URLs or a whole sitemap, with HTML reports. |
| [Domain Availability Checker](https://apify.com/cuestadata/domain-availability-checker) | Bulk domain availability for name ideas x TLDs, confirmed by registry RDAP/WHOIS, with registrar and expiry dates. |
| [Link Preview & Website Metadata](https://apify.com/cuestadata/link-preview-metadata) | Title, description, Open Graph image, favicon, logo, brand color, JSON-LD and oEmbed for any list of URLs. |

### FAQ

**Is it legal to download files with this tool?**
Downloading publicly available files is generally fine, but you are responsible for having the right to download and use them. Respect copyright, licenses and each site's terms. This tool does not log in, bypass paywalls or access anything that is not publicly reachable.

**How long are the files kept?**
Files are stored in your run's key-value store and kept for your Apify plan's data retention period. Download the ZIP or copy files to your own storage if you need them longer.

**Why did a file fail with "Got a web page instead of a file"?**
The site returned an HTML page (usually a login wall, cookie wall or error page) where a file was expected. That item is not charged.

**Can it download from sites that need a login?**
No. It only downloads files that are publicly reachable. Signed or tokenized URLs (for example pre-signed S3 links) work fine.

**I found a bug or need a feature.**
Open an issue on the **Issues** tab. We usually reply within one business day.

*Bulk File Downloader is built and maintained by Cuesta Data.*

# Actor input Schema

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

Direct file URLs (PDF, image, CSV, ZIP...) or, with <b>Find files on pages</b> on, web pages that link to files. One URL per line.

## `findFilesOnPages` (type: `boolean`):

When a URL is a web page, find the file links on it (links, images, embeds, video and audio sources) that match the extensions below and download them. When off, every URL is downloaded as-is.

## `fileExtensions` (type: `array`):

Used with <b>Find files on pages</b>. Examples: pdf, docx, xlsx, csv, zip, jpg, png, webp, mp3, mp4. Use <code>\*</code> for any linked file (web pages are skipped).

## `linkPattern` (type: `string`):

Optional regular expression a found file URL must match, e.g. <code>annual-report|10-k</code> or <code>/2026/</code>.

## `sameDomainOnly` (type: `boolean`):

Skip found files hosted on other domains (CDNs and third parties).

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

Maximum number of matching files taken from each page.

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

Safety cap on how many files are attempted in one run.

## `maxFileSizeMb` (type: `integer`):

Files larger than this are skipped (and not charged).

## `respectRobotsTxt` (type: `boolean`):

Skip found files that the site's robots.txt disallows. URLs you list directly are always fetched.

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

How many files are downloaded at the same time (at most 4 per website).

## Actor input object example

```json
{
  "urls": [
    "https://www.irs.gov/pub/irs-pdf/fw9.pdf",
    "https://pdfobject.com/pdf/sample.pdf"
  ],
  "findFilesOnPages": false,
  "fileExtensions": [
    "pdf"
  ],
  "sameDomainOnly": false,
  "maxFilesPerPage": 200,
  "maxFiles": 1000,
  "maxFileSizeMb": 100,
  "respectRobotsTxt": true,
  "maxConcurrency": 5
}
```

# Actor output Schema

## `files` (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": [
        "https://www.irs.gov/pub/irs-pdf/fw9.pdf",
        "https://pdfobject.com/pdf/sample.pdf"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("cuestadata/bulk-file-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": [
        "https://www.irs.gov/pub/irs-pdf/fw9.pdf",
        "https://pdfobject.com/pdf/sample.pdf",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("cuestadata/bulk-file-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": [
    "https://www.irs.gov/pub/irs-pdf/fw9.pdf",
    "https://pdfobject.com/pdf/sample.pdf"
  ]
}' |
apify call cuestadata/bulk-file-downloader --silent --output-dataset

```

## MCP server setup

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