# Pinterest Image Downloader (`w3crawler/pinterest-image-downloader`) Actor

Download high-quality images from Pinterest by keyword search or pin URLs, save images in the key-value store, and record image metadata in the dataset.

- **URL**: https://apify.com/w3crawler/pinterest-image-downloader.md
- **Developed by:** [w3crawler](https://apify.com/w3crawler) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 1,000 images

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## Pinterest Image Downloader

Downloads high-quality images from Pinterest pins via keyword search or specific pin URLs. Saves images to Apify Key-Value Store and optionally records metadata (title, pinner, board, dimensions) in the dataset — ideal for building image datasets, creative asset libraries, and visual content research.

### Features

- **Two modes** — search by keyword or provide specific pin URLs
- **Multiple quality options** — original, 736px, 474px, or 236px wide
- **Rich metadata** — title, description, hashtags, pinner, board, dominant color, engagement stats
- **Key-Value Store download** — images saved as binary files with their pin ID as key
- **Dataset metadata** — optionally record image metadata alongside the KV store download
- **Cloud-ready** — runs on Apify with scheduling, optional proxy configuration, and webhook support

### Use Cases

- Building image datasets for machine learning training
- Creative asset collection and mood board building
- Visual content research and trend analysis
- Downloading pin images for offline use or design projects

### Input

| Field | Type | Default | Required | Description |
|-------|------|---------|----------|-------------|
| `mode` | string | `search` |  | `search` to find images by keyword, or `pinUrls` to download specific pins. |
| `query` | string | `—` |  | Search keyword to find pins. Used when `mode` is `search`. |
| `pinUrls` | array | `—` |  | List of Pinterest pin URLs to download. Used when `mode` is `pinUrls`. |
| `maxItems` | integer | `50` |  | Maximum number of images to download (up to 500). |
| `imageQuality` | string | `original` |  | Image quality: `original`, `736x`, `474x`, or `236x`. |
| `saveToDataset` | boolean | `true` |  | Also save image metadata to the dataset. |
| `proxyConfiguration` | object | direct connection |  | Optional proxy settings. Set `useApifyProxy` to `true` when needed. |

### Output

Each downloaded image entry includes:

| Field | Description |
|-------|-------------|
| `pinId` | Pinterest pin ID |
| `title` | Pin title |
| `description` | Pin description text |
| `altText` | Image alt text |
| `hashtags` | Array of hashtags |
| `pinUrl` | Full URL to the pin |
| `destinationUrl` | External link destination |
| `imageUrl` | URL of the downloaded image |
| `imageQuality` | Quality/size selected (`original`, `736x`, etc.) |
| `imageWidth` | Image width in pixels |
| `imageHeight` | Image height in pixels |
| `imageOrigUrl` | Original resolution image URL |
| `image736Url` | 736px wide image URL |
| `image474Url` | 474px wide image URL |
| `image236Url` | 236px wide image URL |
| `dominantColor` | Dominant color hex code |
| `saves` | Number of saves/repins |
| `likeCount` | Number of likes |
| `commentCount` | Number of comments |
| `pinnerId` | Pinner's user ID |
| `pinnerUsername` | Pinner's Pinterest username |
| `pinnerFullName` | Pinner's display name |
| `boardId` | Board ID the pin belongs to |
| `boardName` | Board name |
| `boardUrl` | Full URL to the board |
| `sourceDomain` | Source domain of the original content |
| `kvStoreKey` | Key under which the image is saved in KV Store |
| `downloaded` | Whether the image was successfully downloaded |
| `createdAt` | Pin creation timestamp |
| `scrapedAt` | ISO 8601 timestamp of scrape |

#### Sample Output

```json
{
  "pinId": "135792468",
  "title": "Minimalist Nordic Living Room",
  "description": "Clean lines and neutral tones for a calm home.",
  "pinUrl": "https://www.pinterest.com/pin/135792468/",
  "imageUrl": "https://i.pinimg.com/originals/12/34/56/123456.jpg",
  "imageQuality": "original",
  "imageWidth": 1080,
  "imageHeight": 1350,
  "dominantColor": "#F5F5F0",
  "saves": 4200,
  "pinnerUsername": "homedecorinspo",
  "boardName": "Living Room Ideas",
  "kvStoreKey": "image_135792468",
  "downloaded": true,
  "scrapedAt": "2026-05-21T10:00:00.000Z"
}
```

### Notes

- **KV Store**: Downloaded images are stored in Apify Key-Value Store under the key `image_<pinId>`. Access via the Apify Console or API.
- **Proxy**: Direct connections are used by default. You can enable Apify Proxy with `proxyConfiguration: { "useApifyProxy": true }`; the dataset records whether a proxy was actually configured.
- **Image quality**: `original` provides the highest resolution available on Pinterest (varies per pin). Use `736x` for a good balance of quality and file size.
- **Scheduling**: Use Apify Scheduler to regularly collect new images for a specific search query.

# Changelog

This Actor's version history is a separate document: https://apify.com/w3crawler/pinterest-image-downloader/changelog.md

# Actor input Schema

## `mode` (type: `string`):

Search for images or download from specific pin URLs.

## `query` (type: `string`):

Keyword to search for pins to download images from. Used when mode is 'search'.

## `pinUrls` (type: `array`):

List of Pinterest pin URLs to download images from. Used when mode is 'pinUrls'.

## `maxItems` (type: `integer`):

Maximum number of images to download.

## `imageQuality` (type: `string`):

Quality/size of the images to download.

## `saveToDataset` (type: `boolean`):

Also save image metadata (URL, title, pinner) to the dataset in addition to KV store.

## `proxyConfiguration` (type: `object`):

Optional proxy settings. Direct connections are used by default; enable Apify Proxy when needed.

## `fixtureFile` (type: `string`):

Optional repository-relative JSON fixture containing Pinterest pin image records for deterministic local validation.

## Actor input object example

```json
{
  "mode": "search",
  "query": "minimalist wallpaper",
  "pinUrls": [
    "https://www.pinterest.com/pin/123456789/"
  ],
  "maxItems": 50,
  "imageQuality": "original",
  "saveToDataset": true,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `keyValueStore` (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 = {
    "query": "minimalist wallpaper",
    "maxItems": 50,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("w3crawler/pinterest-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 = {
    "query": "minimalist wallpaper",
    "maxItems": 50,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("w3crawler/pinterest-image-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 '{
  "query": "minimalist wallpaper",
  "maxItems": 50,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call w3crawler/pinterest-image-downloader --silent --output-dataset

```

## MCP server setup

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