# Pinterest Scraper (Pay per Event) (`eiv/pinterest-fetcher`) Actor

Scrape Pinterest pins by keyword or URL. Extract high-resolution images, saves, likes, shares, comments, author profiles, board details, dominant colors, and full metadata as JSON. Supports bulk scraping with pagination and configurable comment limits.

- **URL**: https://apify.com/eiv/pinterest-fetcher.md
- **Developed by:** [Eimantas V](https://apify.com/eiv) (community)
- **Categories:** Social media, Lead generation, E-commerce
- **Features:** Limited permissions
- **Stats:** 41 total users, 7 monthly users, 97.6% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.20 / 1,000 pin scrapes

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

## Pinterest Pin Scraper with Comments

Scrape Pinterest pins by keyword search or direct URL. Extract high-resolution images, engagement metrics, comments, author profiles, board details, and full metadata as structured JSON.

### Features

- **Keyword Search** -- Search any keyword and extract matching pins with images, descriptions, and engagement stats.
- **Pin Details** -- Get full pin data: high-resolution images, video info, author, board, saves, likes, comments, and dominant color.
- **Comments** -- Optionally scrape comments on pins with configurable limit per pin.

### Supported URL Types

| URL Type | Example |
|----------|---------|
| Pin | `https://www.pinterest.com/pin/140806232605639/` |
| Search | `https://www.pinterest.com/search/pins/?q=quilting` |

### Input Parameters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `searchQuery` | string | -- | Keyword to search on Pinterest |
| `startUrls` | string\[] | -- | List of Pinterest pin URLs to scrape |
| `maxItems` | integer | `50` | Maximum number of pins to return (1--10,000) |
| `pageLimit` | integer | `1` | Maximum pages to scrape per search query (1--100) |
| `sortBy` | string | `"none"` | Sort results by metric: `none`, `likes`, `repins`, `comments`, or `shares`. Descending order. Only applies to search queries. |
| `scrapeComments` | boolean | `false` | Scrape comments on pins. Enabling this will significantly increase run time. |
| `maxComments` | integer | `0` | Maximum comments per pin. `0` = all comments. Only used when `scrapeComments` is enabled. |
| `proxyConfig` | object | Apify Proxy | Proxy settings. Pinterest requires proxies for reliable scraping. |

You must provide at least one of `searchQuery` or `startUrls`.

#### Input Example

```json
{
    "searchQuery": "minimalist home decor",
    "startUrls": [
        "https://www.pinterest.com/pin/140806232605639/"
    ],
    "maxItems": 100,
    "pageLimit": 3,
    "sortBy": "likes",
    "scrapeComments": true,
    "maxComments": 10,
    "proxyConfig": {
        "useApifyProxy": true
    }
}
```

### Output Format

Each scraped item is stored as an object in the default dataset.

#### Pin Fields

| Field | Type | Description |
|-------|------|-------------|
| `type` | string | Always `"pin"` |
| `id` | string | Unique pin ID |
| `url` | string | Pinterest pin URL |
| `title` | string | Pin title |
| `description` | string | Pin description |
| `seo_description` | string | SEO-optimized description |
| `image_url` | string | Highest resolution image URL available |
| `image_signature` | string | Unique image hash |
| `images` | object | Available image resolutions with dimensions |
| `dominant_color` | string | Dominant color hex code |
| `domain` | string | Source website domain |
| `is_video` | boolean | Whether the pin contains a video |
| `repin_count` | number | Number of saves/repins |
| `like_count` | number | Number of likes (heart reactions) |
| `comment_count` | number | Number of comments |
| `share_count` | number | Number of shares |
| `reaction_counts` | object | Breakdown of reaction types |
| `pinner` | object | Pin author info (id, username, full_name, follower_count, avatar URLs) |
| `origin_pinner` | object | Original content creator (if pin is a repin) |
| `board` | object | Board info (id, name, url, privacy, owner) |
| `created_at` | string | Creation timestamp |
| `is_repin` | boolean | Whether this is a repin |
| `aggregated_pin_data` | object | Aggregated stats (saves, comment_count) |
| `pin_join` | object | Related topics and annotations |
| `comments` | array | Comments with author info (only when `scrapeComments` is enabled) |

#### Output Example

```json
{
    "type": "pin",
    "id": "140806232605639",
    "url": "https://www.pinterest.com/pin/140806232605639/",
    "title": "Paper Art with Stars | Quilting Crafts | Star and moon quilt",
    "description": " ",
    "seo_description": "Explore this stunning piece of paper art with stars...",
    "image_url": "https://i.pinimg.com/originals/01/77/07/017707905e51af6f6cb8b2b9344b67be.jpg",
    "image_signature": "017707905e51af6f6cb8b2b9344b67be",
    "images": {
        "236x": {
            "width": 236,
            "height": 285,
            "url": "https://i.pinimg.com/236x/01/77/07/017707905e51af6f6cb8b2b9344b67be.jpg"
        }
    },
    "dominant_color": "#3d4244",
    "domain": "Uploaded by user",
    "is_video": false,
    "repin_count": 1547,
    "like_count": 244,
    "comment_count": 25,
    "share_count": 33,
    "reaction_counts": { "1": 244, "5": 1, "7": 1, "11": 2 },
    "pinner": {
        "id": "VXNlcjoxNDA5NDM2NDY3ODgwMTU=",
        "full_name": "Veronica Martinez Tovar",
        "username": "vmtgraphic",
        "follower_count": 1786,
        "image_medium_url": "https://i.pinimg.com/75x75_RS/7e/84/ff/7e84ff0457be77f9dab7e5fbb415637d.jpg"
    },
    "origin_pinner": {
        "id": "VXNlcjo0NDQ3MzA2NjkzNjEzMjQ1Mjk=",
        "full_name": "Robin Hazekamp",
        "username": "rdbhazekamp",
        "follower_count": 66
    },
    "board": {
        "id": "Qm9hcmQ6MTQwODc0OTI3NzQzMTI5",
        "name": "quilt patrones per crochet",
        "url": "/vmtgraphic/quilt-patrones-per-crochet/",
        "privacy": "public"
    },
    "created_at": "Thu, 29 Feb 2024 19:39:24 +0000",
    "is_repin": true,
    "aggregated_pin_data": {
        "id": "5109068500463310569",
        "comment_count": 25,
        "saves": 15164
    },
    "comments": [
        {
            "content": "Pattern is Eclipse by Emma How of Sampaquita Quilts in Australia.",
            "name": "jlabeause",
            "avatar": "https://i.pinimg.com/75x75_RS/ff/f4/b1/fff4b1dc0d76b5c4224361b9b25199a4.jpg",
            "url": "https://www.pinterest.com/jlabeause"
        }
    ]
}
```

### Usage Tips

- Use `searchQuery` for keyword-based discovery and `startUrls` for scraping specific pins. Both can be combined in a single run.
- Set `maxItems` to control total output size and keep costs predictable.
- Set `pageLimit` to control how deep pagination goes for search queries.
- Enable `scrapeComments` only when you need comment data -- it uses a browser and increases run time.
- Use `maxComments` to limit comments per pin (e.g. `5` for just the top comments).
- Proxy is recommended for reliable results. Apify Proxy works out of the box.

# Actor input Schema

## `searchQuery` (type: `string`):

Keyword to search on Pinterest. Results will be scraped from search.

## `startUrls` (type: `array`):

List of Pinterest URLs to scrape. Supports pin detail, ideas, user profiles, collections, and search URLs.

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

Maximum number of items to scrape. Use to limit results and save resources.

## `pageLimit` (type: `integer`):

Maximum number of pages to scrape per URL or search query. Default is 1.

## `sortBy` (type: `string`):

Sort scraped results by the selected metric in descending order. Only applies to search queries.

## `scrapeComments` (type: `boolean`):

Scrape comments on pins. Enabling this will significantly increase run time.

## `maxComments` (type: `integer`):

Maximum number of comments to scrape per pin. Only used when 'Include Comments' is enabled. Set to 0 for all comments.

## `proxyConfig` (type: `object`):

Proxy settings. Pinterest requires proxies for reliable scraping.

## Actor input object example

```json
{
  "searchQuery": "minimalist home decor",
  "startUrls": [
    "https://www.pinterest.com/pin/1054827543951238554/",
    "https://www.pinterest.com/search/pins/?q=design"
  ],
  "maxItems": 50,
  "pageLimit": 1,
  "sortBy": "none",
  "scrapeComments": false,
  "maxComments": 0,
  "proxyConfig": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

Pinterest data as structured JSON in the default dataset.

# 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 = {
    "searchQuery": "minimalist home decor",
    "startUrls": [
        "https://www.pinterest.com/pin/1054827543951238554/",
        "https://www.pinterest.com/search/pins/?q=design"
    ],
    "proxyConfig": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("eiv/pinterest-fetcher").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 = {
    "searchQuery": "minimalist home decor",
    "startUrls": [
        "https://www.pinterest.com/pin/1054827543951238554/",
        "https://www.pinterest.com/search/pins/?q=design",
    ],
    "proxyConfig": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("eiv/pinterest-fetcher").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 '{
  "searchQuery": "minimalist home decor",
  "startUrls": [
    "https://www.pinterest.com/pin/1054827543951238554/",
    "https://www.pinterest.com/search/pins/?q=design"
  ],
  "proxyConfig": {
    "useApifyProxy": true
  }
}' |
apify call eiv/pinterest-fetcher --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,eiv/pinterest-fetcher"
        }
    }
}
```

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/yLoirSPyhDp8eWmiu/builds/mQ1uYCoZPbnyTbBda/openapi.json
