# Bulk File Downloader for Images, PDFs, Video and Audio (`cleanscrape/bulk-file-downloader`) Actor

Bulk file downloader: download images, PDFs, video and audio from a list of links or from any scraper's results. Each file gets a download link, size, real type, SHA-256 and image size; optional ZIP archives. Failed downloads are free. No login. Maintained by CleanScrape.

- **URL**: https://apify.com/cleanscrape/bulk-file-downloader.md
- **Developed by:** [CleanScrape](https://apify.com/cleanscrape) (community)
- **Categories:** Developer tools, Automation, 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

## Bulk File Downloader for Images, PDFs, Video and Audio

Download the files behind a list of links into Apify storage: images, PDFs, Word and Excel files, videos, audio, archives. Paste links (one per line, or a whole block of text), or point it at another Actor's results and it finds the file links in them by itself. Every file gets a download link, its size, its real type, a SHA-256 fingerprint and, for images, its width and height. Optional ZIP archives for downloading everything at once. No login.

Links that fail cost nothing: a broken link, a page that is not a file, a type you did not ask for or a file over your size limit is listed in a separate table with the reason.

**$2 per 1,000 files plus $0.10 per GB. No start fee.** The form's first run (3 sample files) costs under $0.01.

### Start with a small run

1. Under **File links**, keep the three samples or paste your own links. Text around the links is fine: numbered lists, Markdown, HTML or a pasted email all work.
2. Optional: choose **File types to keep** (images, videos, audio, documents, archives) and a **Maximum file size**.
3. Optional: turn on **Also make ZIP archives**.
4. Click **Start**. The Output tab lists every file with its download link; the **Not downloaded** table lists the links that failed and why.

### Download the files another Actor found

Most scrapers return links, not files: product photos, listing images, video and audio links, PDF reports. Choose that run's dataset under **Links from a dataset**, and the downloader takes every link in it that points to a file (`.jpg`, `.pdf`, `.mp4`...) or sits in a field named like `image`, `images`, `thumbnail`, `photo`, `video`, `audio`, `media`, `file` or `download`, also inside lists and nested objects. Page links such as product or profile pages are left out. To pick fields yourself, list them under **Fields with links**, for example `images` or `media.url`.

As an integration (in the other Actor's **Integrations** tab, "Connect Actor or Task"), the downloader runs after each run of that Actor and reads its dataset. Give it `{"datasetId": "{{resource.defaultDatasetId}}"}` as input, plus any other options such as `"fileTypes": ["images"]`.

Each row says which dataset row and field its link came from (`sourceRow`, `sourceField`), so files can be matched back to products or posts. To name the files after the products themselves, put a field such as `title` or `sku` under **Name files by a dataset field**: `Insight-Timer-Meditate-Sleep.jpg` instead of `512x512bb.jpg`.

### Use it from the API

```python
from apify_client import ApifyClient
import urllib.request

client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("cleanscrape/bulk-file-downloader").call(run_input={
    "urls": [
        "https://upload.wikimedia.org/wikipedia/commons/a/a9/Example.jpg",
        "https://api.apify.com/v2/key-value-stores/RoMzWkwkqTc8cuf9c/records/sample-report.pdf",
    ],
    "fileTypes": ["images", "documents"],
})
for f in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(f["fileName"], f["sizeMb"], f["sha256"][:12])
    urllib.request.urlretrieve(f["downloadUrl"], f["fileName"])
```

To download the images another run found, pass its dataset instead: `run_input={"datasetId": "<DATASET_ID>", "fileTypes": ["images"]}`.

### Input

| Field | What it does |
| --- | --- |
| File links | One link per line, or any text with links in it. Each repeated link is downloaded once. |
| Links from a dataset | Another run's dataset; its file links are added to the ones above. |
| Fields with links | Optional: the dataset fields to read, such as `images` or `media.url`. Empty = found automatically. |
| File types to keep | Any file, or images, videos, audio, documents, archives. The type is read from the file's first bytes. |
| Maximum files | The most links per run (default 1,000). |
| Maximum file size (MB) | Bigger files are stopped while they download, and not charged (default 500). |
| Name files by a dataset field | Optional, for dataset links: name each file after a field of its row, such as `title`, `sku` or `appId`. |
| File names | The name from the link (`photo.jpg`, then `photo-2.jpg`), or a short code from the link. The extension always matches the real type. |
| Also make ZIP archives | Adds `files-001.zip`, `files-002.zip`... with every downloaded file. |
| ZIP archive size (MB) | A new archive starts at this size (default 1,000). |
| Downloads at a time | Default 8; at most 4 at a time from one website. |
| Use Apify Proxy | For sites that refuse cloud servers. Most file hosts do not need it. |

### Output

**Files** (default dataset, one row per saved file):

| Field | Example |
| --- | --- |
| `fileName` | `sunset-photo.jpg` |
| `downloadUrl` | link to the file in the run's key-value store, works without a token |
| `url`, `finalUrl` | the link you gave, and where it redirected to |
| `contentType`, `fileType`, `extension` | `image/jpeg`, `images`, `jpg` |
| `sizeBytes`, `sizeMb` | `51560`, `0.049` |
| `sha256` | fingerprint of the contents: equal files, equal fingerprints |
| `width`, `height` | `1600`, `1067` (images) |
| `source`, `sourceRow`, `sourceField` | `dataset`, `12`, `images` |
| `downloadedAt` | `2026-11-20T11:27:58.891Z` |

**Not downloaded** (dataset `failed`, free): the link, the problem in words ("not found (HTTP 404)", "a web page, not a file", "larger than the size limit"), the HTTP status and where the link came from.

The files themselves are in the run's **key-value store** under their file names, next to the ZIP archives and `SUMMARY` (the run report).

### What it can and cannot do

- It downloads what a link serves to anyone: no logins, cookies or paywalls. A link that needs a login comes back as "needs a login (HTTP 401)" or "access denied (HTTP 403)".
- Some sites refuse requests from cloud servers. **Use Apify Proxy** sends the requests from other addresses, which helps with some of them; sites that block all data-center addresses (the W3C website, for example) stay "access denied". The run message suggests the proxy when a site answered "access denied".
- Links to web pages (a YouTube, Instagram or product page) are pages, not files: they are listed as "a web page, not a file". Pick **Documents** under file types to save the HTML anyway.
- The type is checked from the file's first bytes, so a `.jpg` link that serves a PNG is saved as `.png`, and an error page behind an image link is caught.
- Failed links are retried up to three times on server errors and network trouble, never on "not found".
- File size is limited by the run's disk, which is twice its memory: with the default 1 GB of memory, files up to about 800 MB. Give the run more memory for bigger files; the run report says when this applied.
- Links to private or internal network addresses are refused.

### Pricing

| Event | Price |
| --- | --- |
| File downloaded | $0.002 |
| Each started 10 MB of a file | $0.001 |
| Each started 10 MB in a ZIP archive (only when turned on) | $0.0015 |

| Run | Cost |
| --- | ---: |
| The form's first run: 3 small files | $0.009 |
| 1,000 product photos of 300 KB | $3.00 |
| The same, also as a ZIP archive (300 MB) | $3.045 |
| 50 videos of 40 MB | $0.30 |
| One 1 GB file | $0.105 |
| 200 links, all broken | $0 |

Bronze, Silver and Gold Apify plans get 10%, 15% and 20% off every event. Set **Maximum cost per run** to cap a run; it stops cleanly at the limit and keeps everything it saved.

### Speed

Measured on Apify with the default settings: 400 images (20 MB) in 8 seconds, two 100 MB files from an outside server in 6 seconds, and a 1 GB file plus its ZIP archive in 35 seconds (4 GB of memory). Big jobs stop cleanly before the run time limit and say how many links were not started; raise the timeout under Run options for more.

### Common questions

#### Can it download all images from a list of product pages?

It downloads files, not pages. Run a scraper for the pages first (most return image links), then give its dataset to this Actor. A page link given directly is listed as "a web page, not a file".

#### Can it download YouTube, TikTok or Instagram videos?

No. Those links open pages, and the video files behind them are protected. Direct links to video files (`.mp4`, `.webm`, `.mov`) work.

#### How do I download everything at once?

Turn on **Also make ZIP archives** and download `files-001.zip` from the key-value store, or use the `downloadUrl` of each row from your own code.

#### How long are the files kept?

As long as the run's storage: Apify keeps it for your plan's data retention period, shown on your account's plan page. Save the files elsewhere, or give the run's key-value store a name in the Console (Storage tab, then Rename) to keep it until you delete it.

#### Can it send the files to my S3 bucket or Google Drive?

Not directly. The `downloadUrl` links work without a token, so any tool that copies from a URL can pick them up, for example an Apify integration or a Make or Zapier step.

#### Is it legal to download these files?

The Actor downloads files that the links serve publicly. Copyright and the terms of the sites still apply to how you use them; you are responsible for having the right to download and use the files.

### Support

Questions or a result that looks wrong: open an issue on the Issues tab or email contact.cleanscrape@gmail.com. Include the run ID.

If the Actor was useful, an honest review on its Store page helps other people find it.

Maintained by CleanScrape.

### More tools from CleanScrape

- [App Store Reviews & Google Play Reviews Scraper (Play Store)](https://apify.com/cleanscrape/app-store-reviews-scraper): App Store and Google Play reviews with ratings, dates, app versions and developer replies, for one app or many
- [Google Trends Scraper API for Interest Over Time](https://apify.com/cleanscrape/google-trends-scraper): search interest over time, by region, related queries and trending searches
- [Map Your Show Exhibitor List Scraper for Trade Shows](https://apify.com/cleanscrape/event-exhibitor-monitor): trade show exhibitor lists and booth changes
- [Shopify Product Reviews Scraper for Judge.me and Okendo](https://apify.com/cleanscrape/shopify-reviews-scraper): Judge.me and Okendo reviews from Shopify product links
- [Google News Scraper and RSS Feed Reader](https://apify.com/cleanscrape/google-news-scraper): headlines from Google News and publisher feeds
- [Pinterest Scraper API for Pins and Pinterest Keyword Search](https://apify.com/cleanscrape/pinterest-scraper): keyword search, public pin links and board previews; search results may lack a pin link
- [Google Hotels Scraper for Google Travel Hotel Prices](https://apify.com/cleanscrape/google-hotels-scraper): hotel prices and booking offers for your dates
- [TikTok Shop Scraper API for Products, Prices and Sales](https://apify.com/cleanscrape/tiktok-shop-product-scraper): US TikTok Shop prices, sellers and ratings
- [Meta Threads Scraper for Posts and Replies](https://apify.com/cleanscrape/threads-scraper): public Threads posts from accounts or post links
- [Likee Scraper API](https://apify.com/cleanscrape/likee-scraper): Likee videos and comments
- [Flashscore Tennis Scraper for Tennis Matches and Stats](https://apify.com/cleanscrape/tennis-match-data): tennis results, statistics, point-by-point and head-to-head
- [Bilibili Scraper for Videos, Comments, Danmaku, Creators](https://apify.com/cleanscrape/bilibili-scraper): Bilibili videos, danmaku, top comments and creators, no login
- [Google Jobs Scraper for Job Search and Job Listings API](https://apify.com/cleanscrape/google-jobs-scraper): job listings with salaries, descriptions and apply links from Google Jobs
- [Whatnot Seller Tracker for Top Sellers and Sales](https://apify.com/cleanscrape/whatnot-seller-tracker): top Whatnot sellers per category, items sold, sales per day and followers over time
- [Whatnot Scraper for Listings and Live Shows](https://apify.com/cleanscrape/whatnot-scraper): Whatnot listings with prices and live shows by keyword or category
- [Kick Sponsor Tracker for Streamers, Brands and Promo Codes](https://apify.com/cleanscrape/kick-sponsor-tracker): which brands Kick streamers promote, with promo codes, affiliate links and broadcast hours
- [Casino Bonus Checker for Affiliate and Review Sites](https://apify.com/cleanscrape/casino-bonus-checker): the casino bonus each affiliate and review site shows, with promo codes, 18+ notices and affiliate IDs
- [ATP and WTA Tennis Rankings Scraper](https://apify.com/cleanscrape/tennis-rankings-scraper): current ATP and WTA singles, doubles and race rankings with points and movement
- [Career Site Job Listings from Workday, Greenhouse and Lever](https://apify.com/cleanscrape/career-site-jobs-scraper): open jobs from company career pages, with salaries and new or closed jobs per company
- [Video Frame Extractor for Scene Changes and Thumbnails](https://apify.com/cleanscrape/video-frame-extractor): still images from video files at scene changes, intervals or timestamps, with contact sheets
- [Economic Calendar Scraper for Official Release Dates](https://apify.com/cleanscrape/economic-calendar-api): CPI, jobs, GDP and central bank decision dates from the official agencies of five economies, with UTC times
- [Audio Transcription and Speech to Text for Podcasts](https://apify.com/cleanscrape/podcast-transcription): podcast feeds, Apple Podcasts links and audio files to text with timestamps and subtitles
- [Google Flights Scraper and Fare Tracker](https://apify.com/cleanscrape/google-flights-scraper): flight prices, airlines, stops and times for your routes and dates, with only new flights or lower prices on a schedule
- [Google Shopping Scraper and Price Tracker](https://apify.com/cleanscrape/google-shopping-scraper): product prices, stores and ratings from Google Shopping, each store’s price for a product, and price changes on a schedule
- [Telegram Channel Messages Scraper with Comments](https://apify.com/cleanscrape/telegram-channel-messages-scraper): public Telegram channel posts with views, reactions, media and comments, exact subscriber counts, and only new posts on a schedule
- [Google Trends Trending Now Scraper for Trending Searches](https://apify.com/cleanscrape/google-trends-trending-now): every search trending on Google now by country, with volume, growth, start time and related searches
- [Telegram Channel Search and Telegram Group Search Scraper](https://apify.com/cleanscrape/telegram-channel-search-scraper): find public Telegram channels and groups by topic, with exact subscribers and latest post date
- [App Store Search and Google Play Search Scraper](https://apify.com/cleanscrape/app-store-google-play-search-scraper): apps for a keyword in the App Store and Google Play, in store order, with ratings, installs and developer contact
- [Audio & Video Transcription (Whisper) for Text and Subtitles](https://apify.com/cleanscrape/audio-video-transcription-whisper): audio and video files to text with timestamps and SRT and VTT subtitles, with Whisper
- [ESPN Sports Scores and Injury Reports Scraper](https://apify.com/cleanscrape/espn-sports-scores-injury-reports): sports scores, schedules and results for the NFL, NBA, MLB, NHL, college sports and soccer, plus the NFL, NBA, MLB, NHL and WNBA injury reports
- [Steam Reviews Scraper for Steam Game Reviews and Store Data](https://apify.com/cleanscrape/steam-reviews-scraper): Steam reviews for any game with playtime, votes, language, Steam Deck and hardware, plus each game's review score and store data
- [Google People Also Ask Scraper with Related Searches](https://apify.com/cleanscrape/google-people-also-ask-scraper): People Also Ask questions with Google's answers, related searches and the AI Overview for your keywords, in any country and language

# Actor input Schema

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

One link per line to a file: images, PDFs, documents, video, audio, archives. You can also paste a block of text, a numbered list, Markdown or HTML: every web link in it is used. Each repeated link is downloaded once.

## `datasetId` (type: `string`):

A dataset whose rows hold file links, for example the results of a scraper run. Its links are added to the ones above (remove the sample links there).

## `datasetFields` (type: `array`):

The fields that hold the file links, such as image or images or media.url (a dot goes into a list or object). Leave empty to take every link that points to a file (.jpg, .pdf, .mp4 and the like) or sits in a field named like image, photo, thumbnail, video, audio, file, download or media.

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

The type is read from the file's first bytes, not only from the link. A file of another type is listed in the "failed" table and not charged. A link that opens a web page instead of a file is skipped unless you choose Documents.

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

The most links to download in one run, counted after repeated links are removed.

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

A larger file is stopped while it downloads, listed in the "failed" table and not charged.

## `fileNames` (type: `string`):

How each file is named in the key-value store and the ZIP archive. The right extension is added from the file's real type.

## `fileNameField` (type: `string`):

For links from a dataset: name each file after a field of its row, such as title, name, sku or appId (product.name reaches inside an object). A row with several files gets name, name-2, name-3. Empty: the name comes from the link.

## `zip` (type: `boolean`):

Puts every downloaded file into ZIP archives (files-001.zip, files-002.zip...) in the key-value store, for downloading everything in one go. Archives cost a small extra amount per 10 MB of files in them (see Pricing); the files are also saved one by one either way.

## `zipMaxMb` (type: `integer`):

A new archive is started when one reaches this size.

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

At most 4 at a time go to one website, so a site is not overloaded.

## `useApifyProxy` (type: `boolean`):

Download through Apify's datacenter proxy, for sites that block the cloud server's address. Most file hosts and CDNs do not need it.

## Actor input object example

```json
{
  "urls": [
    "https://api.apify.com/v2/key-value-stores/RoMzWkwkqTc8cuf9c/records/sunset-photo.jpg",
    "https://api.apify.com/v2/key-value-stores/RoMzWkwkqTc8cuf9c/records/sample-report.pdf",
    "https://api.apify.com/v2/key-value-stores/RoMzWkwkqTc8cuf9c/records/poem-reading.mp3"
  ],
  "fileTypes": [
    "any"
  ],
  "maxFiles": 1000,
  "maxFileMb": 500,
  "fileNames": "original",
  "zip": false,
  "zipMaxMb": 1000,
  "maxConcurrency": 8,
  "useApifyProxy": false
}
```

# Actor output Schema

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

No description

## `failed` (type: `string`):

No description

## `storage` (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://api.apify.com/v2/key-value-stores/RoMzWkwkqTc8cuf9c/records/sunset-photo.jpg",
        "https://api.apify.com/v2/key-value-stores/RoMzWkwkqTc8cuf9c/records/sample-report.pdf",
        "https://api.apify.com/v2/key-value-stores/RoMzWkwkqTc8cuf9c/records/poem-reading.mp3"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("cleanscrape/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://api.apify.com/v2/key-value-stores/RoMzWkwkqTc8cuf9c/records/sunset-photo.jpg",
        "https://api.apify.com/v2/key-value-stores/RoMzWkwkqTc8cuf9c/records/sample-report.pdf",
        "https://api.apify.com/v2/key-value-stores/RoMzWkwkqTc8cuf9c/records/poem-reading.mp3",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("cleanscrape/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://api.apify.com/v2/key-value-stores/RoMzWkwkqTc8cuf9c/records/sunset-photo.jpg",
    "https://api.apify.com/v2/key-value-stores/RoMzWkwkqTc8cuf9c/records/sample-report.pdf",
    "https://api.apify.com/v2/key-value-stores/RoMzWkwkqTc8cuf9c/records/poem-reading.mp3"
  ]
}' |
apify call cleanscrape/bulk-file-downloader --silent --output-dataset

```

## MCP server setup

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