# Pinterest Details Scraper (`zerobreak/pinterest-details-scraper`) Actor

Pinterest Details Scraper is a powerful data extraction tool that collects structured information from Pinterest using search queries and direct URLs.

- **URL**: https://apify.com/zerobreak/pinterest-details-scraper.md
- **Developed by:** [ZeroBreak](https://apify.com/zerobreak) (community)
- **Categories:** Social media, Developer tools, Other
- **Stats:** 7 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$4.99/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period.You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#rental-actors

## 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 Details Scraper

A production‑ready Apify Actor for scraping structured Pinterest data using **search queries** and **direct Pinterest URLs** (pins, profiles, and boards).

This actor communicates with a backend API and is suitable for **Apify Cloud**, **AWS Lambda**, or any HTTP‑based automation workflow.

***

### Product Features

- **Keyword Search Scraping** – Collect Pinterest pins using plain text search queries (no search URLs required)
- **Direct URL Scraping** – Scrape data directly from:
  - Pins
  - User profiles
  - Boards
- **Automatic URL Classification** – Actor automatically detects whether a URL is a pin, profile, or board
- **Pin Details Extraction** – Title, description, media URLs, engagement metrics, and metadata
- **Optional Comments Scraping** – Enable comments extraction for pin details
- **User & Board Insights** – Extract profile or board information with optional user-only mode
- **Pagination Control** – Limit results using `max_items` and `end_page`
- **Secure API Access** – Uses API key authentication via environment variables
- **Retry & Error Handling** – Automatic retries and safe failure handling
- **Structured JSON Output** – Clean, normalized output ready for analytics or storage

***

### Instructions (How to Use)

#### Choose Your Input Method

You can use **search queries**, **start URLs**, or both.

##### Search Using Queries

Provide keywords to search Pinterest pins:

```json
{
  "queries": ["home decor", "fashion ideas"]
}
```

***

##### Scrape Using Direct URLs

Provide Pinterest pin, profile, board, ideas, or search URLs:

```json
{
  "start_urls": [
    "https://www.pinterest.com/pin/123456789/",
    "https://www.pinterest.com/username/",
    "https://www.pinterest.com/username/boardname/",
    "https://www.pinterest.com/search/pins/?q=Valentine%E2%80%99s%20Nail%20Art",
    "https://www.pinterest.com/ideas/beauty/935541271955/"
  ]
}
```

***

#### Configure Optional Settings

Fine-tune scraping behavior using optional parameters:

```json
{
  "max_items": 50,
  "end_page": 2,
  "include_comments": true,
  "only_user_info": false
}
```

***

#### Run the Actor

- Save your input configuration
- Click **Run** in Apify Console
- Monitor logs for progress and errors

***

#### Access Results

- All scraped data is stored in the **Apify Dataset**
- Each search or URL produces a separate dataset item
- Data is returned in structured JSON format

### Input

#### `queries` (optional)

List of keyword searches to discover Pinterest pins.

```json
{
  "queries": ["home decor", "kitchen ideas"]
}
```

***

#### `start_urls` (optional)

List of direct Pinterest URLs to scrape.

**Supported URL types**

- Pin URL
- User profile URL
- Board URL
- Search URL
- Ideas URL

```json
{
  "start_urls": [
    "https://www.pinterest.com/pin/123456789/",
    "https://www.pinterest.com/username/",
    "https://www.pinterest.com/username/boardname/",
    "https://www.pinterest.com/search/pins/?q=Valentine%E2%80%99s%20Nail%20Art",
    "https://www.pinterest.com/ideas/beauty/935541271955/"
  ]
}
```

***

#### `include_comments` (optional)

Include comments when scraping pin details.

- **Type:** `boolean`
- **Default:** `false`

***

#### `only_user_info` (optional)

Fetch only user profile information when scraping profiles or boards.

- **Type:** `boolean`
- **Default:** `false`

***

***

### Output

Each result is stored as a separate dataset item.

#### Search Result Item

```json
{
  "action": "search_pins",
  "query": "dress",
  "count": 15,
  "items": [
    {
      "pin_id": "846324954995310675",
      "url": "https://www.pinterest.com/pin/846324954995310675",
      "title": "Red Sequins V-neck Long 1920s Dress",
      "description": "Fabric: Sequins...",
      "link": "https://zapaka.com/products/red-sequins-v-neck-long-1920s-dress",
      "dominant_color": "#732e2b",
      "image_original": "https://i.pinimg.com/originals/48/a0/f5/48a0f5c04d109ff6856a2a918810798b.jpg",
      "image_236": "https://i.pinimg.com/236x/48/a0/f5/48a0f5c04d109ff6856a2a918810798b.jpg",
      "creator_username": "zapakaretro",
      "creator_fullname": "zapakaretro",
      "creator_profile_url": "https://www.pinterest.com/zapakaretro/",
      "is_promoted": false
    }
  ]
}

```

#### URL Result Item

```json
{
  "action": "pin_detail",
  "items": [
    {
      "type": "pin",
      "url": "https://www.pinterest.com/pin/4222193395681386/",
      "id": "4222193395681386",
      "description": " ",
      "dominant_color": "#65625e",
      "created_at": "Sun, 23 Nov 2025 23:29:44 +0000",
      "repin_count": 179,
      "favorite_user_count": 0,
      "share_count": 12,
      "comment_count": 0,
      "images": {
        "236x": {
          "url": "https://i.pinimg.com/236x/55/86/54/558654c52902665a87ce83466ce0fb92.jpg"
        },
        "564x": {
          "url": "https://i.pinimg.com/564x/55/86/54/558654c52902665a87ce83466ce0fb92.jpg"
        },
        "orig": {
          "url": "https://i.pinimg.com/originals/55/86/54/558654c52902665a87ce83466ce0fb92.jpg"
        }
      },
      "board": {
        "name": "arreglo personal",
        "privacy": "public",
        "owner": {
          "username": "patriciagar0865",
          "full_name": "patricia garcia"
        }
      },
      "comments": []
    }
  ]
}

```

***

### How It Works

1. Reads input from Apify (`queries` and `start_urls`)
2. Executes keyword searches for `queries`
3. Automatically classifies URLs as pin, profile, or board
4. Sends requests to the backend API
5. Normalizes responses and pushes data to the dataset

### Error Handling

- Automatic retries for temporary failures
- Unsupported URLs are safely skipped
- Clear error logs via `Actor.log`

***

### Use Cases

- Pinterest market & trend research
- Content inspiration & discovery
- Social media analytics
- Lead generation
- Data aggregation for dashboards

### Support

- You are free to extend or customize this actor for your needs.

# Actor input Schema

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

Pinterest keyword searches (example: car, logo design, beauty nails). These will be processed as Pinterest search results.

## `start_urls` (type: `array`):

Pinterest URLs to scrape. Supported types: Pin, Profile, Board, Ideas, and Search URLs.

## `include_comments` (type: `boolean`):

If enabled, comments will be included when scraping individual pin details.

## `only_user_info` (type: `boolean`):

If enabled, only profile metadata will be returned (no pins or boards). Applies to profile URLs only.

## `max_items` (type: `integer`):

Maximum number of items to collect for each request (pins, boards, ideas, or searches).

## `end_page` (type: `integer`):

Last pagination page to scrape. Increase to collect more results.

## Actor input object example

```json
{
  "queries": [
    "dress",
    "car"
  ],
  "start_urls": [
    "https://www.pinterest.com/pin/4222193395681386/",
    "https://www.pinterest.com/dudadelsanto/",
    "https://www.pinterest.com/dudadelsanto/nail-inspo/",
    "https://www.pinterest.com/ideas/beauty/935541271955/",
    "https://www.pinterest.com/search/pins/?q=Valentine%E2%80%99s%20Nail%20Art"
  ],
  "include_comments": false,
  "only_user_info": false,
  "max_items": 20,
  "end_page": 1
}
```

# Actor output Schema

## `overview` (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 = {
    "queries": [
        "dress",
        "car"
    ],
    "start_urls": [
        "https://www.pinterest.com/pin/4222193395681386/",
        "https://www.pinterest.com/dudadelsanto/",
        "https://www.pinterest.com/dudadelsanto/nail-inspo/",
        "https://www.pinterest.com/ideas/beauty/935541271955/",
        "https://www.pinterest.com/search/pins/?q=Valentine%E2%80%99s%20Nail%20Art"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("zerobreak/pinterest-details-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 = {
    "queries": [
        "dress",
        "car",
    ],
    "start_urls": [
        "https://www.pinterest.com/pin/4222193395681386/",
        "https://www.pinterest.com/dudadelsanto/",
        "https://www.pinterest.com/dudadelsanto/nail-inspo/",
        "https://www.pinterest.com/ideas/beauty/935541271955/",
        "https://www.pinterest.com/search/pins/?q=Valentine%E2%80%99s%20Nail%20Art",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("zerobreak/pinterest-details-scraper").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 '{
  "queries": [
    "dress",
    "car"
  ],
  "start_urls": [
    "https://www.pinterest.com/pin/4222193395681386/",
    "https://www.pinterest.com/dudadelsanto/",
    "https://www.pinterest.com/dudadelsanto/nail-inspo/",
    "https://www.pinterest.com/ideas/beauty/935541271955/",
    "https://www.pinterest.com/search/pins/?q=Valentine%E2%80%99s%20Nail%20Art"
  ]
}' |
apify call zerobreak/pinterest-details-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=zerobreak/pinterest-details-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/fb1vEApZLTrU2a5Sf/builds/eUr7TBqTqUn3h4QIR/openapi.json
