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

Scrape Pinterest pins, boards, profiles and search results without login. Full pin detail (image/video URLs, saves, outbound link, domain), board feeds, and user profiles via Pinterest's public web API, with auto-escalating anti-bot fallback.

- **URL**: https://apify.com/inexhaustible_glass/pinterest-scraper.md
- **Developed by:** [Hitman studio](https://apify.com/inexhaustible_glass) (community)
- **Categories:** Social media, E-commerce
- **Features:** Limited permissions
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.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/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

Scrape **Pinterest without login** — pins, boards, user profiles and search
results — using Pinterest's own public web API (the same `/resource/...` JSON
endpoints the website itself calls). Clean, flat output; no cookies required.

### What it scrapes

| Input | You get |
|-------|---------|
| **Search query** (`home office setup`) | matching pins — title, description, image, saves, outbound link, domain |
| **Pin URL / id** (`/pin/<id>/`) | one pin, full detail |
| **Board URL** (`/<user>/<board>/`) | board info + all its pins (paginated) |
| **Profile URL / username** (`/<user>/`) | user profile + their pins |
| **Profile + `scrapeUserBoards`** | the user's boards |

Give it any mix of `startUrls`, `search` queries, and `usernames` — the kind of
each URL is auto-detected.

### Output fields

- **Pin**: `id`, `url`, `title`, `description`, `image_url`, `is_video`,
  `video_url`, `repin_count` (saves), `comment_count`, `outbound_link`,
  `domain`, `is_promoted`, `pinner_username`, `board_name`, `created_at`,
  `dominant_color`
- **Board**: `id`, `name`, `url`, `description`, `pin_count`, `follower_count`,
  `privacy`, `category`, `owner_username`
- **User**: `username`, `full_name`, `url`, `about`, `follower_count`,
  `following_count`, `pin_count`, `board_count`, `image_url`, `website`

### Example input

```json
{
  "search": ["home office setup"],
  "startUrls": [
    "https://www.pinterest.com/nike/",
    "https://www.pinterest.com/nike/look-of-football-soccer/"
  ],
  "maxItems": 100
}
```

### Anti-bot: mostly free, auto-escalating

Fetching rides an **auto-escalating ladder** (`smart_scrape`) and climbs only as
far as a site actually needs:

- **T0–T1** browser-TLS HTTP (`curl_cffi`, real Chrome fingerprint) — enough for
  Pinterest's public API today, and 100% free.
- **T2** free WARP egress IP (self-hosted runs).
- **T3** solve a Cloudflare challenge **once** with a stealth browser, **cache
  the `cf_clearance` cookie**, then serve every later page over fast plain HTTP.
- **T4** Apify residential proxy — only if Pinterest ever starts blocking the
  datacenter IP (`useResidentialProxy: true`).

So a normal run costs nothing beyond compute; the heavy tiers are a safety net,
not the default path.

### Notes & honest limits

- **Comments** (`includeComments: true`, for pin URLs): the pin's top/highlighted
  comments come embedded in the pin detail (guaranteed), and the actor also tries
  the full comment feed (`UnifiedCommentsResource`) when a pin has more. Comments
  are sparse on most Pinterest pins, so many pins legitimately return none.
- Logged-out, Pinterest returns **signed pin ids** for *search* results (not the
  numeric id), so a searched pin's canonical `/pin/<id>/` URL may differ from its
  detail-page id. User/board feeds return normal numeric ids.
- **Idea Pins** (`/ideas/...`) are **not supported** — Pinterest keeps idea-page
  data behind its logged-out "lockdown" (it needs a signed-in session).
- Respect Pinterest's Terms of Service and keep request volume reasonable.

# Actor input Schema

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

Pin, board, or profile URLs to scrape. The kind is auto-detected: /pin/<id> → one pin, /<user>/<board> → a board + its pins, /<user> → profile + their pins. You can also paste a search URL (/search/pins/?q=...).

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

Keywords to search Pinterest for. Each query returns matching pins up to Max items.

## `usernames` (type: `array`):

Pinterest usernames (with or without @) to scrape. Returns the profile plus their pins (or boards, if 'Scrape user boards' is on).

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

Maximum pins/boards to fetch for each search, board, or user. Single pins ignore this.

## `endPage` (type: `integer`):

Cap how many resource pages to fetch per target (search/board/profile). Empty = until maxItems. Lower = faster, fewer results.

## `scrapeUserBoards` (type: `boolean`):

For username/profile targets, fetch the user's boards instead of their pins.

## `includeUserInfoOnly` (type: `boolean`):

For profile URLs: output only the user's profile record, skip their pins/boards.

## `includeComments` (type: `boolean`):

For pin targets, also output the pin's top/highlighted comments (text, author, reply count) as separate rows. Comes free with the pin detail — no extra requests.

## `includeCommentReplies` (type: `boolean`):

For pin URLs with includeComments: also output nested replies under each comment (parent_comment_id links them).

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

Cap how many comments to fetch per pin when includeComments is on.

## `includeBoardSections` (type: `boolean`):

For board targets, also output the board's sections and the pins inside each section as separate rows.

## `useWarp` (type: `boolean`):

Route traffic through a free Cloudflare WARP IP (built in — no setup). This is the default egress and keeps runs free. Turn off to use an Apify proxy instead.

## `useResidentialProxy` (type: `boolean`):

Also fetch an Apify RESIDENTIAL proxy as a paid last resort, used only if WARP gets blocked. Costs extra proxy credits. With WARP off, residential becomes the base egress.

## `proxyCountry` (type: `string`):

Optional 2-letter country code for the residential proxy (e.g. US, GB, DE). Leave blank for automatic.

## `outputFields` (type: `array`):

Optional list of field names to keep in each output row (e.g. id, description, image_url). Empty = keep all fields.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.pinterest.com/pin/516084438595318488/",
    "https://www.pinterest.com/nike/"
  ],
  "search": [
    "home office setup"
  ],
  "usernames": [],
  "maxItems": 100,
  "scrapeUserBoards": false,
  "includeUserInfoOnly": false,
  "includeComments": false,
  "includeCommentReplies": false,
  "maxComments": 100,
  "includeBoardSections": false,
  "useWarp": true,
  "useResidentialProxy": false
}
```

# Actor output Schema

## `results` (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 = {
    "startUrls": [],
    "search": [
        "home office setup"
    ],
    "usernames": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("inexhaustible_glass/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 = {
    "startUrls": [],
    "search": ["home office setup"],
    "usernames": [],
}

# Run the Actor and wait for it to finish
run = client.actor("inexhaustible_glass/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 '{
  "startUrls": [],
  "search": [
    "home office setup"
  ],
  "usernames": []
}' |
apify call inexhaustible_glass/pinterest-scraper --silent --output-dataset

```

## MCP server setup

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