# File Downloader — Save Files & Images from URLs, $0.001 a File (`hermeskd/file-downloader`) Actor

Download files and images from a list of URLs into the run's key-value store, each with a public link, size, type and SHA-256. One record per URL, robots.txt obeyed, failed downloads never charged. $0.001 per file saved.

- **URL**: https://apify.com/hermeskd/file-downloader.md
- **Developed by:** [Logan Parker](https://apify.com/hermeskd) (community)
- **Categories:** Developer tools, Automation, Agents
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.80 / 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

Download files and images from a list of URLs into the run's key-value store, one record per URL with a public link, the file's size, content type and SHA-256, for pipelines and agents that need the file itself rather than its address. AI agents can call and pay for it through Apify's MCP server and agentic payments. It costs $0.001 per file saved, and a download that fails is never charged.

### Example result

Example record for the minimal input under How to use it, as this Actor returned it on 2026-10-27 in a run of its production image; the record is kept unchanged with the release.

```json
{
  "url": "https://docs.apify.com/img/apify_sdk.svg",
  "ok": true,
  "finalUrl": "https://docs.apify.com/img/apify_sdk.svg",
  "key": "2b84d958a7e59e28-apify_sdk.svg",
  "fileUrl": "file:///storage/key_value_stores/default/2b84d958a7e59e28-apify_sdk.svg",
  "contentType": "image/svg+xml",
  "bytes": 4426,
  "sha256": "39303247984da570c2a1de3bb287f4c1a2a05313e74131dff2ecfe686633a8fd"
}
```

The example record’s `file://` URL came from local storage during the production-image example run; it is not a public platform URL. On Apify, downloads are stored in the run’s key-value store.

### How to use it

Start a run in Apify Console, by API or from an agent with an input like this one — it is the input Apify runs every day to test this Actor:

```json
{"urls": ["https://docs.apify.com/img/apify_sdk.svg"]}
```

| Field | Type | Meaning |
|---|---|---|
| `urls` | array | Public file or image URLs to download; one record each. |
| `maxFileMb` | integer | Files larger than this are refused uncharged. |

### Events and prices

| Event | Title | Charged when | FREE / BRONZE | SILVER | GOLD / PLATINUM / DIAMOND |
|---|---|---|---|---|---|
| `file-downloaded` | File downloaded | One file fetched and saved to the run's key-value store. | $0.001 | $0.0009 | $0.0008 |

Platform usage is not passed through. Apify's automatic actor-start event remains $0.00005 per started GB (one GB or less counts once). The synthetic dataset-item event is absent. Charge limits stop further paying work; unprocessed inputs receive uncharged errors. Completed readable pending events are settled on abort.

Worked cost example: ten successful file downloaded events cost $0.01 at list, plus actor start. Failures are not included in that count.

### Call it from an agent

Through Apify's MCP server (https://mcp.apify.com) use `call-actor`:

```json
{
  "actor": "hermeskd/file-downloader",
  "input": {
    "urls": [
      "https://docs.apify.com/img/apify_sdk.svg"
    ]
  },
  "callOptions": {
    "maxTotalChargeUsd": 0.01,
    "timeout": 600
  },
  "waitSecs": 30
}
```

Then call `get-dataset-items` with the returned defaultDatasetId. Dedicated tool URL: https://mcp.apify.com?tools=hermeskd/file-downloader

### Output fields

| Field | Meaning |
|---|---|
| `url` | The input URL. |
| `ok` | True for a returned result; a failure is never charged. |
| `finalUrl` | The URL after redirects. |
| `key` | The file's key in the run's default key-value store. |
| `fileUrl` | A public link to the stored file. |
| `contentType` | The Content-Type the server sent. |
| `bytes` | The file's size in bytes. |
| `sha256` | The SHA-256 of the file's bytes. |
| `error` | Failure, always uncharged. |

### Limits and run time

1–100 URLs a run; each file up to maxFileMb (25 MB at most). Each file is fetched once under the shared fetch policy and must arrive within the 30-second per-request deadline (about 0.8 MB/s for a 25 MB file); a server-compressed file is stored decoded; URLs behind a login are not fetched.

The default run timeout is 600 seconds. Typical run time: not yet measured; written from the first deploy.

### Errors

| Code | Meaning |
|---|---|
| `http_error` | The source answered an unsuccessful HTTP status. |
| `download_failed` | The request or connection failed within its bounded deadline. |
| `file_too_large` | The file is larger than maxFileMb. |
| `empty_file` | The URL returned no bytes. |
| `robots_disallowed` | robots.txt forbids fetching the URL; no request was made to it. |
| `blocked_host` | The host is on the deny-list or resolves to a private or local address; no request was made. |
| `too_large` | The response exceeded the size cap. |
| `timeout` | The input did not finish within the run's time budget. |
| `invalid_input` | The run input passed the input schema but cannot be used; the message names the field. |
| `internal_error` | Unexpected failure; the message carries the error class. |
| `charge_limit_reached` | The run reached its maximum total charge; this input was not processed. |

No failure record is charged. A run fails only when all input outcomes are Actor-side failures; caller errors and a mixture of caller/Actor failures do not fail the run.

### Sources and terms

Only process content you have the right to process. URL fetches obey HermesBot robots-group selection, the shared deny-list, public-address checks on connections and redirects, honest identity, deadlines and rate limits. No caller credentials, cookies, CAPTCHA solving, residential proxies or evasion. Public files the caller names are fetched under robots.txt and stored in the run's own key-value store. Process only files you have the right to copy.

### Not affiliated

This Actor is not affiliated with Apify or the owners of the files it reads. Third-party names describe compatibility and source material.

### Related Hermes Actors

- [Article Extractor — Clean Text, Title & Date, $0.001 an Article](https://apify.com/hermeskd/article-extractor) — an article's clean text, title and publish date, without the rest of the page.
- [Career Site Job Search — Verified Greenhouse & Lever Boards](https://apify.com/hermeskd/ats-job-search) — search open jobs in the Hermes directory of Greenhouse and Lever boards, each confirmed live.
- [Speech to Text — Transcribe & Translate to English, SRT/VTT](https://apify.com/hermeskd/audio-to-transcript) — speech to text with SRT and VTT subtitles.
- [Video Converter & MP4 to MP3 — Trim, GIF; Audio $0.001 a Minute](https://apify.com/hermeskd/audio-video-convert) — audio and video conversion: MP4 to MP3, trim, GIF.
- [Broken Link Checker That Never Charges for the Broken Links](https://apify.com/hermeskd/broken-links) — broken links, 404s and redirects on a site.
- [Company ATS Finder — Which Hiring System & Job Board It Uses](https://apify.com/hermeskd/company-ats-board) — which hiring system and job board a company uses.
- [Crossref DOI Metadata — Titles, Dates & Citation Counts](https://apify.com/hermeskd/crossref-doi-metadata) — crossref doi metadata.
- [JSON Dataset Cleaner — Merge, Dedup & Export Rows](https://apify.com/hermeskd/dataset-json-cleaner) — json dataset cleaner.
- [DNS Lookup & SPF, DKIM, DMARC Check — Findings by Severity](https://apify.com/hermeskd/dns-and-email-auth) — DNS records and SPF, DKIM and DMARC checks.
- [Word, Excel & PowerPoint to Markdown — $0.002 per Document](https://apify.com/hermeskd/document-to-markdown) — Word, Excel, PowerPoint and other office files to Markdown.
- [Domain Availability Checker — Registry RDAP, No Contact Data](https://apify.com/hermeskd/domain-availability) — whether domain names are available, from registry RDAP.
- [Greenhouse Job Board Scraper — Open Jobs, Live, Any Company](https://apify.com/hermeskd/greenhouse-jobs) — every open job on a company's Greenhouse board.
- [Public HTTP GET — Response Body, Status & Hash](https://apify.com/hermeskd/http-get-response) — public http get.
- [Image Format Converter — Resize & Save WebP, PNG or JPEG](https://apify.com/hermeskd/image-format-converter) — image format converter.
- [Image Metadata Remover — Strip EXIF, GPS & Serials, Lossless](https://apify.com/hermeskd/image-metadata-remover) — GPS location, camera serial numbers and other private metadata removed from photos, losslessly.
- [Image to Text OCR — Lines & Words with Boxes, $0.002 an Image](https://apify.com/hermeskd/image-to-text) — OCR: the text in images.
- [Image Upscaler & Photo Restorer — AI 2x/4x, Agent-Payable](https://apify.com/hermeskd/image-upscale) — image upscaling 2x or 4x, and photo restoration.
- [Lever Jobs Scraper — Postings from Any Lever Site, US & EU](https://apify.com/hermeskd/lever-jobs) — every published job on a company's Lever site, global or EU.
- [Lighthouse Audit, No API Key — Lab Core Web Vitals & SEO Scores](https://apify.com/hermeskd/lighthouse-audit) — Lighthouse scores and Core Web Vitals.
- [Page Change Monitor — Detect Website Changes, $0.001 a Check](https://apify.com/hermeskd/page-change-monitor) — what changed on a page since the last check.
- [PDF to Markdown & PDF to Text — PDF Text Extractor with OCR](https://apify.com/hermeskd/pdf-to-markdown) — PDF to Markdown and text, with OCR for scanned pages.
- [Remote Jobs Scraper — Remote OK Listings, Salary Filter, Links](https://apify.com/hermeskd/remote-jobs) — current remote jobs from Remote OK, with salary and listing links.
- [RSS Feed Reader — RSS, Atom & JSON Feeds to JSON, $0.001 a Feed](https://apify.com/hermeskd/rss-feed-reader) — every item of an RSS, Atom or JSON feed.
- [SEO Audit — On-Page Checks, Schema & Hreflang, $0.004 a Page](https://apify.com/hermeskd/seo-page-audit) — an on-page SEO audit: meta tags, schema, headings and links.
- [Sitemap URL Extractor — Indexes, Gzip, RSS; $0.0003 per URL](https://apify.com/hermeskd/sitemap-urls) — the URLs in a site's sitemaps.
- [URL to Markdown for LLMs — Selectors, Text & Provenance](https://apify.com/hermeskd/url-to-markdown) — a public job page as clean Markdown where the site allows it (deny-listed job sites are refused).
- [Video Frame Extractor — by Scene, Interval or Timestamp](https://apify.com/hermeskd/video-frames) — frames, thumbnails and scenes from a video.
- [Website Icon Finder — Favicons, Touch Icons & Theme Colors](https://apify.com/hermeskd/website-icon-manifest) — declared website icons, theme colors and manifest links.
- [Website Screenshot API — Elements, HTML, Dark Mode & PDF Print](https://apify.com/hermeskd/website-screenshot) — screenshots and PDF prints of web pages.
- [Website Tech Stack Lookup — Live Detection, $0.001 a Site](https://apify.com/hermeskd/website-tech-stack) — the technologies a website runs, detected live.
- [Website to Markdown — Bounded Crawls for Agents](https://apify.com/hermeskd/website-to-markdown) — bounded whole-site Markdown with robots and crawl-delay enforced

### Changelog

- 1.0 (2026-10-27) — first release.

# Actor input Schema

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

Public file or image URLs to download; one record each.

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

Files larger than this are refused uncharged.

## Actor input object example

```json
{
  "urls": [
    "https://docs.apify.com/img/apify_sdk.svg"
  ],
  "maxFileMb": 25
}
```

# Actor output Schema

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

No description

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

The downloaded files in the run's key-value store, one key per URL.

# 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://docs.apify.com/img/apify_sdk.svg"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("hermeskd/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://docs.apify.com/img/apify_sdk.svg"] }

# Run the Actor and wait for it to finish
run = client.actor("hermeskd/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://docs.apify.com/img/apify_sdk.svg"
  ]
}' |
apify call hermeskd/file-downloader --silent --output-dataset

```

## MCP server setup

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