# Bulk File Downloader — PDFs, Docs & Any File to ZIP (`hipersoft/bulk-file-downloader`) Actor

Download any files in bulk — from a list of file links or by finding every PDF, document, spreadsheet or archive linked on web pages and whole sites. Filter by type and size, skip duplicates, keep original names, and get one ZIP plus a link per file.

- **URL**: https://apify.com/hipersoft/bulk-file-downloader.md
- **Developed by:** [Hipersoft](https://apify.com/hipersoft) (community)
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.002 / file saved

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

## Bulk File Downloader — Download PDFs, Documents and Any File to One ZIP

Bulk File Downloader saves **any files in bulk**: give it a list of file links, or give it web pages and it **finds and downloads every PDF, Word document, spreadsheet, presentation, archive or media file linked on them** — across a whole site if you like. Filter by file type and size, skip duplicates automatically, keep the original file names, and get **a direct link to every file plus one ZIP of everything**.

![Bulk File Downloader input — file URLs, page URLs, file types and ZIP option in the Apify Console](https://api.apify.com/v2/key-value-stores/SUfvnaFLd9z9eBCtV/records/bulk-file-downloader-input.png?v=1)

### What does the Bulk File Downloader do?

It works two ways, and you can combine them in one run:

- **File URLs** — paste direct links to files; each one is downloaded and saved.
- **Page URLs** — paste web pages; the downloader reads each page, finds the links that point to files of the types you want, and downloads them. Turn on **site crawling** to collect files from many pages of the same website.

Every saved file gets a metadata row (source, page it was found on, link text, type, size, SHA-256 hash) and a download link. At the end, **files.zip** bundles everything into one download.

### Why use it?

- **Collect document libraries in minutes** — all PDFs from a reports page, all spreadsheets from a data portal.
- **Original file names kept** — and always unique, so nothing is overwritten.
- **Precise filters** — file types, maximum size per file and a total download cap.
- **No duplicates** — identical files are saved once, even under different links.
- **One ZIP** — or individual links for every file.

### What data do you get per file?

| Data point | Description |
| --- | --- |
| Source | `sourceUrl`, `finalUrl` |
| Where it was found | `pageUrl`, `linkText`, `foundBy` (direct or page) |
| File info | `fileType`, `contentType`, `sizeBytes` |
| Hash | `sha256` |
| Saved file | `fileName`, `fileUrl` |

### What you get

One row per saved file plus the files themselves and **files.zip**. Export the list to JSON, CSV, Excel or XML.

![Bulk File Downloader output example — file rows with name, type, size, source and download link](https://api.apify.com/v2/key-value-stores/SUfvnaFLd9z9eBCtV/records/bulk-file-downloader-output.png?v=1)

```json
{
  "sourceUrl": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",
  "finalUrl": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",
  "pageUrl": null,
  "linkText": null,
  "foundBy": "direct",
  "fileType": "pdf",
  "contentType": "application/pdf; qs=0.001",
  "sizeBytes": 13264,
  "sha256": "3df79d34abbca99308e79cb94461c1893582604d68329a41fd4bec1885e6adb4",
  "fileName": "dummy.pdf",
  "fileUrl": "https://api.apify.com/v2/key-value-stores/<storeId>/records/dummy.pdf"
}
```

#### Output schema

| Field | Type | Description |
| --- | --- | --- |
| `sourceUrl` | string (URL) | The file link — as you supplied it or as found on a page. |
| `finalUrl` | string (URL) | The file address after redirects. |
| `pageUrl` | string (URL) | The page the link was found on (empty for direct file URLs). |
| `linkText` | string | The text of the link on the page, when available. |
| `foundBy` | string | `direct` (from your file list) or `page` (found on a page). |
| `fileType` | string | File type / extension, e.g. `pdf`, `docx`, `xlsx`, `csv`, `zip`, `mp4`. |
| `contentType` | string | MIME type reported for the file. |
| `sizeBytes` | integer | File size in bytes. |
| `sha256` | string | SHA-256 hash of the file contents. |
| `fileName` | string | Name of the saved file (also its name inside files.zip). |
| `fileUrl` | string (URL) | Direct download link to the saved file. |

The run's key-value store also holds **`files.zip`** (all saved files) and **`OUTPUT`** (run totals and the ZIP link).

### Use cases

- **Research & compliance:** download every annual report, filing or policy PDF from a site.
- **Data collection:** grab all CSV / XLSX files from open-data portals.
- **Archiving & migrations:** back up a site's documents and downloads in one ZIP.
- **Education:** collect course PDFs, slides and handouts.
- **Media pipelines:** download batches of audio, video or image files from link lists.

### How to download all PDFs from a website

1. Open the Bulk File Downloader.
2. Paste the website page(s) under **Page URLs** and set **File types** to `pdf` (or leave empty for all common documents).
3. Optional: turn on **Also scan linked pages on the same site** and set **Max pages**.
4. Click **Start**.
5. Download **files.zip** from the Output / Storage tab, or use each row's `fileUrl`.

### Input

```json
{
  "fileUrls": ["https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"],
  "pageUrls": [{ "url": "https://www.princexml.com/samples/" }],
  "fileTypes": ["pdf", "csv"],
  "maxFiles": 50,
  "createZip": true
}
```

| Field | Description |
| --- | --- |
| `fileUrls` | Direct links to files. |
| `pageUrls` | Pages to scan for links to files. |
| `crawlSameSite` | Follow links on the same site and scan those pages too. |
| `maxPages` | Maximum pages to scan (default 10). |
| `fileTypes` | Keep only these types (empty = all for direct links, common documents for pages). |
| `maxFiles` | Stop after saving this many files (default 100). |
| `maxFileMb` | Skip files larger than this (default 100 MB). |
| `maxTotalMb` | Stop after this much has been downloaded in total (default 2,000 MB). |
| `skipDuplicates` | Save identical files once (default on). |
| `storeFiles` | Save each file with a download link (default on). |
| `createZip` | Bundle everything into files.zip (default on, up to 400 MB). |
| `fileNaming` | `original` (kept unique), `numbered` or `hash`. |
| `proxyConfiguration` | Optional proxy for loading pages. |

### Related tools

- [Website Image Downloader](https://apify.com/hipersoft/website-image-downloader) — download every image from any web page or site.
- [Bulk Image Downloader](https://apify.com/hipersoft/bulk-image-downloader) — download images from a list of image URLs.
- [PDF to Text Extractor](https://apify.com/hipersoft/pdf-to-text-extractor) — turn the downloaded PDFs into text.
- [Sitemap Extractor](https://apify.com/hipersoft/sitemap-extractor) — list every page of a site to feed in as page URLs.

### FAQ

**Which file types can it download?**
Any. For direct links every type is accepted unless you set **File types**. When scanning pages it looks for common documents by default — pdf, doc/docx, xls/xlsx, ppt/pptx, csv, txt, rtf, odt, ods, epub, zip, json and xml — or exactly the types you list (e.g. mp3, mp4, jpg).

**Can it find all PDFs on a website?**
Yes. Add the site's pages under **Page URLs**, set **File types** to `pdf`, and turn on **Also scan linked pages on the same site**.

**How do I get all the files at once?**
Every run produces **files.zip** in the run's key-value store, linked from the Output tab and the run summary.

**How large can files be?**
Up to 1,000 MB per file (set **Max size per file**); the ZIP holds up to 400 MB — larger runs still save every file individually.

**How does billing work?**
You pay per file saved, a small amount per 10 MB downloaded, and per page scanned. If you set a maximum cost per run, the run stops cleanly at that limit and you only receive what you paid for. See the **Pricing** tab.

**Can I connect this to other tools?**
Yes, through [integrations on the Apify platform](https://apify.com/integrations): [Make](https://apify.com/integrations/make), [Zapier](https://apify.com/integrations/zapier), [Slack](https://docs.apify.com/platform/integrations/slack), [Airbyte](https://docs.apify.com/platform/integrations/airbyte), [GitHub](https://docs.apify.com/platform/integrations/github), [Google Drive](https://docs.apify.com/platform/integrations/drive) and [many more](https://apify.com/integrations), plus the [Apify API](https://docs.apify.com/api/v2), JavaScript/Python clients and [webhooks](https://docs.apify.com/platform/integrations/webhooks).

**Is it legal?**
Only download files you have the right to use. You are responsible for respecting copyright and each site's terms.

### Related Actors

- [Website Image Downloader](https://apify.com/hipersoft/website-image-downloader)
- [Bulk Image Downloader](https://apify.com/hipersoft/bulk-image-downloader)
- [PDF to Text Extractor](https://apify.com/hipersoft/pdf-to-text-extractor)
- [Sitemap Extractor](https://apify.com/hipersoft/sitemap-extractor)

### Notes

Files are saved to your run's storage and are private to your account, as with all Apify runs. Only download files you have the right to use.

# Actor input Schema

## `fileUrls` (type: `array`):

Direct links to files (PDFs, documents, spreadsheets, archives, audio, video, images…). Each one is downloaded and saved.

## `pageUrls` (type: `array`):

Web pages to scan for links to files. Every linked file of the chosen types is downloaded.

## `crawlSameSite` (type: `boolean`):

Follow links to other pages on the same website and collect their files too (up to “Max pages”).

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

Maximum number of pages to scan.

## `fileTypes` (type: `array`):

Only keep these file types, e.g. pdf, docx, xlsx, csv, zip, mp3, mp4. Empty = all types for direct URLs, and common documents (pdf, doc/docx, xls/xlsx, ppt/pptx, csv, txt, rtf, odt, ods, epub, zip, json, xml) when scanning pages.

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

Stop after saving this many files.

## `maxFileMb` (type: `integer`):

Skip files larger than this.

## `maxTotalMb` (type: `integer`):

Stop saving once this much has been downloaded in total.

## `skipDuplicates` (type: `boolean`):

Files with identical content are saved once, even under different URLs.

## `storeFiles` (type: `boolean`):

Save every file in the run's storage with a direct download link.

## `createZip` (type: `boolean`):

Bundle all saved files into a single files.zip download (up to 400 MB).

## `fileNaming` (type: `string`):

How saved files are named.

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

Optional proxy for loading pages. Files themselves are downloaded directly.

## Actor input object example

```json
{
  "fileUrls": [
    "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"
  ],
  "pageUrls": [
    {
      "url": "https://www.princexml.com/samples/"
    }
  ],
  "crawlSameSite": false,
  "maxPages": 10,
  "fileTypes": [],
  "maxFiles": 10,
  "maxFileMb": 100,
  "maxTotalMb": 2000,
  "skipDuplicates": true,
  "storeFiles": true,
  "createZip": true,
  "fileNaming": "original",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `files` (type: `string`):

No description

## `zip` (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 = {
    "fileUrls": [
        "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"
    ],
    "pageUrls": [
        {
            "url": "https://www.princexml.com/samples/"
        }
    ],
    "maxFiles": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("hipersoft/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 = {
    "fileUrls": ["https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"],
    "pageUrls": [{ "url": "https://www.princexml.com/samples/" }],
    "maxFiles": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("hipersoft/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 '{
  "fileUrls": [
    "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"
  ],
  "pageUrls": [
    {
      "url": "https://www.princexml.com/samples/"
    }
  ],
  "maxFiles": 10
}' |
apify call hipersoft/bulk-file-downloader --silent --output-dataset

```

## MCP server setup

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