Bulk File Downloader (direct URLs, robots.txt-respecting) avatar

Bulk File Downloader (direct URLs, robots.txt-respecting)

Pricing

from $2.00 / 1,000 files downloaded

Go to Apify Store
Bulk File Downloader (direct URLs, robots.txt-respecting)

Bulk File Downloader (direct URLs, robots.txt-respecting)

Downloads the files you list (PDFs, images, CSVs, archives, anything with a direct URL) into the run's key-value store, with a download link, size, content type and SHA-256 for each. Filters by content type, caps file size, obeys robots.txt and spaces requests per site. No proxy, no login.

Pricing

from $2.00 / 1,000 files downloaded

Rating

0.0

(0)

Developer

WrenTools

WrenTools

Maintained by Community

Actor stats

0

Bookmarked

5

Total users

3

Monthly active users

18 days ago

Last modified

Features

Limited permissions

Share

Download a list of files into Apify storage in one run. Give it direct links to PDFs, images, CSVs, spreadsheets, archives or anything else with a URL, or pick a dataset from another run (a scraper's results, say) and name the field that holds the links. For each one you get back a download link, the record key, the file name, its size, content type and SHA-256 checksum. Each file sits in the run's key-value store, ready for your next Actor, your integration or a plain download.

From a list of links to one folder: our Python and Node example reads a text file of links, downloads them in one run, saves each file under its own name after checking its SHA-256, and keeps a manifest, so running it again fetches only new or fixed links.

Images to WebP or AVIF: to get smaller copies of downloaded images instead, give the same links to our Image Converter & Compressor, which downloads each one the same way and stores it converted, resized and stripped of EXIF and GPS.

See it run: our video Download Files from a List of URLs in Python (urllib): 0 Errors, 4 Hidden Problems shows four problems a plain download script misses and the checks this Actor makes for them, and the written version walks through those checks with the code. We made the video; its narration is a synthetic voice.

What you get

  • Links from another run's dataset. Pick the dataset (datasetId) and name the field that holds the links (datasetField): a link, or a list of links. A dot reaches into nested objects, so images.url takes the url of every object in an images list. Left empty, the first field that holds a link is used, and the run's log and SUMMARY say which. The dataset's links come after any fileUrls, in dataset order, up to maxFiles; only the dataset you pick is read, and only for reading.
  • All files as one ZIP. SUMMARY carries zipDownloadUrl, a link to every file of the run in one ZIP archive, served by Apify from the run's key-value store, so it costs nothing extra and the run needs no more memory or disk. Files are stored in it as they are (not recompressed), named by their record key (0001-report.pdf), and the archive also holds the run's INPUT and SUMMARY records. Like each file's downloadUrl, the link works without an API token, so share it only with people who may see the files and your input.
  • Every file stored as a record in the run's key-value store, keyed by its position and file name (0001-report.pdf), with its original content type.
  • A dataset item per URL, in input order: downloadUrl, key, fileName (from Content-Disposition or the URL), contentType, sizeBytes, sha256, or the reason it failed.
  • A content-type filter (allowedContentTypes, for example image/ or application/pdf). A file of another type is skipped before its body is transferred.
  • A size cap (maxFileSizeMb). A larger file is refused from its Content-Length before the download starts, or stopped as soon as it passes the cap.
  • Only whole files are stored. A file that arrives shorter than its declared size, a cut-off or empty download, or an HTML page sent where your URL names another type (a sign-in, error or consent page answered with 200) is reported with its reason and not charged: incomplete, fetch-failed (empty) or html-instead-of-file. Add text/html to allowedContentTypes to keep such pages.
  • Compressed answers are decoded. A server that gzips or deflates the file anyway gives you the file itself; a .gz file stays as it is.
  • Busy servers are retried. A 429, 502, 503 or 504 is tried up to twice more, after the server's Retry-After (up to 30 seconds).
  • File names are safe to save on Windows, macOS and Linux: the name from Content-Disposition (its UTF-8 filename* first) or the URL, with no folders, reserved characters or device names such as CON. Keys stay unique when two files share a name.
  • Duplicate URLs are downloaded once, including copies that differ only by a #fragment or the case of the host.
  • Links with spaces or non-ASCII characters work as written.
  • One bad row does not sink the run. An entry that is not an http(s) link (a stray N/A or mailto: in a spreadsheet column) is reported as invalid-url in its place, and the rest are downloaded.

Failed files are reported in the dataset with a code and a reason and are not charged. The codes, so you can filter on them: fetch-failed (an HTTP error, an empty file or a connection that failed), incomplete (cut off before its declared size, or a compressed stream that ended early), html-instead-of-file, too-slow, file-too-large, content-type-not-allowed, robots-disallowed, robots-disallowed-redirect (the link redirected to another site whose robots.txt does not allow the file, so it was not fetched there), rate-limited (the site's request limit for the run's IP address was used up; the message says when it resets), invalid-url.

Respectful by design

  • Only the URLs you list, or your dataset holds, are downloaded, each once. Pages are not crawled and links are not followed. The site's robots.txt is read first and obeyed, its * and $ rules included (RFC 9309), and so is the robots.txt of any site a link redirects to, before the request goes there. Downloads from one site are spaced (500 ms by default). No proxy, no browser, no login.
  • GitHub links: github.com's robots.txt disallows release downloads (/releases/download/), /raw/ and /archive/ links, so they are refused as robots-disallowed. A file in a repository can be listed as its raw.githubusercontent.com link, and a source archive as its codeload.github.com link: neither host had a robots.txt when we checked (October 2026), and the Actor reads it on every run anyway. A release asset can be listed as its API URL, https://api.github.com/repos/<owner>/<repo>/releases/assets/<id>: the url of its entry under assets at https://api.github.com/repos/<owner>/<repo>/releases/tags/<tag>. The Actor asks GitHub's API for the file itself (Accept: application/octet-stream, as GitHub's documentation says) and follows its redirect to the file. Without sign-in GitHub's API limits how many requests an IP address may make; past that, a file is reported as rate-limited with the time the limit resets.
  • Only public internet addresses are fetched. A URL or redirect into a private, loopback or link-local network is refused.

Download only files you have the right to download and store.

Input

FieldTypeDefaultNotes
fileUrlsarray-Direct links to files. Give these, a dataset, or both.
datasetIdstring-An Apify dataset whose items hold file links; read only.
datasetFieldstring-The field with the link or links; a dot for nested fields. Empty: the first field holding a link.
allowedContentTypesarray-Full types or prefixes ending in /; empty allows all.
maxFileSizeMbinteger50Up to 200.
maxFilesinteger1000Up to 10,000, in input order.
requestDelayMsinteger500Pause between downloads from one site.

Output

One dataset item per URL, in input order:

{"url": "https://example.com/files/q3-report.pdf", "finalUrl": "https://example.com/files/q3-report.pdf",
"status": "ok", "key": "0001-q3-report.pdf", "fileName": "q3-report.pdf",
"downloadUrl": "https://api.apify.com/v2/key-value-stores/<store id>/records/0001-q3-report.pdf",
"contentType": "application/pdf", "sizeBytes": 482113,
"sha256": "9f2c...e41a", "error": null}

A failed file:

{"url": "https://example.com/files/video.mp4", "status": "error", "key": null,
"error": {"code": "file-too-large", "message": "104857600 bytes declared (maxFileSizeMb is 50)"}}

Key-value store record SUMMARY: files requested, downloaded and failed, bytes downloaded, megabytes charged, why the run stopped early if it did, and zipDownloadUrl (every file as one ZIP; null when no file was downloaded). With a dataset, also datasetId, datasetField, datasetRowsRead and datasetRowsWithoutLink. A dataset is read no further than its first 100,000 rows.

Files in a run's default storage are unnamed storage, which Apify keeps for 7 days unless your account's data retention is set otherwise. Copy anything you need to keep longer.

Pricing

Pay per event, no start fee, and nothing for files that fail:

EventPricePer 1,000
file-downloaded (one file stored)$0.002$2.00
megabyte-downloaded (each started megabyte of it, at least one)$0.001$1.00

A 300 KB image costs $0.003; a 12.5 MB PDF costs $0.015. When you set a maximum charge for a run, the Actor caps each download at what the remainder pays for, and stops when not even a one-megabyte file fits.

Limits

  • Files only, one URL each. It does not crawl a page for its images or follow links.
  • A run that waits too long on slow servers stops early with what it has downloaded, so its results are saved before the run's timeout.
  • 200 MB per file at most.
  • Memory: a file is held in memory once while it is stored, so a 200 MB file needs roughly 300 MB in all, or about 500 MB if its server does not say its size up front (measured locally). The 1,024 MB default leaves room for the largest file either way. Each file is let go once it is stored, so a run of many files needs no more than its largest.
  • One file may take at most 10 minutes, retries included, and never past the point where the run stops to save its results before its timeout. A slower one, its headers included, is reported as too-slow and not charged, and the run goes on. A site's robots.txt gets 60 s; one that takes longer reads as unavailable, so that site's files are robots-disallowed (message deadline-exceeded).