# Pinterest Video Search Scraper (`good-apis/pinterest-video-scraper`) Actor

- **URL**: https://apify.com/good-apis/pinterest-video-scraper.md
- **Developed by:** [Danny](https://apify.com/good-apis) (community)
- **Categories:** Social media, Videos
- **Stats:** 3 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.99 / 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 Video Search Scraper

Search Pinterest for a topic and get the **video pins** — each with its direct, playable video stream URL and technical details: **video URL, format, duration, width/height, thumbnail, title, description and pinner** — no login, no API key, no browser to manage.

**Pricing: $2.99 per 1,000 results** (pay per result — one result per video pin returned).

### What you get

| Field | Description |
|---|---|
| `pin_id` | Pinterest pin id |
| `title` | Pin title |
| `description` | Pin description (if any) |
| `url` | Canonical pin URL |
| `video_url` | Direct video stream URL — an **HLS `.m3u8` playlist** (see note below) |
| `video_format` | Stream format — `hls` |
| `duration_ms` | Video duration in milliseconds |
| `width` | Video width (px) |
| `height` | Video height (px) |
| `thumbnail` | Poster / thumbnail image URL |
| `pinner` | Username of the account that pinned it |
| `pinner_name` | Display name of that account |

> **About the video URL:** Pinterest serves pin video as **HLS** — `video_url` is a `.m3u8` playlist hosted on Pinterest's CDN, not a single MP4 file. It is the public, playable/downloadable source: open it in any HLS-capable player, or save it to MP4 with a standard tool (e.g. `ffmpeg -i "<video_url>" out.mp4`).

### Input

| Field | Description |
|---|---|
| `query` | What to search for. Works best with video-rich topics — `"recipes"`, `"workout"`, `"makeup tutorial"`, `"diy crafts"` |
| `max_results` | How many video pins to return; the scraper pages the search to collect them (1-100; default 20) |

```json
{ "query": "recipes", "max_results": 20 }
```

### Example output

```json
{
  "pin_id": "376472758810304963",
  "title": "15-Minute Garlic Butter Shrimp",
  "description": "Quick weeknight dinner.",
  "url": "https://www.pinterest.com/pin/376472758810304963/",
  "video_url": "https://v1.pinimg.com/videos/mc/hls/ab/cd/ef/abcdef.m3u8",
  "video_format": "hls",
  "duration_ms": 32000,
  "width": 720,
  "height": 1280,
  "thumbnail": "https://i.pinimg.com/videos/thumbnails/originals/ab/cd/ef/abcdef.jpg",
  "pinner": "tastyrecipes",
  "pinner_name": "Tasty Recipes"
}
```

### How to run

**Console** — type a query, set how many video pins you want, and click **Start**.

**API** (start a run and get the dataset):

```bash
curl -X POST "https://api.apify.com/v2/acts/YOUR_ACTOR_ID/runs?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"query": "recipes", "max_results": 20}'
```

**Python client:**

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("YOUR_ACTOR_ID").call(run_input={"query": "workout", "max_results": 20})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["title"], item["video_url"])
```

**Node.js client:**

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

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('YOUR_ACTOR_ID').call({ query: 'makeup tutorial', max_results: 20 });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

### FAQ

**Do I need to log in or provide cookies?** No. Only public video pins are returned.

**Is the video an MP4?** No — it's an HLS `.m3u8` stream (Pinterest's own format). It plays in any HLS player and converts to MP4 with `ffmpeg`.

**What if my topic has few videos?** Image-heavy topics (e.g. "home decor") have very few video pins on Pinterest, so you may get fewer than requested. Video-rich topics (recipes, workouts, tutorials) reliably fill the request. You are only charged for video pins actually returned.

**How many results can I get?** Up to 100 video pins per run; the scraper pages through the search to collect them.

**Is the data live?** Yes — every run queries Pinterest fresh.

# Actor input Schema

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

What to search for. Works best with video-rich topics like "recipes", "workout", "makeup tutorial", "diy crafts".

## `max_results` (type: `integer`):

How many video pins to return. The scraper pages through the search results to collect this many (1-100).

## Actor input object example

```json
{
  "query": "recipes",
  "max_results": 20
}
```

# Actor output Schema

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

All scraped items in the 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 = {
    "query": "recipes",
    "max_results": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("good-apis/pinterest-video-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 = {
    "query": "recipes",
    "max_results": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("good-apis/pinterest-video-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 '{
  "query": "recipes",
  "max_results": 20
}' |
apify call good-apis/pinterest-video-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

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