# Pinterest Tracker (`vivid.travelogue/pinterest-tracker`) Actor

A powerful Pinterest Scraper that extracts full pin metadata, product details, pricing, images, engagement stats, pinner info, and board data. Supports deep GraphQL extraction, and user-selectable output fields. Perfect for ecommerce research, trend tracking, and building automation workflows.

- **URL**: https://apify.com/vivid.travelogue/pinterest-tracker.md
- **Developed by:** [vivid travelogue](https://apify.com/vivid.travelogue) (community)
- **Categories:** AI, Social media, Automation
- **Stats:** 15 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.01 / 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/platform/actors/running/actors-in-store#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 with Login

Advanced Pinterest scraper built with [Crawlee](https://crawlee.dev/) and [Playwright](https://playwright.dev/). Supports detailed pin extraction with images, owner info, like counts, and rich metadata.

**Features:**

- Cookie-based session injection (pre-exported sessions)
- Direct API calls and browser automation
- Apify residential proxy integration
- n8n workflow export format
- Image download support
- Search queries and direct URL scraping
- Anti-bot detection evasion

### Technologies & Libraries

- **[Apify SDK](https://docs.apify.com/sdk/js)** - Apify platform integration and Actor orchestration
- **[Crawlee](https://crawlee.dev/)** - Web scraping and browser automation framework
- **[Playwright](https://playwright.dev/)** - Browser automation for JavaScript-heavy sites
- **[Input Schema](https://docs.apify.com/platform/actors/development/input-schema)** - Define and validate Actor inputs
- **[Dataset Storage](https://docs.apify.com/sdk/js/docs/guides/result-storage)** - Persistent structured data storage
- **[Key-Value Store](https://docs.apify.com/sdk/js/docs/guides/result-storage#key-value-store)** - File and statistics storage
- **[Apify Proxy](https://docs.apify.com/platform/proxy)** - Rotating residential IP addresses

### Project Structure

```
.actor/
├── actor.json                  # Actor metadata and configuration
├── input_schema.json           # Input validation & Apify Console form
├── dataset_schema.json         # Output data structure & visualization
└── output_schema.json          # Output links and documentation

src/
├── main.js                     # Actor entry point and orchestration
├── auth.js                     # Authentication logic (login/cookies)
├── scraper.js                  # Core scraping logic
├── utils.js                    # Helper utilities
└── ...                         # Additional modules

storage/ (local development)
├── datasets/                   # Scraped pin data
├── key_value_stores/           # Stats and configuration
└── request_queues/             # Pending requests

Dockerfile                      # Container image definition
package.json                    # Dependencies and scripts
README.md                       # This file
```

### How It Works

The Pinterest scraper provides two primary scraping modes:

#### 1. Search-Based Scraping

- Accepts search keywords (e.g., "interior design", "minimalist decor")
- Performs authenticated search on Pinterest
- Scrolls through results to load additional pins
- Extracts rich pin metadata from API responses

#### 2. Direct URL Scraping

- Scrapes specific pins: `https://pinterest.com/pin/PIN_ID`
- Scrapes user profiles: `https://pinterest.com/@username`
- Scrapes boards and collections
- Useful for targeted data collection

#### Data Extraction

For each pin, the scraper extracts:

- **Metadata**: ID, description, domain, URL
- **Images**: Multiple sizes (original, 736x, 474x)
- **Owner Info**: Username, profile link
- **Pinner Info**: Who pinned it (if different from owner)
- **Engagement**: Like count, save count
- **Rich Data**: Full API response for custom analysis

#### Output Formats

**Standard JSON** (Default)

```json
[
  {
    "type": "pin",
    "url": "https://www.pinterest.com/pin/211174978661944/",
    "data": {
      "id": "211174978661944",
      "description": "Beautiful interior design",
      "domain": "etsy.com",
      "images": {
        "orig": {"url": "https://i.pinimg.com/..."},
        "736x": {"url": "https://i.pinimg.com/736x/..."}
      },
      "owner": {"username": "design_account"},
      "pinner": {"username": "user_who_pinned"},
      "like_count": 1234
    }
  }
]
```

**n8n Format** (when `n8n=true`)

```json
{
  "items": [
    { "type": "pin", "data": {...} },
    { "type": "pin", "data": {...} }
  ]
}
```

**Complete sample Full Output JSON Extracted**

```json
{
	"type": "pin",
	"url": "https://www.pinterest.com/pin/684617580870099346/",
	"data": {
		"node_id": "UGluOjQ2MDQyMjcwMTA5OTEwMjg5OTI=",
		"promoted_is_removable": false,
		"carousel_data": null,
		"grid_title": "Bok Bench",
		"link": "https://www.thatcooliving.com/products/bok-bench-3?variant=50503859863894&currency=USD",
		"manual_interest_tags": null,
		"view_tags": [],
		"images": {
			"170x": {
				"width": 236,
				"height": 353,
				"url": "https://i.pinimg.com/236x/37/40/c8/3740c8114cec999a9391dfb92ff62f81.jpg"
			},
			"136x136": {
				"width": 136,
				"height": 136,
				"url": "https://i.pinimg.com/136x136/37/40/c8/3740c8114cec999a9391dfb92ff62f81.jpg"
			},
			"236x": {
				"width": 236,
				"height": 353,
				"url": "https://i.pinimg.com/236x/37/40/c8/3740c8114cec999a9391dfb92ff62f81.jpg"
			},
			"474x": {
				"width": 474,
				"height": 710,
				"url": "https://i.pinimg.com/474x/37/40/c8/3740c8114cec999a9391dfb92ff62f81.jpg"
			},
			"736x": {
				"width": 667,
				"height": 1000,
				"url": "https://i.pinimg.com/736x/37/40/c8/3740c8114cec999a9391dfb92ff62f81.jpg"
			},
			"orig": {
				"width": 667,
				"height": 1000,
				"url": "https://i.pinimg.com/originals/37/40/c8/3740c8114cec999a9391dfb92ff62f81.jpg"
			}
		},
		"is_quick_promotable": false,
		"tracking_params": "CwABAAAAEDczMjIzNjAxNTcwMDY4NzIGAAMAhQsABwAAAApuZ2FwaS9wcm9kAA",
		"native_creator": {
			"node_id": "VXNlcjoxMDU2MzA1NDI1MDA5MzY5MDg3",
			"username": "thatcooliving",
			"type": "user",
			"explicitly_followed_by_me": false,
			"image_large_url": "https://i.pinimg.com/140x140_RS/89/45/98/894598c56ae388c50c3482e57ca5391b.jpg",
			"verified_identity": {},
			"blocked_by_me": false,
			"is_verified_merchant": true,
			"id": "1056305425009369087",
			"full_name": "that cool living®",
			"image_small_url": "https://i.pinimg.com/30x30_RS/89/45/98/894598c56ae388c50c3482e57ca5391b.jpg"
		},
		"alt_text": null,
		"has_required_attribution_provider": false,
		"access": [],
		"debug_info_html": null,
		"is_promoted": false,
		"rich_summary": {
			"type_name": "product",
			"apple_touch_icon_images": null,
			"favicon_link": "https://s.pinimg.com/images/default_rich_pin_favicon.png",
			"url": null,
			"products": [
				{
					"offers": [
						{
							"condition": 1,
							"type": "offermetadata",
							"in_stock": true,
							"price_currency": "USD",
							"min_ad_price": null,
							"name": null,
							"availability": 1,
							"id": "267496341455760",
							"price_value": 1364
						}
					],
					"item_id": "404b3e30-6071-463f-a36c-6e3fb74c2f72",
					"name": "Bok Bench",
					"item_set_id": "86819f98-1340-48d5-8df8-43cdb725fde7",
					"label_info": {},
					"variant_set": null,
					"type": "richproductmetadata",
					"videos": [],
					"additional_images_per_spec": null,
					"shipping_info": {},
					"offer_summary": {
						"price_val": 1364,
						"currency": "USD",
						"price": "$1,364.00",
						"in_stock": true,
						"availability": 1,
						"condition": 1,
						"standard_price": "$1,364.00"
					},
					"price_history_summary": {},
					"purchase_url": null,
					"additional_images": null,
					"id": "267505658078096",
					"has_multi_images": null
				}
			],
			"type": "richpingriddata",
			"site_name": "THAT COOL LIVING",
			"actions": [],
			"apple_touch_icon_link": null,
			"display_name": "Bok Bench",
			"id": "None",
			"favicon_images": {
				"orig": "https://s.pinimg.com/images/default_rich_pin_favicon.png"
			},
			"display_description": "Reminiscent of a goat's curved horns, the Bok collection combines sculptural elegance and contemporary crafting into a graceful and airy form. The Bok bench pairs well with the Bok dining table, but also as a stand-alone against a wall, in a hallway or at the end of a bed."
		},
		"product_metadata": {
			"type": "productmetadata",
			"id": "7519985830828728280"
		},
		"description": "Reminiscent of a goat's curved horns, the Bok collection combines sculptural elegance and contemporary crafting into a graceful and airy form. The Bok bench pairs well with the Bok dining table, but also as a stand-alone against a wall, in a hallway or at the end of a bed.",
		"is_repin": false,
		"image_crop": {
			"min_y": 0,
			"max_y": 1
		},
		"board": {
			"node_id": "Qm9hcmQ6MTA1NjMwNTM1NjI4OTkxNjI1NQ==",
			"followed_by_me": false,
			"type": "board",
			"collaborated_by_me": false,
			"layout": "default",
			"name": "Products",
			"privacy": "protected",
			"url": "/thatcooliving/_products/",
			"is_collaborative": false,
			"owner": {
				"node_id": "VXNlcjoxMDU2MzA1NDI1MDA5MzY5MDg3",
				"username": "thatcooliving",
				"type": "user",
				"explicitly_followed_by_me": false,
				"image_large_url": "https://i.pinimg.com/140x140_RS/89/45/98/894598c56ae388c50c3482e57ca5391b.jpg",
				"verified_identity": {},
				"blocked_by_me": false,
				"is_verified_merchant": true,
				"id": "1056305425009369087",
				"full_name": "that cool living®",
				"image_small_url": "https://i.pinimg.com/30x30_RS/89/45/98/894598c56ae388c50c3482e57ca5391b.jpg"
			},
			"id": "1056305356289916255",
			"image_thumbnail_url": "https://i.pinimg.com/upload/1056305356289916255_board_thumbnail_2025-12-04-15-22-36_59010_60.jpg"
		},
		"price_currency": "USD",
		"reaction_counts": {},
		"repin_count": 0,
		"grid_description": "Reminiscent of a goat's curved horns, the Bok collection combines sculptural elegance and contemporary crafting into a graceful and airy form. The Bok bench pairs well with the Bok dining table, but also as a stand-alone against a wall, in a hallway or at the end of a bed.",
		"is_eligible_for_pdp": true,
		"story_pin_data": null,
		"privacy": "public",
		"promoter": null,
		"is_downstream_promotion": false,
		"id": "4604227010991028992",
		"creator_analytics": null,
		"aggregated_pin_data": null,
		"is_video": false,
		"attribution": null,
		"embed": null,
		"image_square_url": "https://i.pinimg.com/45x45/37/40/c8/3740c8114cec999a9391dfb92ff62f81.jpg",
		"is_native": false,
		"pinner": {
			"node_id": "VXNlcjoxMDU2MzA1NDI1MDA5MzY5MDg3",
			"username": "thatcooliving",
			"type": "user",
			"explicitly_followed_by_me": false,
			"image_large_url": "https://i.pinimg.com/140x140_RS/89/45/98/894598c56ae388c50c3482e57ca5391b.jpg",
			"verified_identity": {},
			"blocked_by_me": false,
			"is_verified_merchant": true,
			"id": "1056305425009369087",
			"full_name": "that cool living®",
			"image_small_url": "https://i.pinimg.com/30x30_RS/89/45/98/894598c56ae388c50c3482e57ca5391b.jpg"
		},
		"shopping_flags": [
			1,
			5,
			8,
			11
		],
		"comment_count": 0,
		"is_eligible_for_web_closeup": false,
		"dominant_color": "#e1e0de",
		"method": "catalog_bulk_create",
		"story_pin_data_id": null,
		"title": "Bok Bench",
		"type": "pin",
		"additional_hide_reasons": [],
		"videos": null,
		"ad_match_reason": 0,
		"link_domain": {
			"node_id": "RG9tYWluOjk1ODc3NDQ4MzAxODA1NjEwMw==",
			"official_user": {
				"node_id": "VXNlcjoxMDU2MzA1NDI1MDA5MzY5MDg3",
				"username": "thatcooliving",
				"type": "user",
				"explicitly_followed_by_me": false,
				"image_large_url": "https://i.pinimg.com/140x140_RS/89/45/98/894598c56ae388c50c3482e57ca5391b.jpg",
				"verified_identity": {},
				"blocked_by_me": false,
				"is_verified_merchant": true,
				"id": "1056305425009369087",
				"full_name": "that cool living®",
				"image_small_url": "https://i.pinimg.com/30x30_RS/89/45/98/894598c56ae388c50c3482e57ca5391b.jpg"
			}
		},
		"domain": "thatcooliving.com",
		"comments": {
			"uri": "/v3/pins/4604227010991028992/comments/",
			"data": [],
			"bookmark": null
		},
		"description_html": "Reminiscent of a goat's curved horns, the Bok collection combines sculptural elegance and contemporary crafting into a graceful and airy form. The Bok bench pairs well with the Bok dining table, but also as a stand-alone against a wall, in a hallway or at the end of a bed.",
		"collection_pin": null,
		"is_playable": false,
		"created_at": "Sat, 29 Nov 2025 13:23:53 +0000",
		"image_signature": "3740c8114cec999a9391dfb92ff62f81",
		"is_whitelisted_for_tried_it": true,
		"is_uploaded": false,
		"link_user_website": null,
		"sponsorship": null,
		"promoted_lead_form": null,
		"price_value": 0
	}
}
```

### Input Configuration

All input parameters are optional with sensible defaults. Configure via Apify Console or pass JSON input.

#### Scraping Parameters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `search` | String | - | Search keyword (e.g., "interior design") |
| `startUrls` | Array | `[]` | Direct Pinterest URLs to scrape |
| `maxItems` | Integer | `50` | Max pins to extract (1-10000) |
| `maxScrollsPerPage` | Integer | `6` | Page scrolls per search (1-30) |

#### Output Options

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `downloadImages` | Boolean | `false` | Download pin images to storage |
| `imagesDirectory` | String | `images` | Directory path for downloaded images |
| `n8n` | Boolean | `false` | Export in n8n workflow format |

#### Proxy Settings

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `useApifyProxy` | Boolean | `true` | Use Apify residential proxy |
| `apifyProxyCountry` | String | `US` | Proxy country (20+ options) |
| `headless` | Boolean | `true` | Run browser in headless mode |

#### Example Input

```json
{
  "search": "minimalist interior design",
  "maxItems": 100,
  "maxScrollsPerPage": 8,
  "useApifyProxy": true,
  "apifyProxyCountry": "US",
  "downloadImages": false,
  "n8n": false
}
```

### Common Use Cases

#### 1. Search-Based Scraping

Collect pins for a specific topic:

```json
{
  "search": "sustainable fashion",
  "maxItems": 200,
  "maxScrollsPerPage": 10,
}
```

#### 2. Direct Pin Scraping

Scrape specific pins by URL:

```json
{
  "startUrls": [
    {"url": "https://www.pinterest.com/pin/211174978661944/"},
    {"url": "https://www.pinterest.com/pin/123456789/"}
  ],
  "maxItems": 50
}
```

#### 3. n8n Workflow Integration

Export results in n8n-compatible format:

```json
{
  "search": "design inspiration",
  "maxItems": 50,
  "n8n": true,
  "useApifyProxy": true,
  "apifyProxyCountry": "US"
}
```

#### 4. Image Download & Storage

Download all pin images for offline access:

```json
{
  "search": "photography",
  "downloadImages": true,
  "imagesDirectory": "pinterest_images",
  "maxItems": 100
}
```

### Environment Variables

For secure credential storage, use environment variables instead of passing credentials in input:

```bash

## Apify API (for deployment)
export APIFY_TOKEN="your_apify_token"
```

### Output Data

#### Dataset Output

Scraped pins are stored in the dataset with the following structure:

```json
{
  "type": "pin",
  "url": "https://www.pinterest.com/pin/211174978661944/",
  "data": {
    "id": "211174978661944",
    "description": "Beautiful interior design idea",
    "domain": "etsy.com",
    "images": {
      "orig": {
        "url": "https://i.pinimg.com/originals/..."
      },
      "736x": {
        "url": "https://i.pinimg.com/736x/..."
      },
      "474x": {
        "url": "https://i.pinimg.com/474x/..."
      }
    },
    "owner": {
      "username": "design_account"
    },
    "pinner": {
      "username": "user_who_pinned"
    },
    "like_count": 1234
  }
}
```

#### Statistics Output

Execution statistics are stored in `OUTPUT.json` key-value store:

```json
{
  "totalPins": 100,
  "totalRequests": 50,
  "executionTime": "2m 30s",
  "errors": 0,
  "successRate": 100
}
```

#### n8n Export (if enabled)

When `n8n=true`, results are wrapped in an `items` array:

```json
{
  "items": [
    {
      "type": "pin",
      "url": "...",
      "data": {...}
    },
    ...
  ]
}
```

### Apify Console Views

The Actor provides multiple visualization views in the Apify Console:

#### Overview View

Summary table showing:

- Pin image thumbnail
- Pin URL (clickable)
- Pin ID
- Description
- Source domain
- Owner username
- Pinner username
- Like count

#### Detailed View

Complete data view showing:

- All pin metadata
- Full images object (multiple sizes)
- Complete API response
- Raw JSON for advanced analysis

### Best Practices

#### Authentication

- **Use environment variables** for passwords instead of hardcoding
- **Cookie injection** is safer than storing passwords
- **Test authentication** locally before deploying

#### Performance

- Start with `maxScrollsPerPage: 3-5` to test
- Increase gradually based on needs (max 30)
- Use `headless: true` for production
- Monitor execution time and adjust concurrency

#### Data Quality

- Use `maxItems` limit to test scraper first
- Validate scraped data structure matches expectations
- Monitor error logs in Apify Console
- Check that all pins have expected fields

#### Cost Optimization

- Disable `downloadImages` unless needed (saves bandwidth)
- Use `useApifyProxy: false` for US-only content (saves credits)
- Batch multiple searches in single run when possible
- Monitor proxy country selection based on content location

### Troubleshooting

#### Authentication Failed

- Verify username and password are correct
- Check if Pinterest requires 2FA (2-factor authentication)
- Try cookie-based authentication as alternative
- Check `PINTEREST_USERNAME` and `PINTEREST_PASSWORD` env vars

#### No Pins Found

- Verify search keyword is valid
- Try with fewer `maxScrollsPerPage` first
- Check if Pinterest blocked the IP (use proxy)
- Verify browser isn't in sandbox mode

#### Proxy Issues

- Ensure Apify account has proxy credits
- Try different `apifyProxyCountry` setting
- Check network connectivity
- Verify proxy configuration in `.actor/actor.json`

#### Dataset Errors

- Ensure sufficient storage quota
- Check dataset key-value store for logs
- Monitor Actor logs in Apify Console
- Check file permissions in local storage

### Support & Resources

- **[Apify Documentation](https://docs.apify.com/)** - Complete platform guide
- **[Crawlee Documentation](https://crawlee.dev/)** - Scraping library reference
- **[Apify SDK JS](https://docs.apify.com/sdk/js)** - JavaScript SDK docs
- **[Apify Discord Community](https://discord.com/invite/jyEM2PRvMU)** - Get help from community
- **[Pinterest Terms of Service](https://www.pinterest.com/pin/terms/)** - Important: Follow ToS compliance

### License

This project is licensed under the MIT License - see the LICENSE file for details.

***

**Last Updated:** December 2024\
**Version:** 1.0.0\
**Maintained by:** Vivid AI

# Actor input Schema

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

Pinterest search query (e.g., 'interior design', 'minimalist decor'). Leave empty to use only startUrls for direct pin/profile URLs.

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

Direct Pinterest URLs to scrape: specific pins (https://pinterest.com/pin/ID), user profiles (https://pinterest.com/@username), or boards. Leave empty if using search keyword.

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

Maximum number of pin items to extract. The crawler will stop after reaching this limit. Set to 0 for unlimited (not recommended).

## `maxScrollsPerPage` (type: `integer`):

Number of page scrolls per search/board/profile page to load additional pins. Higher values may find more pins but take longer and consume more resources.

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

Pre-exported Pinterest session cookies (semicolon-separated, e.g., 'csrftoken=...; \_pinterest\_sess=...'). If provided, password login is skipped. Falls back to PINTEREST\_COOKIES env variable.

## `cookies` (type: `array`):

Structured cookie objects with name, value, domain, path, secure flags. Useful for programmatic cookie injection. Overrides cookiesString if both provided.

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

Domain for injected cookies (typically '.pinterest.com' or regional variants like '.au.pinterest.com'). Used when parsing cookiesString.

## `downloadImages` (type: `boolean`):

Download primary image for each scraped pin and store in local/cloud storage. Enables offline access but increases storage/bandwidth usage.

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

Relative path to save downloaded images (used if downloadImages=true). Will be created if not exists.

## `n8n` (type: `boolean`):

Output results in n8n workflow-compatible format (wraps items in 'items' array). Enables direct n8n webhook integration.

## `useApifyProxy` (type: `boolean`):

Route requests through Apify's rotating residential proxy pool to avoid IP blocks and improve success rate. Requires Apify account with proxy credits.

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

Preferred country for residential proxy IPs (impacts Pinterest content and geo-restrictions). Common options: US, UK, AU, DE, BR.

## `headless` (type: `boolean`):

Run Playwright browser in headless mode (no GUI). Recommended for production/cloud environments. Disable for debugging.

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

Specify which raw fields to extract from Instagram's internal JSON. Example: \["like\_count", "pinner", "owner", "owner.username"].

## Actor input object example

```json
{
  "search": "interior design minimalist",
  "startUrls": [
    {
      "url": "https://www.pinterest.com/pin/211174978661944/"
    }
  ],
  "maxItems": 5,
  "maxScrollsPerPage": 6,
  "cookiesString": "",
  "cookies": [],
  "cookieDomain": ".pinterest.com",
  "downloadImages": false,
  "imagesDirectory": "images",
  "n8n": false,
  "useApifyProxy": true,
  "apifyProxyCountry": "US",
  "headless": true,
  "outputFields": [
    "*"
  ]
}
```

# Actor output Schema

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

Main output: array of pin objects with images, descriptions, owner info, and engagement metrics

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

Summary table view of pins with images, URLs, descriptions, and like counts

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

Complete pin data including full object structure for advanced analysis

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

n8n workflow format output (if n8n=true in input). Wraps dataset items in items array.

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

Summary: total pins scraped, requests processed, execution time, and error count

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("vivid.travelogue/pinterest-tracker").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("vivid.travelogue/pinterest-tracker").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 '{}' |
apify call vivid.travelogue/pinterest-tracker --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/7hNR2YcXzFoU7fkKy/builds/3r2TtkAqQso8sqVSJ/openapi.json
