# Pinterest Scraper (`bgfc97/pinterest-scraper`) Actor

Scrape Pinterest by keyword, board or profile: pin title, description, image, destination link, saves, board and author. No login. Fast via internal API.

- **URL**: https://apify.com/bgfc97/pinterest-scraper.md
- **Developed by:** [Bruno](https://apify.com/bgfc97) (community)
- **Categories:** Social media, Marketing
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 pin scrapeds

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

## Pinterest Scraper (Pins, Boards, Profiles, Search)

Scrape **public** Pinterest pins with **no login** from three kinds of input:

- **Keyword search** — e.g. `home decor`, `minimalist kitchen`
- **Board URL** — e.g. `https://www.pinterest.com/username/board-name/`
- **Profile URL** — e.g. `https://www.pinterest.com/username/` (or `@username`)

For every pin you get one clean row.

### Input

| Field | Description |
|-------|-------------|
| `search` | List of keywords. Each returns matching public pins. |
| `boardUrls` | List of board URLs (or `username/board-name`). Returns the pins in each board. |
| `profileUrls` | List of profile URLs / `@username`. Returns the pins on each profile. |
| `startUrls` | Optional mixed list of Pinterest URLs; boards and profiles are auto-detected. |
| `maxItems` | Max pins **per source** (per keyword / board / profile). Default `100`. |
| `proxyConfiguration` | Proxy. Default is Apify Proxy **datacenter** (cheap and enough). Escalate to RESIDENTIAL / UNBLOCKER only if rate-limited. |

### Output (one row per pin)

`source`, `query`, `id`, `title`, `description`, `pin_url`, `image_url`, `is_video`, `video_url`,
`destination_link` (the outbound/source link), `domain`, `saves` (repins), `comments`, `reactions`,
`dominant_color`, `alt_text`, `created_at`, `created_at_iso`,
`board_id`, `board_name`, `board_url`, `author_username`, `author_name`, `author_followers`, `is_promoted`.

> Note: keyword-search results are returned in a lighter field set, so `saves`/`comments` may be `null`
> there; board and profile results include them when Pinterest exposes them.

### How it works

Pure HTTP against Pinterest's own internal `/resource/*/get/` JSON API
(`BaseSearchResource`, `BoardFeedResource`, `UserActivityPinsResource`) through Apify Proxy — no
headless browser, so it is fast and cheap. It seeds a `csrftoken` session, sends the required
`x-pinterest-pws-handler` / `x-csrftoken` headers, and paginates with Pinterest bookmarks until it
reaches `maxItems`.

### Typical uses

Content and marketing research, trend discovery, competitor board monitoring, building mood boards /
datasets of images and destination links, e-commerce product-pin harvesting.

# Actor input Schema

## `search` (type: `array`):

Keywords to search on Pinterest, e.g. "home decor", "minimalist kitchen". Each keyword returns matching public pins. Combine with maxItems to cap results per keyword.

## `boardUrls` (type: `array`):

Full board URLs, e.g. https://www.pinterest.com/username/board-name/. Returns the pins saved in each board. You can also paste the short username/board-name form.

## `profileUrls` (type: `array`):

Pinterest profile URLs (https://www.pinterest.com/username/) or plain @username / username. Returns the pins created/saved on that profile.

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

Optional mixed list of Pinterest URLs. Board URLs and profile URLs are auto-detected and routed accordingly. Handy when you already have a list and don't want to split it into boards vs profiles.

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

Maximum number of pins to collect PER source (per keyword, per board, per profile). The Actor paginates with Pinterest bookmarks until it reaches this number or runs out of pins.

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

Proxy used for every request. Pinterest's public JSON API answers fine over Apify Proxy DATACENTER IPs (group BUYPROXIES94952), which is the cheap default. If you ever hit rate limits, switch to RESIDENTIAL, and only as a last resort to the UNBLOCKER group. The account running the Actor pays for proxy usage.

## Actor input object example

```json
{
  "search": [
    "home decor"
  ],
  "boardUrls": [],
  "profileUrls": [],
  "startUrls": [],
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "BUYPROXIES94952"
    ]
  }
}
```

# Actor output Schema

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

Scraped Pinterest pins. One row per pin: id, title, description, image URL, destination link + domain, saves/repins, comments, reactions, board, author/username and the pin URL.

# 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 = {
    "search": [
        "home decor"
    ],
    "boardUrls": [],
    "profileUrls": [],
    "startUrls": [],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "BUYPROXIES94952"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("bgfc97/pinterest-scraper").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 = {
    "search": ["home decor"],
    "boardUrls": [],
    "profileUrls": [],
    "startUrls": [],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["BUYPROXIES94952"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("bgfc97/pinterest-scraper").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 '{
  "search": [
    "home decor"
  ],
  "boardUrls": [],
  "profileUrls": [],
  "startUrls": [],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "BUYPROXIES94952"
    ]
  }
}' |
apify call bgfc97/pinterest-scraper --silent --output-dataset

```

## MCP server setup

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

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/6pxBkwvfdwWIc3Gvg/builds/YvAA0EHEDQrcEaJye/openapi.json
