# Pinterest Comments Scraper (`scrapeai/pinterest-comments-scraper`) Actor

Scrape comments from Pinterest pins by pin URL. Extracts commenter username, comment text, likes, reply counts, threading, author profiles, and timestamps for sentiment analysis and engagement monitoring.

- **URL**: https://apify.com/scrapeai/pinterest-comments-scraper.md
- **Developed by:** [ScrapeAI](https://apify.com/scrapeai) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 81.8% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.49 / 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 Comments Scraper

Extract comments, comment replies, engagement metrics, author profiles, and timestamps from Pinterest pins at scale.

Whether you are performing audience sentiment analysis, monitoring brand conversations, researching community trends, or analyzing content performance, **Pinterest Comments Scraper** delivers rich, structured data directly into Apify datasets in JSON, CSV, or Excel format.

***

### 🌟 Key Features

- 📌 **Multi-Pin Processing** — Scrape comments from multiple Pinterest pins concurrently in a single run.
- 💬 **Full Comment Data** — Extracts comment text, comment ID, pin ID, creation timestamps, and edit status.
- 🧵 **Comment Threading & Replies** — Identifies reply comments and attaches parent comment IDs for nested thread analysis.
- 👤 **Author & Profile Intelligence** — Captures commenter usernames, display names, profile URLs, avatar image URLs, and verification status.
- 📊 **Engagement Metrics** — Extracts like/reaction counts, reply counts, and helpful counts per comment.
- 🏷️ **Tags & Mentions** — Captures tagged users and attached media links when available.
- ⚡ **Dynamic API, Relay & DOM Extraction** — Uses intercepted Pinterest API feeds first, then the live server-rendered Relay pin metadata to call `UnifiedCommentsResource` directly when browser hydration does not issue the comments request, with live DOM selectors as a final fallback.
- 🛡️ **Proxy & Anti-Bot Ready** — Fully compatible with Apify Proxy and residential proxy pools.

***

### 💡 Use Cases

- **Brand & Product Sentiment**: Understand what customers and community members think about products or pins.
- **Social Listening & Market Research**: Discover consumer questions, feedback, and trends across niches.
- **Engagement Optimization**: Identify which pins generate meaningful discussions and why.
- **NLP & Dataset Building**: Build labeled text datasets for sentiment classification, spam detection, or conversational AI.
- **Competitor Analysis**: Analyze comments on competitor pins to discover unmet customer needs and pain points.

***

### 📥 Input Configuration

| Parameter | Type | Default | Required | Description |
|-----------|------|---------|:--------:|-------------|
| `pinUrls` | Array | `—` | ✅ Yes | Array of valid Pinterest pin URLs to scrape comments from. The actor does not fabricate fallback URLs when this input is missing. |
| `maxCommentsPerPin` | Integer | `50` | No | Maximum number of comments to extract per pin (1 – 500). |
| `maxItems` | Integer | `200` | No | Maximum total comments across all pins in the run (1 – 5000). |
| `proxyConfiguration` | Object | `{ "useApifyProxy": true }` | No | Proxy settings. Residential proxies recommended for high volume. |

#### Sample Input JSON

```json
{
  "pinUrls": [
    "https://www.pinterest.com/pin/185773553372200236/",
    "https://www.pinterest.com/pin/68749767931326442/"
  ],
  "maxCommentsPerPin": 50,
  "maxItems": 200,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

***

### 📤 Output Data Format

Every scraped comment item is stored in the default dataset and includes the following fields:

| Field | Type | Description |
|-------|------|-------------|
| `id` | String | Unique Pinterest comment identifier |
| `type` | String | Item type, always `"comment"` |
| `text` | String | Full text content of the comment |
| `likeCount` | Integer | Total count of likes and reactions on the comment |
| `replyCount` | Integer | Number of direct replies to this comment |
| `helpfulCount` | Integer | Number of users who marked the comment as helpful |
| `isReply` | Boolean | `true` if this comment is a reply in a thread |
| `parentCommentId` | String / Null | Identifier of parent comment if this is a reply |
| `isEdited` | Boolean | Whether the comment was edited after posting |
| `highlightedByPinOwner` | Boolean | Whether the pin owner highlighted/pinned this comment |
| `pinId` | String | Pinterest Pin ID |
| `pinUrl` | String | Canonical URL of the Pinterest pin |
| `authorId` | String | Pinterest User ID of the commenter |
| `authorUsername` | String | Commenter's Pinterest username |
| `authorFullName` | String | Commenter's display name |
| `authorProfileUrl` | String | Direct URL to commenter's Pinterest profile |
| `authorImageUrl` | String | URL of commenter's avatar image |
| `authorFollowerCount` | Integer / Null | Commenter's follower count (if publicly available) |
| `authorIsVerified` | Boolean | Whether commenter has a verified identity badge |
| `authorIsPrivate` | Boolean | Whether commenter's profile is private |
| `taggedUsers` | Array | List of user handles tagged/mentioned in the comment |
| `mediaUrl` | String / Null | Attached image or media URL |
| `createdAt` | String | Comment publication timestamp |
| `updatedAt` | String / Null | Comment update timestamp |
| `scrapedAt` | String | ISO 8601 timestamp when scraped |

#### Sample Output JSON

```json
{
  "id": "5343634683613731534",
  "type": "comment",
  "text": "OK OK OR SPIDER MIKU I HAD AN IDEA WHERE SHE SWINGS WITH HER TWIN PIGTAILS DO YOU GUYS THINK THATS A COOL IDEA",
  "likeCount": 258,
  "replyCount": 16,
  "helpfulCount": 1,
  "isReply": false,
  "parentCommentId": null,
  "isEdited": true,
  "highlightedByPinOwner": false,
  "pinId": "185773553372200236",
  "pinUrl": "https://www.pinterest.com/pin/185773553372200236/",
  "authorId": "978618331437365287",
  "authorUsername": "kawaiiqueenmp3",
  "authorFullName": "sergeant huss",
  "authorProfileUrl": "https://www.pinterest.com/kawaiiqueenmp3/",
  "authorImageUrl": "https://i.pinimg.com/75x75_RS/bd/e3/c8/bde3c854deee7a5383369ddd40cc5ad2.jpg",
  "authorFollowerCount": null,
  "authorIsVerified": false,
  "authorIsPrivate": false,
  "taggedUsers": [],
  "mediaUrl": null,
  "createdAt": "Tue, 23 Jan 2024 14:05:21 +0000",
  "updatedAt": null,
  "scrapedAt": "2026-08-25T11:58:44.704Z"
}
```

***

### 🚀 How to Run

#### Via Apify Console

1. Navigate to the Actor on Apify Console.
2. Enter one or more Pinterest Pin URLs in the **Pin URLs** field.
3. Adjust **Max Comments Per Pin** and **Max Total Comments** as needed.
4. Click **Start** to run the scraper.
5. Export results in JSON, CSV, XML, or Excel from the **Storage** / **Dataset** tab.

#### Via Apify API (Node.js)

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({
    token: 'YOUR_APIFY_TOKEN',
});

const run = await client.actor('YOUR_ACTOR_NAME/pinterest-comments-scraper').call({
    pinUrls: ['https://www.pinterest.com/pin/185773553372200236/'],
    maxCommentsPerPin: 50,
    maxItems: 100,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(`Fetched ${items.length} comments:`, items);
```

#### Via CLI Locally

```bash
npm install
apify run
```

For local runs, place the JSON input in `storage/key_value_stores/default/INPUT.json` before running `apify run`. All records are fetched live for the supplied pin URLs; the Actor does not create fallback pin URLs or static comment records.

***

### 🛠️ Tips & Best Practices

- **Proxies**: When scraping at scale across multiple pins, enable Apify Proxy (`RESIDENTIAL` group) to avoid rate limiting.
- **Pins Without Comments**: Pins with comments disabled or pins that have no comments are gracefully handled and logged without failing the entire run.
- **Exporting**: You can download results in CSV or JSON at any point, even while the scraper is still running.

# Actor input Schema

## `pinUrls` (type: `array`):

List of Pinterest pin URLs to scrape comments from (e.g., https://www.pinterest.com/pin/185773553372200236/).

## `maxCommentsPerPin` (type: `integer`):

Maximum number of comments to scrape per pin.

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

Maximum total comments to scrape across all pins.

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

Proxy configuration. Using Apify Proxy or residential proxies is recommended for reliable scraping.

## Actor input object example

```json
{
  "pinUrls": [
    "https://www.pinterest.com/pin/185773553372200236/"
  ],
  "maxCommentsPerPin": 50,
  "maxItems": 200,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

Dataset containing all scraped Pinterest comments and author metrics

# 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 = {
    "pinUrls": [
        "https://www.pinterest.com/pin/185773553372200236/"
    ],
    "maxCommentsPerPin": 50,
    "maxItems": 200,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapeai/pinterest-comments-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 = {
    "pinUrls": ["https://www.pinterest.com/pin/185773553372200236/"],
    "maxCommentsPerPin": 50,
    "maxItems": 200,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("scrapeai/pinterest-comments-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 '{
  "pinUrls": [
    "https://www.pinterest.com/pin/185773553372200236/"
  ],
  "maxCommentsPerPin": 50,
  "maxItems": 200,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call scrapeai/pinterest-comments-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapeai/pinterest-comments-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/4MCF0FDadi60wAA3v/builds/LcNenCRIQoL8zgIfJ/openapi.json
