# Image Downloader (`apify/image-downloader`) Actor

- **URL**: https://apify.com/apify/image-downloader.md
- **Developed by:** [Apify](https://apify.com/apify) (Apify)
- **Categories:** Automation, Integrations
- **Stats:** 521 total users, 9 monthly users, 100.0% runs succeeded, 9 bookmarks
- **User rating**: 4.64 out of 5 stars

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## What is Image Downloader

This Image Downloader is a simple and powerful tool that allows you to download images from website, Twitter, Facebook, Pinterest or any other place on the web. To get images, just **insert the URL of page that contains these images, and click "Save & Start" button**.

### How do I use Image Downloader?

Image Downloader was designed to be easy to start with even if you've never downloaded images from the web before. Here's how you can get high-quality images with this tool:

1. [Create](https://console.apify.com/sign-up) a free Apify account using your email.
2. Open [Image Downloader](https://apify.com/apify/image-downloader)
3. Add one or URL from which you want to download the images
4. Click "Start" and wait for the data to be extracted.
5. Download your data from the dataset.

### 🔼 Input

The input for this bulk Image Downloader should be the **URL that contains the image you want to get.** See an example of the input form below. In this case, you want to download all images from the American Kennel Club page about collies.

![image\_downloader\_input](https://raw.githubusercontent.com/apify-projects/actor-readme-images/refs/heads/master/image_downloader_input.png)

### 🔽 Output sample

The results will be wrapped into a dataset which you can find in the **Storage** tab. Here's an excerpt from the dataset you'd get if you apply the input parameters above. You can download all the pictures right away.

![image\_downloader\_output](https://raw.githubusercontent.com/apify-projects/actor-readme-images/refs/heads/master/image_downloader_output.png)

### Integrate your Image Downloader and streamline your workflow

Last but not least, Image Downloader can be connected with almost any cloud service or web app thanks to [integrations](https://apify.com/integrations) on the Apify platform.

These include:

- [Make](https://docs.apify.com/platform/integrations/make)
- [Zapier](https://docs.apify.com/platform/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 [much more](https://docs.apify.com/platform/integrations).

Alternatively, you can use [webhooks](https://docs.apify.com/platform/integrations/webhooks) to carry out an action whenever an event occurs, e.g. get a notification whenever Image Downloader successfully finishes a run.

### Not your cup of tea? Build your own scraper

This Image Downloader doesn’t exactly do what you need? You can always build your own! We have various [scraper templates](https://apify.com/templates) in Python, JavaScript, and TypeScript to get you started. Alternatively, you can write it from scratch using our [open-source library Crawlee](https://crawlee.dev/?__hstc=160404322.99301e3ccb2984c883bfae3081ccc457.1711825637267.1730809382979.1730812764638.399&__hssc=160404322.1.1730812764638&__hsfp=431818857). You can keep the scraper to yourself or make it public by adding it to Apify Store (and [find users](https://blog.apify.com/make-regular-passive-income-developing-web-automation-actors-b0392278d085/) for it).

Or let us know if you need a [custom scraping solution](https://apify.com/custom-solutions).

### Your feedback

We’re always working on improving the performance of our Actors. So if you’ve got any technical feedback for Facebook Pages Scraper or simply found a bug, please create an issue on the Actor’s [Issues tab](https://apify.com/apify/facebook-followers-following-scraper/issues/open) in Apify Console.

# Actor input Schema

## `startUrl` (type: `string`):

Enter the URL of the page you want to scrape.

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

Maximum number of pages to scrape.

## `maxImages` (type: `integer`):

Maximum number of images to download.

## `downloadAsZip` (type: `boolean`):

If enabled, all images will be downloaded in a single bundled ZIP archive. Otherwise, images will be downloaded individually to a [Key-value Store](https://docs.apify.com/platform/storage/key-value-store).

## `globs` (type: `array`):

Glob patterns matching URLs of pages that will be included in crawling.

## Actor input object example

```json
{
  "startUrl": "https://www.apify.com",
  "maxPages": 1,
  "maxImages": 100,
  "globs": [
    {
      "glob": "**"
    }
  ]
}
```

# 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 = {
    "startUrl": "https://www.apify.com",
    "maxPages": 1,
    "maxImages": 100,
    "downloadAsZip": false,
    "globs": [
        {
            "glob": "**"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("apify/image-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 = {
    "startUrl": "https://www.apify.com",
    "maxPages": 1,
    "maxImages": 100,
    "downloadAsZip": False,
    "globs": [{ "glob": "**" }],
}

# Run the Actor and wait for it to finish
run = client.actor("apify/image-downloader").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "startUrl": "https://www.apify.com",
  "maxPages": 1,
  "maxImages": 100,
  "downloadAsZip": false,
  "globs": [
    {
      "glob": "**"
    }
  ]
}' |
apify call apify/image-downloader --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=apify/image-downloader",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/v7yLxJu8cSGL6mKIA/builds/dML9KExTbQd9233Ve/openapi.json
