# 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
- **Stats:** 4 total users, 2 monthly users, 98.9% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 results

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## 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("💾 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 '{
  "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": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=eiv/pinterest-fetcher",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Pinterest Scraper (Pay per Event)",
        "description": "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.",
        "version": "0.0",
        "x-build-id": "yPKGys5WbcihUKrOI"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/eiv~pinterest-fetcher/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-eiv-pinterest-fetcher",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/eiv~pinterest-fetcher/runs": {
            "post": {
                "operationId": "runs-sync-eiv-pinterest-fetcher",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/eiv~pinterest-fetcher/run-sync": {
            "post": {
                "operationId": "run-sync-eiv-pinterest-fetcher",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "searchQuery": {
                        "title": "Search Query",
                        "type": "string",
                        "description": "Keyword to search on Pinterest. Results will be scraped from search."
                    },
                    "startUrls": {
                        "title": "Pinterest URLs",
                        "type": "array",
                        "description": "List of Pinterest URLs to scrape. Supports pin detail, ideas, user profiles, collections, and search URLs.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxItems": {
                        "title": "Max Results",
                        "minimum": 1,
                        "maximum": 10000,
                        "type": "integer",
                        "description": "Maximum number of items to scrape. Use to limit results and save resources.",
                        "default": 50
                    },
                    "pageLimit": {
                        "title": "Page Limit",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Maximum number of pages to scrape per URL or search query. Default is 1.",
                        "default": 1
                    },
                    "sortBy": {
                        "title": "Sort Results By",
                        "enum": [
                            "none",
                            "likes",
                            "repins",
                            "comments",
                            "shares"
                        ],
                        "type": "string",
                        "description": "Sort scraped results by the selected metric in descending order. Only applies to search queries.",
                        "default": "none"
                    },
                    "scrapeComments": {
                        "title": "Include Comments",
                        "type": "boolean",
                        "description": "Scrape comments on pins. Enabling this will significantly increase run time.",
                        "default": false
                    },
                    "maxComments": {
                        "title": "Max Comments Per Pin",
                        "minimum": 0,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Maximum number of comments to scrape per pin. Only used when 'Include Comments' is enabled. Set to 0 for all comments.",
                        "default": 0
                    },
                    "proxyConfig": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Proxy settings. Pinterest requires proxies for reliable scraping."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
