# Pinterest Scraper (`scrapers-hub/pinterest-scraper`) Actor

Pinterest Scraper extracts pins, creators, boards and media by keyword or URL, enriched with sentiment scores, confidence and content category labels. 📌 Built for social listening, trend forecasting and audience research.

- **URL**: https://apify.com/scrapers-hub/pinterest-scraper.md
- **Developed by:** [Scrapers Hub](https://apify.com/scrapers-hub) (community)
- **Categories:** Social media, Lead generation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.99 / 1,000 results

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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 Scraper – Extract Pins, Boards, Profiles & Video Pin Data

The **Pinterest Scraper** extracts pins, boards, profiles and video pins from Pinterest search results and returns them as structured JSON. Give it a keyword or a Pinterest search URL, choose which result type you want, and it collects the pin content, creator details, board references, media assets and Pinterest's own metadata into one dataset you can analyse, store or feed into a downstream pipeline.

Pinterest is a visual discovery engine with strong commercial intent — people search it to plan purchases, projects and events. That makes Pinterest data valuable for trend research, competitor monitoring, influencer discovery and content strategy. This Pinterest scraper turns that discovery surface into structured records, with optional lightweight content analysis, sentiment scoring and content categorisation attached to each pin.

***

### 📊 What Data Can You Extract with This Pinterest Scraper?

Records are shaped by the result type you request. Across pins, boards and profiles, the scraper returns the following field groups.

| Category | Fields | What it gives you |
|---|---|---|
| 🧭 Record identity | `type`, `entity_type`, `schema`, `id`, `url` | What kind of record it is, its Pinterest ID, canonical URL, and the output schema version |
| 📌 Pin content | `title`, `pin` | The pin title plus the nested pin object containing description and pin-level detail |
| 👤 Creator data | `creator` | The nested creator object with username, full name and follower count |
| 🗂️ Board context | `board_ref`, `board` | The board a pin belongs to, and full board records when scraping the boards result type |
| 🖼️ Media assets | `media` | Image variants with their URLs and dimensions for each pin |
| 🔍 Provenance | `source_url`, `seed_type`, `seed_value` | Exactly which search URL or keyword produced the record, so results stay traceable |
| 😊 Sentiment analysis | `sentiment_score`, `sentiment_score_normalized`, `sentiment_confidence`, `sentiment_label` | Heuristic sentiment scoring of the pin description when enabled |
| 🏷️ Content classification | `content_category_label`, `content_category_path`, `content_category_confidence`, `content_category_match_type` | Category assignment with a hierarchical path and match confidence |
| 📦 Raw extras | `extra`, `profile` | Additional Pinterest metadata, and full profile records for the profiles result type |

The `seed_type` and `seed_value` pair is quietly one of the most useful things in the output. When you run a dozen keywords in one job, every record still knows which keyword or URL produced it — so you can group, compare and rank results per query without keeping a separate mapping.

***

### 🌟 Key Features of the Pinterest Scraper

| Feature | Description |
|---|---|
| 🔎 Keyword and URL input | Feed plain keyword strings via `queries`, Pinterest search URLs via `startUrls`, or both in the same run |
| 🗃️ Four result types | Switch between `all-pins`, `videos`, `boards` and `profiles` with a single `type` setting |
| 🖼️ Full media variants | The `media` object carries image variants with width, height and direct URLs for each pin |
| 🗂️ Board enrichment | `enrich_boards` fetches full board details — owner, preview images, cover images — so `board_ref.extra` is complete |
| 🏷️ Content analysis | Optional `content_analysis` attaches hashtags, extracted links, word count and a `has_price` flag to each pin |
| 😊 Sentiment scoring | Optional heuristic sentiment on pin descriptions, returned as a score, normalised score, confidence and label |
| 🍪 Cookie support | Supply a Pinterest cookie header from a logged-in session to improve reliability and result depth |
| 🎚️ Per-search result limits | `limit` caps how many records are saved per keyword search, so validation runs stay small and cheap |
| 🔄 Automatic proxy handling | Proxy rotation is handled internally — there is no proxy field to configure |

***

### 🚀 Why Choose This Pinterest Scraper?

**One actor covers four Pinterest entity types.** Rather than stitching together separate tools for pins, video pins, boards and creator profiles, the `type` field switches the whole run. The record shape adapts — pins carry `pin` and `media`, boards carry `board`, profiles carry `profile` — while identity and provenance fields stay consistent across all of them.

**Enrichment is optional and explicit.** `enrich_boards`, `content_analysis` and `sentinent_analysis` are independent toggles. You decide whether the extra requests and processing are worth it for a given job, rather than paying for analysis you will not read.

**Every record is traceable to its seed.** `source_url`, `seed_type` and `seed_value` mean a multi-keyword run produces a single dataset you can still segment perfectly by query. That matters for competitive research where the comparison between keywords is the whole point.

**Structured media, not just a thumbnail URL.** The `media` object exposes image variants with their dimensions, so you can pick the right resolution for a moodboard, a report or a downstream image pipeline without guessing at URL patterns.

***

### 📥 Input

```json
{
  "startUrls": [
    { "url": "https://www.pinterest.com/search/pins/?q=home%20decor" }
  ],
  "queries": ["home decor", "scandinavian interior"],
  "type": "all-pins",
  "limit": 500,
  "enrich_boards": true,
  "content_analysis": false,
  "sentinent_analysis": false
}
```

#### 🔧 Pinterest Scraper Input Fields

| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| `startUrls` | array | No | `[{"url": "https://www.pinterest.com/search/pins/?q=home%20decor"}]` | Pinterest search URLs. Only URLs containing a `?q=` query are usable |
| `queries` | array | No | `["home decor"]` | Plain keyword strings; each is expanded into a Pinterest search |
| `type` | string | No | `"all-pins"` | What kind of results to collect. One of `all-pins`, `videos`, `boards`, `profiles` |
| `limit` | integer | No | `50000` | Maximum number of records to save for each keyword search. Use a smaller number for fast validation |
| `enrich_boards` | boolean | No | `true` | Fetch full board details (owner, preview images, cover\_images) so `board_ref.extra` is complete. Adds one cached request per unique board |
| `content_analysis` | boolean | No | `false` | Attach a lightweight `content_analysis` object (hashtags, extracted links, word count, has\_price) to each pin |
| `sentinent_analysis` | boolean | No | `false` | Attach a lightweight heuristic sentiment score for the pin description |
| `cookies` | string | No | — | Optional Pinterest cookie header from a logged-in browser session. Improves reliability and result depth |

**Result type options**

| Value | Meaning |
|---|---|
| `all-pins` | All pins — visual posts |
| `videos` | Video pins |
| `boards` | Boards — pin collections |
| `profiles` | Profiles — creator pages |

Note that `sentinent_analysis` is spelled as shown; the key name was kept as provided in the original input schema.

#### 💡 Input Examples

**Quick keyword validation run**

```json
{
  "queries": ["minimalist kitchen"],
  "type": "all-pins",
  "limit": 50,
  "enrich_boards": false
}
```

**Creator discovery via profiles**

```json
{
  "queries": ["food photography", "recipe developer"],
  "type": "profiles",
  "limit": 200
}
```

**Full analysis run on video pins**

```json
{
  "startUrls": [
    { "url": "https://www.pinterest.com/search/pins/?q=diy%20furniture" }
  ],
  "type": "videos",
  "limit": 1000,
  "content_analysis": true,
  "sentinent_analysis": true,
  "enrich_boards": true
}
```

***

### 📤 Output

A real pin record from an actual run:

```json
{
  "type": "pin",
  "schema": { "version": 2, "entity_type": "pin" },
  "entity_type": "pin",
  "id": "225039312627881892",
  "url": "https://www.pinterest.com/pin/225039312627881892/",
  "title": "Cozy Reading Nook",
  "source_url": "https://www.pinterest.com/search/pins/?q=home+decor",
  "seed_type": "url",
  "seed_value": "https://www.pinterest.com/search/pins/?q=home+decor",
  "pin": { "title": "Cozy Reading Nook", "description": "Neva Round Daybed in Recycled Faux Fur color: Pampas ..." },
  "creator": { "id": "225039450038600465", "username": "erinturnage", "full_name": "Erin Turnage", "follower_count": "..." },
  "board_ref": { "id": "225039381319533959", "name": "Reading Room Inspo", "url": "https://www.pinterest.com/erinturnage/..." },
  "media": { "images": { "thumb": { "width": 236, "height": 445, "url": "https://i.pinimg.com/236x/2c/24/91/2c2491..." } } },
  "extra": { "node_id": "UGluOjIyNTAzOTMxMjYyNzg4MTg5Mg==", "is_eligible_for_filters": false }
}
```

#### 🧾 Pinterest Output Fields — Core Record

| Field | Type | Description |
|---|---|---|
| `type` | string | Record type, e.g. `pin` |
| `schema` | object | Output schema version and entity type |
| `entity_type` | string | The Pinterest entity this record represents |
| `id` | string | Unique Pinterest identifier for the item |
| `url` | string | Canonical URL of the scraped item |
| `title` | string | Title of the item |
| `source_url` | string | The search URL the item was scraped from |
| `seed_type` | string | Whether the record came from a URL seed or a keyword seed |
| `seed_value` | string | The exact URL or keyword that produced the record |
| `pin` | object | Nested pin object with description and pin-level detail |
| `creator` | object | Nested creator object with username, full name and follower count |
| `board_ref` | object | Reference to the board the pin belongs to |
| `media` | object | Image variants with URLs and dimensions |
| `extra` | object | Additional Pinterest metadata for the item |
| `board` | object | Full board record, returned for the boards result type |
| `profile` | object | Full profile record, returned for the profiles result type |

#### 🧾 Pinterest Output Fields — Optional Analysis

| Field | Type | Description |
|---|---|---|
| `sentiment_score` | number | Raw heuristic sentiment score for the pin description |
| `sentiment_score_normalized` | number | Normalised sentiment score |
| `sentiment_confidence` | number | Confidence in the sentiment assessment |
| `sentiment_label` | string | Human-readable sentiment label |
| `content_category_label` | string | Assigned content category |
| `content_category_path` | array | Hierarchical category path |
| `content_category_confidence` | number | Confidence in the category assignment |
| `content_category_match_type` | string | How the category match was made |

***

### 💻 How to Use the Pinterest Scraper (Step by Step)

#### Step 1: Choose keywords or search URLs

You can drive the Pinterest scraper two ways. `queries` takes plain keyword strings and expands each into a Pinterest search — the simplest option and the one most people should start with. `startUrls` takes Pinterest search URLs directly, which is useful when you have already refined a search in the browser and want to reproduce it exactly. Only URLs containing a `?q=` query parameter are usable; board and profile URLs pasted directly will not work as seeds.

#### Step 2: Pick the result type

`type` decides the shape of everything that follows. `all-pins` is the default and returns visual posts. `videos` narrows to video pins, which matters if you are studying motion content performance. `boards` returns pin collections, useful for understanding how people group and curate a topic. `profiles` returns creator pages, which is the starting point for influencer discovery. Run separate jobs if you need more than one type.

#### Step 3: Set a sensible limit

`limit` defaults to 50000 records per keyword search, which is a ceiling rather than a target. For your first run set it to something small — 50 or 100 — so you can inspect the record shape and confirm the keyword returns what you expect before committing to a large job. Raise it once the output looks right.

#### Step 4: Decide on board enrichment

`enrich_boards` is on by default and fetches full board details so that `board_ref.extra` contains the owner, preview images and cover images. It adds one cached request per unique board, so on a run that touches thousands of distinct boards it has a real cost. Switch it off for fast, cheap harvests where the board name and URL alone are enough.

#### Step 5: Add content and sentiment analysis if you need it

`content_analysis` attaches hashtags, extracted links, word count and a `has_price` flag to each pin — the `has_price` signal is a quick way to separate commercial pins from purely inspirational ones. `sentinent_analysis` adds a heuristic sentiment score for the description. Both default to off. Turn them on when you are doing content strategy or brand-perception work, and leave them off for straightforward data collection.

#### Step 6: Supply cookies for better depth

The optional `cookies` field accepts a Pinterest cookie header copied from a logged-in browser session. Pinterest shows more to authenticated sessions than to anonymous ones, so providing cookies improves both reliability and how deep the scraper can go. It is entirely optional — the scraper works without it — but it is the single most effective lever if you find results thinner than expected.

#### Step 7: Run, review and export

Start the run and watch the log. When it finishes, open the Dataset tab and group by `seed_value` to compare keyword performance side by side. Export to JSON to preserve the nested `pin`, `creator`, `board_ref` and `media` objects, or flatten to CSV if you only need top-level fields such as `id`, `url`, `title` and the sentiment columns.

***

### 🔌 API Access & Integrations

Run the Pinterest scraper over HTTP and get dataset items back in the same request:

```bash
curl -X POST "https://api.apify.com/v2/acts/scrapers-hub~pinterest-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "queries": ["home decor"],
    "type": "all-pins",
    "limit": 100,
    "enrich_boards": false
  }'
```

With the Python client:

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_TOKEN")

run = client.actor("scrapers-hub/pinterest-scraper").call(run_input={
    "queries": ["scandinavian interior", "japandi living room"],
    "type": "all-pins",
    "limit": 300,
    "content_analysis": True,
    "enrich_boards": True,
})

by_keyword = {}
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    by_keyword.setdefault(item.get("seed_value"), []).append(item)

for keyword, pins in by_keyword.items():
    print(keyword, len(pins), "pins")
    print("  sample:", pins[0].get("title"), pins[0].get("url"))
```

Results can also be routed into Zapier, Make, Google Sheets or Slack, or delivered to your own service with an Apify webhook fired on run completion.

***

### 💡 Best Use Cases for Pinterest Data

#### 🎨 Visual Trend Research

Pinterest is where aesthetic trends surface before they reach mainstream retail. Scrape a category keyword monthly and track how `title` phrasing and `content_category_label` distributions shift over time. The `media` object gives you the imagery to build a visual trend deck, while `seed_value` keeps each month's snapshot cleanly separated.

#### 🛍️ E-commerce Product Discovery

With `content_analysis` enabled, the `has_price` flag and extracted links separate commercial pins from inspirational ones. Combine that with the destination links in the pin object to see which retailers are getting traction in a category, and use `board_ref` to understand what other products people group alongside them.

#### 🤝 Influencer and Creator Discovery

Run with `type` set to `profiles` to build a list of creators active in your niche, or scrape pins and aggregate the `creator` object across records to find who appears most often. Follower count in the creator object gives a first-pass sizing signal, and each creator's pins tell you whether their aesthetic actually fits your brand.

#### 🏢 Competitor Content Monitoring

Search for competitor brand names and product terms, then examine which of their pins are surfacing, which boards they appear on via `board_ref`, and how their descriptions read. `sentiment_label` on those descriptions gives a rough read on the tone competitors use, which is useful input when positioning your own content.

#### 🗂️ Board and Curation Analysis

Scraping with `type` set to `boards` reveals how people organise a topic — the board names, the themes they cluster around, and how many collections exist for a given search. This is category taxonomy research done from real user behaviour rather than from internal assumptions.

#### 🎬 Video Pin Performance Research

Set `type` to `videos` to isolate video pins. Comparing which topics generate video content versus static pins tells you where motion is worth the production cost, and the `media` object gives the associated assets for review.

#### 📈 Keyword Comparison and Content Planning

Because every record carries `seed_type` and `seed_value`, running ten candidate keywords in one job and grouping the output by seed gives you an immediate comparison of result volume and content character per keyword. That is a fast, evidence-based way to decide which terms to build a Pinterest content calendar around.

***

### ⚙️ Tips for Better Pinterest Scraping Results

- **Start with a small `limit`.** The default of 50000 per search is a ceiling. Run 50 first, check that the `pin`, `creator` and `media` objects contain what you need, then scale up.
- **Use specific keywords.** "Home decor" returns an enormous, generic set. "Japandi living room shelving" returns a smaller set that is far more useful for content or product research.
- **Turn off `enrich_boards` for large harvests.** It adds a request per unique board. If you only need the board name and URL from `board_ref`, disabling it makes big runs noticeably faster.
- **Supply cookies when depth matters.** A logged-in cookie header improves reliability and how far the scraper can go. Refresh it if results start thinning out, since session cookies expire.
- **Only `?q=` URLs work as seeds.** If you paste a board or profile URL into `startUrls` it will not be usable. Use `queries`, or a proper search URL.
- **Group by `seed_value` before analysing.** Mixing several keywords in one dataset is efficient, but any per-keyword comparison must group on the seed first or the numbers will be meaningless.

***

### 🛠️ Troubleshooting

**My `startUrls` entry returned nothing.**
Only Pinterest search URLs containing a `?q=` query parameter are usable as seeds. Board URLs, pin URLs and profile URLs will not produce results. Copy the URL from an actual Pinterest search, or use the `queries` field with a plain keyword instead.

**I am getting fewer results than my `limit`.**
`limit` is a maximum, not a target. A narrow keyword simply may not have that many pins available in search results. Broaden the keyword, add more entries to `queries`, or supply a `cookies` header to increase result depth.

**`board_ref.extra` is empty.**
That detail is only populated when `enrich_boards` is enabled. Set it to `true` and re-run if you need the board owner, preview images and cover images.

**Sentiment or category fields are missing.**
The sentiment fields only appear when `sentinent_analysis` is enabled, and the content analysis object only when `content_analysis` is enabled. Both default to `false`. Note the spelling of `sentinent_analysis`, which was kept as provided.

**Results feel shallow or the run slows down.**
Pinterest returns more to authenticated sessions. Adding a valid `cookies` header from a logged-in browser session is the most effective fix. Also consider lowering `limit` and splitting a large keyword list across several runs.

***

### ❓ Frequently Asked Questions About Pinterest Scraping

**What can the Pinterest Scraper extract?**
Pins, video pins, boards and creator profiles from Pinterest search results, including titles, nested pin content, creator details, board references, media image variants and Pinterest's own metadata.

**Do I need a Pinterest account to use this scraper?**
No. The scraper runs without credentials. Supplying an optional `cookies` header from a logged-in session improves reliability and result depth, but it is not required.

**How do I scrape Pinterest by keyword rather than URL?**
Use the `queries` field. Each plain keyword string is expanded into a Pinterest search automatically, so you never need to construct the URL yourself.

**Can I scrape Pinterest boards and profiles too?**
Yes. Set `type` to `boards` for pin collections or `profiles` for creator pages. The corresponding `board` or `profile` object appears on those records.

**How many pins can I collect in one run?**
`limit` controls the maximum records saved per keyword search and defaults to 50000. Actual volume depends on how much Pinterest returns for your search terms.

**What is `enrich_boards` for?**
It fetches full board details — owner, preview images and cover images — so `board_ref.extra` is complete. It costs one cached request per unique board, so disable it when you want faster, cheaper runs.

**What does `content_analysis` add to each pin?**
A lightweight object containing hashtags, extracted links, word count and a `has_price` flag. It is the quickest way to separate commercial pins from purely inspirational content.

**How accurate is the sentiment analysis?**
It is a lightweight heuristic scoring of the pin description, returned as `sentiment_score`, `sentiment_score_normalized`, `sentiment_confidence` and `sentiment_label`. Treat it as a directional signal for aggregate analysis rather than a precise per-pin judgement.

**Do I need to configure a proxy for Pinterest scraping?**
No. Proxy handling is managed automatically inside the actor, which is why there is no proxy field in the input.

**Can I extract the images themselves?**
The `media` object contains image variants with their URLs, widths and heights. You can download those URLs separately; the scraper stores the references rather than the binary files.

**How do I tell which keyword produced a given record?**
Check `seed_type` and `seed_value`. Every record records whether it came from a URL or a keyword, and which one, so multi-keyword runs stay fully separable.

**Can I schedule recurring Pinterest scrapes?**
Yes. Use Apify's Scheduler to run the same input on a cadence. Storing each run's dataset and comparing over time is how you turn one-off scraping into genuine trend tracking.

**What export formats are available?**
JSON, CSV, Excel and XML from the Console. JSON is recommended because it preserves the nested `pin`, `creator`, `board_ref`, `media` and `extra` objects that CSV flattening loses.

**Why is the sentiment input field spelled `sentinent_analysis`?**
The key name was kept exactly as it appeared in the original input schema for backwards compatibility. Use that spelling when calling the actor via the API.

**Does the Pinterest scraper collect private boards or private pins?**
No. It only reads content that is publicly visible in Pinterest search results. Private boards and secret pins are not accessible to it.

***

### 🆘 Support & Feedback

Found a bug, a keyword that behaves unexpectedly, or a field that is not parsing correctly? Open a ticket in the **Issues** tab on the actor page with the run ID and your input.

Need a custom build — different result types, extra enrichment, or delivery straight into your analytics stack? Email **scraperhubapi@gmail.com** with the details.

If this Pinterest scraper is useful, a rating and a short review on the actor page helps others find it and guides what gets built next.

***

### ⚖️ Disclaimer

This Pinterest scraper collects only publicly available data from Pinterest search results — the same pins, boards and profiles any visitor can see. It does not access private boards, secret pins, direct messages or any authenticated-only content beyond what an ordinary session would show.

You are responsible for how you use this actor and the data it produces, including compliance with Pinterest's terms of service and with copyright law. Pins and the images they reference are typically the intellectual property of their creators; collecting a reference to an image is not the same as acquiring the right to republish it.

Where records include personal data — creator usernames, full names, profile details — you act as the data controller for anything you store and must comply with GDPR, CCPA and any other privacy regulation that applies. Only retain what you have a lawful basis to process, and honour access and deletion requests from the individuals concerned.

If you believe data collected through this actor should be removed, contact **scraperhubapi@gmail.com** with the details and the request will be addressed.

# Actor input Schema

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

Pinterest search URLs, e.g. https://www.pinterest.com/search/pins/?q=home%20decor. Only URLs containing a ?q= query are usable.

## `queries` (type: `array`):

Plain keyword strings; each is expanded into a Pinterest search.

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

What kind of results to collect for the keywords / URLs above.

## `limit` (type: `integer`):

Maximum number of records to save for each keyword search. Use a smaller number for fast validation, and increase it for a larger dataset.

## `enrich_boards` (type: `boolean`):

Fetch full board details (owner, preview images, cover\_images) so board\_ref.extra is complete. Adds one cached request per unique board. Disable for faster/cheaper runs.

## `content_analysis` (type: `boolean`):

Attach a lightweight content\_analysis object (hashtags, extracted links, word count, has\_price) to each pin.

## `sentinent_analysis` (type: `boolean`):

Attach a lightweight heuristic sentiment score for the pin description. (Key name kept as provided in the original input.)

## `cookies` (type: `string`):

Optional Pinterest cookie header from a logged-in browser session. Improves reliability and result depth. Proxy is handled automatically in code — no proxy field needed.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.pinterest.com/search/pins/?q=home%20decor"
    }
  ],
  "queries": [
    "home decor"
  ],
  "type": "all-pins",
  "limit": 50000,
  "enrich_boards": true,
  "content_analysis": false,
  "sentinent_analysis": false
}
```

# Actor output Schema

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

Records scraped by Pinterest Scraper, stored in the run's 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 = {
    "startUrls": [
        {
            "url": "https://www.pinterest.com/search/pins/?q=home%20decor"
        }
    ],
    "queries": [
        "home decor"
    ],
    "limit": 50000
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapers-hub/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": [{ "url": "https://www.pinterest.com/search/pins/?q=home%20decor" }],
    "queries": ["home decor"],
    "limit": 50000,
}

# Run the Actor and wait for it to finish
run = client.actor("scrapers-hub/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": [
    {
      "url": "https://www.pinterest.com/search/pins/?q=home%20decor"
    }
  ],
  "queries": [
    "home decor"
  ],
  "limit": 50000
}' |
apify call scrapers-hub/pinterest-scraper --silent --output-dataset

```

## MCP server setup

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