# Pinterest Data Extractor (`epctex/pinterest-scraper`) Actor

Unleash the potential of our Pinterest Scraper to gather pins, comments, user info, photos, videos, and deep insights. Extract titles, prices, creation date, user language, user locale, images, hashtags, and more. Export in XML, JSON, CSV, Excel, or HTML for unlimited and fast insights!

- **URL**: https://apify.com/epctex/pinterest-scraper.md
- **Developed by:** [epctex](https://apify.com/epctex) (community)
- **Categories:** SEO tools, Social media
- **Stats:** 2,839 total users, 21 monthly users, 86.4% runs succeeded, 63 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

$35.00/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

## Actor - Pinterest Scraper

### Pinterest scraper

The Pinterest data scraper supports the following features:

- Retrieve pin information - Get all the information per pin. User information, videos, images, price, language, and many other things!

- Scrape comments - Harvest all the comments without any limits! Get users, comments, and all the necessary information that you are looking for.

- Get ideas - Fetch all the pins on an idea link.

- Scrape user profile and user pins - Track any user and their pins. As easy as clicking a button.

- Get collections - Want to get all the pins of a collection? Do it with ease with Pinterest Scraper!

- Search and get any keyword results - Search any keyword you want and retrieve all the results right away.

### Bugs, fixes, updates, and changelog

This scraper is under active development. If you have any feature requests you can create an issue from [here](https://github.com/epctex-support/pinterest-scraper/issues).

### Input Parameters

The input of this scraper should be JSON containing the list of pages on Pinterest that should be visited. Possible fields are:

- `search`: (Optional) (String) Keyword that you want to search on Pinterest.

- `startUrls`: (Optional) (Array) List of Pinterest URLs. You should only provide pin detail, ideas, user profiles, collections, or search URLs.

- `includeUserInfoOnly`: (Optional) (Boolean) Includes only user info for fewer requests and faster results.

- `includeComments`: (Optional) (Boolean) This will add all the comments that Pinterest provides into the pin objects. Please keep in mind that the time and resources the actor uses will increase proportionally to the number of comments.

- `endPage`: (Optional) (Number) Final number of page that you want to scrape. The default is `Infinite`. This applies to all `search` requests and `startUrls` individually.

- `maxItems`: (Optional) (Number) You can limit scraped items. This should be useful when you search through the big lists or search results.

- `proxy`: (Required) (Proxy Object) Proxy configuration.

- `extendOutputFunction`: (Optional) (String) Function that takes a JQuery handle ($) as an argument and returns an object with data.

- `customMapFunction`: (Optional) (String) Function that takes each object's handle as an argument and returns the object with executing the function.

This solution requires the use of **Proxy servers**, either your own proxy servers or you can use [Apify Proxy](https://www.apify.com/docs/proxy).

#### Tip

When you want to scrape over a specific list URL, just copy and paste the link as one of the **startUrl**.

If you would like to scrape only the first page of a list then put the link for the page and have the `endPage` as 1.

With the last approach that is explained above you can also fetch any interval of pages. If you provide the 5th page of a list and define the `endPage` parameter as 6 then you'll have the 5th and 6th pages only.

#### Compute Unit Consumption

The actor is optimized to run blazing fast and scrape as many items as possible. Therefore, it forefronts all the detailed requests. If the actor doesn't block very often it'll scrape 100 listings in 1 minute with ~0.01-0.02 compute units.

#### Pinterest Scraper Input example

```json
{
  "startUrls":[
    "https://www.pinterest.com/pin/1054827543951238554/",
    "https://www.pinterest.com/ideas/beauty/935541271955/",
    "https://www.pinterest.com/dudadelsanto/",
    "https://www.pinterest.com/dudadelsanto/nail-inspo/",
    "https://www.pinterest.com/search/pins/?q=Valentine%E2%80%99s%20Nail%20Art&rs=hub_page"
  ],
  "includeUserInfoOnly": false,
  "proxy":{
    "useApifyProxy":true
  },
  "search":"design",
  "endPage":1,
  "maxItems":10,
  "includeComments":false
}

```

### During the Run

During the run, the actor will output messages letting you know what is going on. Each message always contains a short label specifying which page from the provided list is currently specified.
When items are loaded from the page, you should see a message about this event with a loaded item count and total item count for each page.

If you provide incorrect input to the actor, it will immediately stop with a failure state and output an explanation of what is wrong.

### Pinterest Export

During the run, the actor stores results into a dataset. Each item is a separate item in the dataset.

You can manage the results in any language (Python, PHP, Node JS/NPM). See the FAQ or <a href="https://www.apify.com/docs/api" target="blank">our API reference</a> to learn more about getting results from this Pinterest actor.

### Scraped Pinterest Properties

The structure of each pin on Pinterest looks like this:

#### Pin Detail

```json
{
	"type": "pin",
	"url": "https://www.pinterest.com/pin/1096556209247124248",
	"aggregated_pin_data": {
		"id": "5252180141467027218",
		"comment_count": 5
	},
	"board": {
		"id": "Qm9hcmQ6MTA5NjU1NjI3Nzk1OTgwMjE0Ng==",
		"owner": {
			"id": "VXNlcjoxMDk2NTU2MzQ2Njc5MDY4NTg4",
			"image_medium_url": "https://i.pinimg.com/75x75_RS/31/bc/60/31bc60a4d13972049a4a2fa153a9b444.jpg",
			"followed_by_me": false,
			"full_name": "Podail Saves",
			"follower_count": 0,
			"username": "podailsaves2",
			"explicitly_followed_by_me": false,
			"blocked_by_me": false,
			"first_name": "Podail Saves",
			"image_small_url": "https://i.pinimg.com/30x30_RS/31/bc/60/31bc60a4d13972049a4a2fa153a9b444.jpg"
		},
		"url": "/podailsaves2/_quick_saves/",
		"privacy": "public",
		"name": "Quick Saves"
	},
	"category": "",
	"closeup_attribution": {
		"id": "VXNlcjo5MDM4ODY3MjUxMjA1NjM1MDQ=",
		"username": "ShirtSurpriseShop"
	},
	"closeup_description": "Whimsical Middle School Altered Photograph Art Project",
	"closeup_unified_description": "Whimsical Middle School Altered Photograph Art Project",
	"comment_count": 5,
	"comments_disabled": false,
	"created_at": "Sat, 15 Oct 2022 14:56:20 +0000",
	"description": " ",
	"description_html": " ",
	"domain": "smallhandsbigart.com",
	"dominant_color": "#626862",
	"grid_title": "Altered Photographs",
	"id": "1096556209247124248",
	"image_signature": "8a8364da0e09c9bfd85616f7bdfae8f7",
	"images": {
		"236x": {
			"url": "https://i.pinimg.com/236x/8a/83/64/8a8364da0e09c9bfd85616f7bdfae8f7.jpg"
		}
	},
	"owner": {
		"id": "VXNlcjoxMDk2NTU2MzQ2Njc5MDY4NTg4",
		"image_medium_url": "https://i.pinimg.com/75x75_RS/31/bc/60/31bc60a4d13972049a4a2fa153a9b444.jpg",
		"followed_by_me": false,
		"full_name": "Podail Saves",
		"follower_count": 0,
		"username": "podailsaves2",
		"explicitly_followed_by_me": false,
		"blocked_by_me": false,
		"first_name": "Podail Saves",
		"image_small_url": "https://i.pinimg.com/30x30_RS/31/bc/60/31bc60a4d13972049a4a2fa153a9b444.jpg"
	},
	"pinner": {
		"id": "VXNlcjoxMDk2NTU2MzQ2Njc5MDY4NTg4",
		"image_medium_url": "https://i.pinimg.com/75x75_RS/31/bc/60/31bc60a4d13972049a4a2fa153a9b444.jpg",
		"followed_by_me": false,
		"full_name": "Podail Saves",
		"follower_count": 0,
		"username": "podailsaves2",
		"explicitly_followed_by_me": false,
		"blocked_by_me": false,
		"first_name": "Podail Saves",
		"image_small_url": "https://i.pinimg.com/30x30_RS/31/bc/60/31bc60a4d13972049a4a2fa153a9b444.jpg"
	},
	"pinner_follower_count": 0,
	"pinner_id": "VXNlcjoxMDk2NTU2MzQ2Njc5MDY4NTg4",
	"isRepin": true,
	"favorite_user_count": 0,
	"repin_count": 2538,
	"share_count": 44,
	"like_count": 162,
	"comments": [
		{
			"id": "5416242435112105810",
			"content": "what a coincidence 🥹",
			"name": "sjskwjsjd",
			"avatar": "https://i.pinimg.com/75x75_RS/c4/52/90/c45290ca7e33903f4f605afd4d814589.jpg",
			"url": "https://www.pinterest.com/sjskwjsjd",
			"like_count": 2,
			"reply_count": 0,
			"helpful_count": 1
		},
		{
			"id": "5368113451931590914",
			"created_at": "Thu, 06 Jun 2024 16:25:07 +0000",
			"content": "What do graphic designers use when making this masterpiece ??",
			"name": "erenjg65",
			"avatar": "https://i.pinimg.com/75x75_RS/9d/9a/ee/9d9aeedb5eaf0ca839b10963e4d93f5d.jpg",
			"url": "https://www.pinterest.com/erenjg65",
			"like_count": 2,
			"reply_count": 1,
			"helpful_count": 1
		},
		{
			"id": "5366262573540896959",
			"created_at": "Mon, 27 May 2024 11:15:40 +0000",
			"content": "Follow me Plizz",
			"name": "rabinhasan666",
			"avatar": "https://i.pinimg.com/75x75_RS/8d/c9/45/8dc9452bb0c64cb151e6393cb0ec7ced.jpg",
			"url": "https://www.pinterest.com/rabinhasan666",
			"like_count": 0,
			"reply_count": 0,
			"helpful_count": 0
		},
		{
			"id": "5366671911669514743",
			"created_at": "Wed, 29 May 2024 17:28:48 +0000",
			"content": "Tutorial pls",
			"name": "meghnachetry10",
			"avatar": "https://s.pinimg.com/images/user/default_75.png",
			"url": "https://www.pinterest.com/meghnachetry10",
			"like_count": 1,
			"reply_count": 0,
			"helpful_count": 0
		},
		{
			"id": "5367528514371235950",
			"created_at": "Mon, 03 Jun 2024 10:56:27 +0000",
			"content": "awsm",
			"name": "lime238l",
			"avatar": "https://i.pinimg.com/75x75_RS/33/2c/57/332c572b8c60be6f9e8ab9fd43b61aa5.jpg",
			"url": "https://www.pinterest.com/lime238l",
			"like_count": 0,
			"reply_count": 0,
			"helpful_count": 0
		}
	]
}
```

### Contact

Please visit us through [epctex.com](https://epctex.com) to see all the products that are available for you. If you are looking for any custom integration or so, please reach out to us through the chat box in [epctex.com](https://epctex.com). In need of support? <business@epctex.com> is at your service.

# Actor input Schema

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

URLs to start with. You can provide pin, idea, collection, user or search URL.

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

The keyword that you can search on Pinterest

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

Include comments for the pins

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

Includes only user info for fewer requests and faster results

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

Maximum number of items that you want as output. Default is all

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

The page number that you want to end with. By default there is no end page. This is applies to all search request and startUrls individually.

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

Function that takes a JQuery handle ($) as argument and returns data that will be merged with the default output

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

Function that takes each of the objects as argument and returns data that will be mapped by the function itself.

## `proxy` (type: `object`):

Select proxies to be used by your crawler.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.pinterest.com/pin/1054827543951238554/",
    "https://www.pinterest.com/ideas/beauty/935541271955/",
    "https://www.pinterest.com/dudadelsanto/",
    "https://www.pinterest.com/dudadelsanto/nail-inspo/",
    "https://www.pinterest.com/search/pins/?q=Valentine%E2%80%99s%20Nail%20Art&rs=hub_page"
  ],
  "includeComments": false,
  "includeUserInfoOnly": false,
  "maxItems": 20,
  "endPage": 1,
  "extendOutputFunction": "($) => { return {} }",
  "customMapFunction": "(object) => { return {...object} }",
  "proxy": {
    "useApifyProxy": true
  }
}
```

# 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": [
        "https://www.pinterest.com/pin/1054827543951238554/",
        "https://www.pinterest.com/ideas/beauty/935541271955/",
        "https://www.pinterest.com/dudadelsanto/",
        "https://www.pinterest.com/dudadelsanto/nail-inspo/",
        "https://www.pinterest.com/search/pins/?q=Valentine%E2%80%99s%20Nail%20Art&rs=hub_page"
    ],
    "maxItems": 20,
    "endPage": 1,
    "extendOutputFunction": ($) => { return {} },
    "customMapFunction": (object) => { return {...object} },
    "proxy": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("epctex/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": [
        "https://www.pinterest.com/pin/1054827543951238554/",
        "https://www.pinterest.com/ideas/beauty/935541271955/",
        "https://www.pinterest.com/dudadelsanto/",
        "https://www.pinterest.com/dudadelsanto/nail-inspo/",
        "https://www.pinterest.com/search/pins/?q=Valentine%E2%80%99s%20Nail%20Art&rs=hub_page",
    ],
    "maxItems": 20,
    "endPage": 1,
    "extendOutputFunction": "($) => { return {} }",
    "customMapFunction": "(object) => { return {...object} }",
    "proxy": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("epctex/pinterest-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 '{
  "startUrls": [
    "https://www.pinterest.com/pin/1054827543951238554/",
    "https://www.pinterest.com/ideas/beauty/935541271955/",
    "https://www.pinterest.com/dudadelsanto/",
    "https://www.pinterest.com/dudadelsanto/nail-inspo/",
    "https://www.pinterest.com/search/pins/?q=Valentine%E2%80%99s%20Nail%20Art&rs=hub_page"
  ],
  "maxItems": 20,
  "endPage": 1,
  "extendOutputFunction": "($) => { return {} }",
  "customMapFunction": "(object) => { return {...object} }",
  "proxy": {
    "useApifyProxy": true
  }
}' |
apify call epctex/pinterest-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/rusvWpGtw0MugV2j4/builds/3mdr2rpdPezDcr9dT/openapi.json
