# Website PDF Downloader: Files to Zip + SHA-256 Manifest (`greyridge-signals/bulk-file-downloader`) Actor

Bulk image and file downloader. Give it image or file URLs, or web pages to scan, and get every file back as a record and one zip. Duplicates removed by SHA-256, per-file failure causes, private addresses refused. $2/1,000 stored files.

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

## Pricing

from $2.00 / 1,000 file storeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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 Image Downloader: URLs to Zip

Give it image or file URLs, or web pages to scan, and it saves every file to the run's storage and (optionally) one zip. You pay **$0.002 per stored file** ($2 per 1,000). Failures, error pages, tiny files, oversized files and duplicates cost nothing.

### Use it as an API

```bash
curl -X POST "https://api.apify.com/v2/acts/greyridge-signals~bulk-file-downloader/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"urls":["https://example.com/gallery"],"types":["image"],"minBytes":5000,"maxFiles":200,"zip":true}'
```

Each row has `fileUrl` (link to the file in the run's key-value store), `url`, `sourcePage` (the page it was found on), `bytes`, `sha256`, `contentType`, `status`, `duplicateOf` and `error`. With `zip: true`, `RUN_STATS` holds `zip_url`.

### What it does

| Need | Behaviour |
|---|---|
| Direct file URLs | Downloaded as listed |
| A gallery or product page | The page is scanned for `img`, `srcset`, lazy-load attributes, links and CSS backgrounds; matching files are downloaded |
| Related pages | `crawlDepth: 1` also scans up to 14 pages on the same host that the page links to |
| Same file under two URLs | Detected by SHA-256, saved once, the second row says `duplicateOf`, not charged |
| Tracking pixels and icons | `minBytes` skips them without a charge |
| Soft errors | A server answering 200 with an HTML page instead of a file is reported, not saved or charged |
| Huge files | 25 MB per file, 2 GB per run; the row says which cap hit |
| Spend control | `maxFiles` and the run's max-charge limit both stop the run early, and the stop reason is in `RUN_STATS` |
| Pages that disallow scanning | robots.txt is honored for page scans by default |

Types: `image`, `document`, `audio`, `video`, `archive`, or extensions (`pdf`, `csv`, `.xlsx`), or `all`. Default is images.

### Safety

Private, loopback, link-local and reserved addresses are refused, including after redirects and for hostnames that resolve to them. Only ports 80, 443, 8080 and 8443 are allowed. Only http and https are fetched.

### Limits

- No login, cookies or JavaScript rendering: images that only appear after a script runs will not be found. Pages are read as HTML.
- Only download files you are allowed to copy. You are responsible for the rights to what you fetch.
- The zip holds up to 300 MB of files; every file is also its own record.

### Pricing

`file-stored` at $0.002, charged after the file is saved. Files of 10 MB or more also bill `transfer-10mb` at $0.001 per full 10 MB (a 25 MB file adds $0.002). Most images are far smaller and bill only the first event. Platform usage is included.

# Actor input Schema

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

Direct file URLs, or web pages to scan for files. A URL ending in a wanted file type is downloaded as is; any other URL is fetched as a page and its image and file links are collected. A missing https:// is added.

## `types` (type: `array`):

What to keep. Groups: image, document, audio, video, archive. Or extensions such as pdf, csv, .xlsx. Use all to keep every linked file. Default: image.

## `crawlDepth` (type: `integer`):

0 scans only the pages you list. 1 also scans up to 14 more pages on the same host that those pages link to.

## `minBytes` (type: `integer`):

Skip files smaller than this, such as 1-pixel trackers and icons. Skipped files are not charged.

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

Stop after this many files are stored. Caps your spend: each stored file is one charge.

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

Put all stored files into files.zip in the run's key-value store (up to 300 MB of files per zip; every file is also available as its own record).

## `obeyRobots` (type: `boolean`):

Skip scanning pages that robots.txt disallows. Turn off only for sites you are allowed to scan. Direct file URLs you list are fetched regardless.

## `concurrency` (type: `integer`):

Files fetched at once, 1-12.

## `timeoutSec` (type: `integer`):

5-120. Slow servers are reported as a timeout and not charged.

## Actor input object example

```json
{
  "urls": [
    "https://www.w3.org/TR/PNG/",
    "https://upload.wikimedia.org/wikipedia/commons/4/47/PNG_transparency_demonstration_1.png"
  ],
  "types": [
    "image",
    "pdf"
  ],
  "crawlDepth": 0,
  "minBytes": 0,
  "maxFiles": 500,
  "zip": false,
  "obeyRobots": true,
  "concurrency": 6,
  "timeoutSec": 30
}
```

# Actor output Schema

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

One row per file or failure, in the default dataset.

## `overview` (type: `string`):

Open the run results in the Apify Console.

# 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.w3.org/TR/PNG/",
        "https://upload.wikimedia.org/wikipedia/commons/4/47/PNG_transparency_demonstration_1.png"
    ],
    "types": [
        "image",
        "pdf"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("greyridge-signals/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.w3.org/TR/PNG/",
        "https://upload.wikimedia.org/wikipedia/commons/4/47/PNG_transparency_demonstration_1.png",
    ],
    "types": [
        "image",
        "pdf",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("greyridge-signals/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.w3.org/TR/PNG/",
    "https://upload.wikimedia.org/wikipedia/commons/4/47/PNG_transparency_demonstration_1.png"
  ],
  "types": [
    "image",
    "pdf"
  ]
}' |
apify call greyridge-signals/bulk-file-downloader --silent --output-dataset

```

## MCP server setup

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