# Pinterest Ads Scraper With Engagement & Website Links (`scrapier/pinterest-ads-scraper`) Actor

Scrape Pinterest ads with engagement metrics and website links, including ad titles, descriptions, images, advertisers, clicks, saves, and destination URLs. Analyze competitor campaigns, discover winning creatives, track engagement, research products, and optimize Pinterest advertising strategies.

- **URL**: https://apify.com/scrapier/pinterest-ads-scraper.md
- **Developed by:** [Scrapier](https://apify.com/scrapier) (community)
- **Categories:** Lead generation, Social media, Automation
- **Stats:** 2 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.99 / 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 Ads Scraper — Engagement, Destination URLs & Video Variants

Pinterest Ads Scraper With Engagement & Website Links queries Pinterest's public Ads Library by market and date window and returns every matching ad as flattened JSON — advertiser name, creative, targeting, and Pinterest's reach ranges. It also fetches each ad's real save, comment, share and reaction counts plus its outbound destination URL from the pin's closeup page, and encoded video variants for video ads. Every response is structured JSON — ready to pass directly to an LLM, index into a vector store, or feed a recurring ad-monitoring pipeline.

### 🧭 What is Pinterest Ads Scraper With Engagement & Website Links?

Pinterest Ads Scraper With Engagement & Website Links queries Pinterest's own **Ads Library** — the public page where anyone can browse currently and recently running Pinterest ads by country and date — and returns every matching ad as one structured row. It goes beyond the base ad-creative/targeting data by also fetching each ad's real engagement counts and its outbound destination link, so you see the creative, who it targets, and what happened after the click. No Pinterest account, login, or API key is required — the Actor reads pages that are already public.

- 📌 Ad creative and metadata — advertiser name, title, ad text, image and video URLs
- 🎯 Targeting signals — age buckets, gender, interests, countries, regions
- 📊 Disclosed reach ranges — per-country and EU-wide, exactly as Pinterest publishes them
- 💬 Real engagement counts — saves, comments, shares, reaction breakdown (where Pinterest exposes them)
- 🌐 Outbound destination URL and domain — the landing page the ad actually sends clicks to
- 🎬 Video-format variants for video ads
- 🌍 Query controls — `market` (country) and a `startDate`/`endDate` flight window

### 📦 What data can you get with Pinterest Ads Scraper With Engagement & Website Links?

Every run returns one row per ad, and each row carries four groups of fields pulled from two different Pinterest surfaces — the Ads Library listing and the pin's own closeup page.

| Result Type | Extracted Fields | Primary Use Case |
| --- | --- | --- |
| Ad creative & metadata | `pin_id`, `adUrl`, `advertiserNames`, `adTitle`, `adDetailsText`, `adImageUrl`, `adVideoUrl`, `isVideoAd`, `adFlightStartDate`, `adFlightEndDate`, `scrapedAt` | Creative research, advertiser tracking |
| Engagement & destination | `engagementDataAvailable`, `engagementSaves`, `engagementCommentCount`, `engagementShareCount`, `engagementReactionTotal`, `engagementReactionBreakdown`, `destinationUrl`, `destinationDomain`, `videoFormatVariants` | Ad performance signals, landing-page discovery |
| Targeting & reach | `targetingAgeBuckets`, `targetingGenders`, `targetingInterests`, `targetingCountries`, `targetingRegions`, `reachByCountry`, `reachEU`, `keywordsUsed`, `negativeKeywordsUsed` | Audience-strategy research |
| Raw ad record | `ad_details` | Backward-compatible full nested object from the base actor |

#### 💬 Engagement, destination links and video variants

This is the data the standard Ads Library listing does not show you. For each collected ad, the Actor requests the pin's own closeup page (`pinterest.com/pin/{pin_id}/`) and extracts its embedded engagement block: real save count, comment count, share count, and a per-reaction-type breakdown, summed into `engagementReactionTotal`. From the same page it pulls the ad's actual outbound `destinationUrl` (parsed into `destinationDomain`) — the landing page the click goes to — and, for video ads, the encoded `videoFormatVariants`. Coverage depends on what Pinterest itself exposes for a given pin: `engagementDataAvailable` is `true` only when Pinterest's own aggregated-stats block is present, and any field Pinterest doesn't expose is left `null` rather than estimated or defaulted to zero.

```json
{
  "engagementDataAvailable": true,
  "engagementSaves": 830,
  "engagementCommentCount": 4,
  "engagementShareCount": 0,
  "engagementReactionTotal": 1,
  "engagementReactionBreakdown": [{ "reactionCount": 1, "reactionType": 1 }],
  "destinationUrl": "https://example-brand.com/landing-page?utm_source=pinterest",
  "destinationDomain": "example-brand.com",
  "videoFormatVariants": null
}
```

#### 🎯 Targeting and reach data

Every ad also carries the same targeting and reach fields the base Ads Library scraper returns: age buckets, gender, interest and geographic targeting, plus Pinterest's disclosed reach ranges by country and for the EU. Pinterest never publishes exact spend or impression numbers for any ad, so `reachByCountry` and `reachEU` stay range strings (e.g. `"0 - 10000"`) rather than a fabricated exact figure — useful for gauging which markets and audience segments an advertiser is prioritizing.

### 💡 Why not build this yourself?

Pinterest's Ads Library has no official public API — the page itself calls an unofficial internal endpoint (`ads.pinterest.com/resource/ApiResource/get/`) that expects browser-specific headers and a paginated `bookmark` token, and the pin closeup page used for engagement/destination data returns its data embedded inside HTML that has to be regex-extracted, not a documented JSON schema. Both surfaces can change without notice, and scraping either at volume without retry logic and proxy support risks getting blocked. This Actor already implements the request headers, pagination, retries, and HTML parsing needed for both, and re-checks them so you don't have to maintain that code yourself.

### 🔍 What is the difference between an Ads Library scraper and an ad engagement scraper?

An Ads Library scraper answers "what ad is running, and to whom" — creative, advertiser, targeting, flight dates. An ad engagement scraper answers "what happened after someone saw it" — saves, comments, shares, reactions, and where the click actually lands. Pinterest exposes these on two different pages: the Ads Library listing for the first, and each pin's own closeup page for the second. Most Pinterest ad tools only cover the first, because it's what the Ads Library page itself shows. This Actor returns both in the same row — the Ads Library fields (`advertiserNames`, `adTitle`, targeting, reach) alongside the engagement/destination fields (`engagementSaves`, `destinationUrl`, and so on) pulled from the closeup page — so you don't need a second tool or a second scrape to connect a creative to its performance.

### 🚀 How to scrape Pinterest ads with Pinterest Ads Scraper With Engagement & Website Links?

1. Open **Pinterest Ads Scraper With Engagement & Website Links** on the Apify Store and click **Try for free**.
2. Set `startDate` and `endDate` to the ad flight window you want to search. Pinterest's public Ads Library lags real time, so very recent windows (2025 and later) commonly return zero ads — start with an earlier window and adjust from there.
3. Choose a `market` — only the countries Pinterest's own Ads Library actually supports are listed.
4. Set `maxAds` (1–10,000) and decide whether `fetchEngagementData` should stay on; optionally cap `maxEngagementFetches` if you only want the extra lookup on some of the collected ads.
5. Click **Start**, then export the dataset as JSON, CSV, Excel, or any other format the Apify dataset export supports.

```json
{
  "market": "Germany",
  "startDate": "2024-06-01",
  "endDate": "2024-06-30",
  "maxAds": 200,
  "fetchEngagementData": true
}
```

#### How to cover multiple markets or date windows

There is no array-of-queries input on this Actor — each run takes exactly one `market` and one `startDate`/`endDate` window. To cover several markets or windows, start one run per combination, either by saving each as a separate Apify Task or by looping over `client.actor(...).call(run_input=...)` with the Apify API/SDK, one call per market.

### ⬇️ Input

All fields are optional — the schema declares no required parameters. `startDate`/`endDate`, `market`, and `maxAds` also accept legacy alias keys (`start_date`, `end_date`, `country`, `resultsLimit`) kept for backward compatibility with the base actor's input format; when both a new and a legacy key are set, the new key wins.

| Parameter | Required | Type | Description | Example Value |
| --- | --- | --- | --- | --- |
| `startDate` | No | String (date) | First day of the ad flight window to search (`YYYY-MM-DD`). Also accepts the legacy `start_date` key. | `"2024-06-01"` |
| `endDate` | No | String (date) | Last day of the ad flight window to search (`YYYY-MM-DD`). Also accepts the legacy `end_date` key. | `"2024-06-30"` |
| `market` | No | String (enum, default `"France"` via `country`) | The country whose Pinterest Ads Library to search. Also accepts the legacy `country` key. Only markets Pinterest's public Ads Library actually supports are listed — see the enum in the schema. | `"Germany"` |
| `maxAds` | No | Integer (min 1, max 10000, default 100) | Maximum number of ads to collect. Also accepts the legacy `resultsLimit` key. | `100` |
| `fetchEngagementData` | No | Boolean (default `true`) | When enabled, fetches each ad's pin closeup page for saves/comments/shares/reaction counts, the destination URL, and video-format variants. | `true` |
| `maxEngagementFetches` | No | Integer (min 0, max 10000, default 0) | Caps how many collected ads get the extra closeup-page lookup. `0` = look up every collected ad (up to `maxAds`). Ignored when `fetchEngagementData` is off. | `0` |
| `start_date` | No | String (date, default `"2024-06-01"`) | Legacy alias for `startDate`. | `"2024-06-01"` |
| `end_date` | No | String (date, default `"2024-06-30"`) | Legacy alias for `endDate`. | `"2024-06-30"` |
| `country` | No | String (enum, default `"France"`) | Legacy alias for `market`. | `"France"` |
| `resultsLimit` | No | Integer (min 1, max 10000, default 100) | Legacy alias for `maxAds`. | `100` |
| `proxyConfiguration` | No | Object | Apify Proxy configuration. Optional — enable only if you experience access issues. | `{ "useApifyProxy": false }` |

#### Example JSON input

```json
{
  "market": "Germany",
  "startDate": "2024-06-01",
  "endDate": "2024-06-30",
  "maxAds": 100,
  "fetchEngagementData": true,
  "maxEngagementFetches": 0
}
```

**Common pitfall:** setting `startDate`/`endDate` to the current month. Pinterest's public Ads Library lags real time, and very recent windows (2025 and later) frequently return zero ads for many markets — this is a real constraint on Pinterest's side, not a bug in the Actor. If a run returns no ads, widen the window or move it earlier before assuming the market has no active advertising.

### ⬆️ Output

Results are pushed to the Actor's dataset one row per ad, in real time as each ad is collected — you don't wait for the whole run to finish. Every row is a typed, flattened JSON object with a consistent set of keys across the run; export it as JSON, CSV, Excel, or any other format the Apify dataset export supports.

#### Scraped ads

```json
[
  {
    "pin_id": "123456789012345678",
    "ad_details": { "advertiser_names": ["Example Brand"], "pin_data": { "...": "raw nested record, kept for backward compatibility" } },
    "adUrl": "https://ads.pinterest.com/ads-repository/123456789012345678/",
    "advertiserNames": ["Example Brand"],
    "adTitle": "Summer sale — up to 40% off",
    "adDetailsText": "Shop the new collection before it's gone.",
    "adImageUrl": "https://i.pinimg.com/example.jpg",
    "adVideoUrl": null,
    "isVideoAd": false,
    "targetingAgeBuckets": ["25-34", "35-44"],
    "targetingGenders": ["female"],
    "targetingInterests": [],
    "targetingCountries": ["DE"],
    "targetingRegions": [],
    "reachByCountry": { "Germany": "0 - 10000" },
    "reachEU": "0 - 10000",
    "keywordsUsed": false,
    "negativeKeywordsUsed": false,
    "adFlightStartDate": "2024-06-01",
    "adFlightEndDate": "2024-06-30",
    "scrapedAt": "2026-08-01T12:00:00Z",
    "engagementDataAvailable": true,
    "engagementSaves": 830,
    "engagementCommentCount": 4,
    "engagementShareCount": 0,
    "engagementReactionTotal": 1,
    "engagementReactionBreakdown": [{ "reactionCount": 1, "reactionType": 1 }],
    "destinationUrl": "https://example-brand.com/landing-page?utm_source=pinterest",
    "destinationDomain": "example-brand.com",
    "videoFormatVariants": null
  },
  {
    "pin_id": "987654321098765432",
    "ad_details": { "advertiser_names": ["Second Brand"], "pin_data": { "...": "raw nested record" } },
    "adUrl": "https://ads.pinterest.com/ads-repository/987654321098765432/",
    "advertiserNames": ["Second Brand"],
    "adTitle": "New arrivals for fall",
    "adDetailsText": "",
    "adImageUrl": "https://i.pinimg.com/example2.jpg",
    "adVideoUrl": "https://v.pinimg.com/example2.mp4",
    "isVideoAd": true,
    "targetingAgeBuckets": ["18-24"],
    "targetingGenders": [],
    "targetingInterests": ["fashion"],
    "targetingCountries": ["DE"],
    "targetingRegions": ["Bavaria"],
    "reachByCountry": { "Germany": "10000 - 50000" },
    "reachEU": "10000 - 50000",
    "keywordsUsed": true,
    "negativeKeywordsUsed": false,
    "adFlightStartDate": "2024-06-05",
    "adFlightEndDate": "2024-06-25",
    "scrapedAt": "2026-08-01T12:00:03Z",
    "engagementDataAvailable": false,
    "engagementSaves": null,
    "engagementCommentCount": null,
    "engagementShareCount": 0,
    "engagementReactionTotal": null,
    "engagementReactionBreakdown": null,
    "destinationUrl": "https://second-brand.com/fall-collection",
    "destinationDomain": "second-brand.com",
    "videoFormatVariants": { "V_HLSV4": "https://v1.pinimg.com/videos/hls/example2/hls_v4.m3u8" }
  },
  {
    "pin_id": "555555555555555555",
    "ad_details": { "advertiser_names": ["Third Brand"], "pin_data": { "...": "raw nested record" } },
    "adUrl": "https://ads.pinterest.com/ads-repository/555555555555555555/",
    "advertiserNames": ["Third Brand"],
    "adTitle": "Free shipping this week",
    "adDetailsText": "Ends Sunday.",
    "adImageUrl": "https://i.pinimg.com/example3.jpg",
    "adVideoUrl": null,
    "isVideoAd": false,
    "targetingAgeBuckets": [],
    "targetingGenders": ["male", "female"],
    "targetingInterests": [],
    "targetingCountries": ["DE"],
    "targetingRegions": [],
    "reachByCountry": { "Germany": "0 - 10000" },
    "reachEU": "0 - 10000",
    "keywordsUsed": false,
    "negativeKeywordsUsed": true,
    "adFlightStartDate": "2024-06-10",
    "adFlightEndDate": "2024-06-30",
    "scrapedAt": "2026-08-01T12:00:06Z",
    "engagementDataAvailable": true,
    "engagementSaves": 12,
    "engagementCommentCount": 0,
    "engagementShareCount": 0,
    "engagementReactionTotal": 0,
    "engagementReactionBreakdown": [],
    "destinationUrl": null,
    "destinationDomain": null,
    "videoFormatVariants": null
  }
]
```

### 💡 How can I use the data extracted with Pinterest Ads Scraper With Engagement & Website Links?

- **📊 Marketing and competitive analysts:** track which advertisers are running Pinterest ads in a given market and window, which creatives they're using, and how those creatives are performing via `engagementSaves`/`engagementShareCount` — without needing an ad account of your own.
- **🤖 AI engineers and LLM developers:** feed the structured `advertiserNames`, `adTitle`, `adDetailsText`, and engagement fields to an LLM as grounded context for ad-copy analysis, brand-monitoring agents, or summarized competitive briefings.
- **🌐 Growth and affiliate researchers:** use `destinationUrl`/`destinationDomain` to see exactly which sites are buying Pinterest ad traffic in a market — useful for identifying active affiliate or landing-page campaigns.
- **🎨 Creative and content teams:** pull `adImageUrl`, `adVideoUrl`, and `videoFormatVariants` across a date window to study creative and format trends (image vs. video) by market or targeting segment.

### 📈 How do you monitor Pinterest ad engagement and destination links over time?

Ad engagement isn't static — saves, comments, and shares accumulate the longer an ad runs, and an advertiser's destination URL can change mid-flight (a new landing page, a new UTM tag, a new domain entirely). Monitoring means running this Actor repeatedly against the same market and comparing the results, not scraping once and treating the numbers as final.

The fields worth diffing between runs are `engagementSaves`, `engagementCommentCount`, `engagementShareCount`, `engagementReactionTotal`, and `destinationUrl`/`destinationDomain` — join two runs on `pin_id` and compare. A rising `engagementSaves` count on a specific `pin_id` signals a creative that's resonating; a changed `destinationDomain` on the same `pin_id` signals a mid-flight redirect or a new campaign taking over an existing ad slot.

A practical loop: schedule a run for your market of interest with a rolling `startDate`/`endDate` window, store each run's dataset, then compare the latest run's `pin_id` → `engagementSaves`/`destinationUrl` mapping against the previous run's and alert on the deltas that matter to you. Use [Apify Schedules](https://docs.apify.com/platform/schedules) to automate the recurring runs — this Actor has no built-in diffing or alerting of its own, so the comparison step runs in your own pipeline against the exported datasets.

### 🔌 Integrate Pinterest Ads Scraper With Engagement & Website Links and automate your workflow

Pinterest Ads Scraper With Engagement & Website Links works with any language or tool that can send an HTTP request, through the [Apify API](https://docs.apify.com/api/v2) and its client libraries.

#### REST API with Python

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")

run = client.actor("<YOUR_USERNAME>/pinterest-ads-scraper-with-engagement-and-website-links").call(
    run_input={
        "market": "France",
        "startDate": "2024-06-01",
        "endDate": "2024-06-30",
        "maxAds": 100,
        "fetchEngagementData": True,
    }
)

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["advertiserNames"], item["destinationUrl"])
```

#### Scheduled monitoring and delivery

This Actor has no dedicated webhook or MCP integration of its own. For recurring collection, use the Apify platform's own [Schedules](https://docs.apify.com/platform/schedules) to run it on a cron interval, and [webhooks](https://docs.apify.com/platform/integrations/webhooks) — a platform-level feature available to any Actor — to trigger a notification or downstream job when a run finishes.

### ⚖️ Is it legal to scrape Pinterest ads?

Yes — Pinterest Ads Scraper With Engagement & Website Links reads Pinterest's public Ads Library and public pin pages, the same pages any visitor can open without logging in; the Actor returns only what is already publicly visible there. In *hiQ Labs v. LinkedIn Corp.* (9th Cir. 2019), the court held that scraping publicly accessible web data does not violate the U.S. Computer Fraud and Abuse Act. The data returned here — advertiser names, ad creative, targeting criteria, and aggregate engagement/reach figures — is business and marketing data about ads and brands, not personal data about identifiable private individuals, so GDPR/CCPA personal-data obligations generally do not attach to it; Pinterest's own Terms of Service and any applicable database-rights rules still govern how you may reuse the data, particularly for bulk storage or redistribution. Scraping for ad-hoc competitive monitoring and scraping to build a training dataset carry different risk profiles. Consult your legal team for commercial use cases involving bulk data storage.

### ❓ Frequently asked questions

#### Do I need a Pinterest account, login, or API key to use this scraper?

No. It reads Pinterest's public Ads Library and public pin pages, which are openly browsable without an account.

#### Which countries (markets) can I search?

Only the markets listed in the `market`/`country` enum — 30 countries including France, Germany, Italy, Poland, and Turkey. **United States and United Kingdom are not covered by Pinterest's own public Ads Library** and are not in the list; Norway is included even though it's outside the EU.

#### Why did my run return zero ads?

Almost always the date window. Pinterest's public Ads Library lags real time, so windows in 2025 or later commonly return no ads for many markets. Try an earlier or wider `startDate`/`endDate` window before assuming a market has no ads.

#### Can I still use the old `start_date`/`end_date`/`country`/`resultsLimit` input keys?

Yes. The Actor accepts both the new field names (`startDate`, `endDate`, `market`, `maxAds`) and the original base-actor keys; if both are set, the new key takes priority.

#### How does this scraper handle Pinterest's anti-bot measures?

It sends browser-matching request headers, retries failed requests up to 3 times with a growing delay, retries any ads that still failed after the first pass, and supports an optional Apify Proxy configuration if you hit access issues. It does not solve CAPTCHAs.

#### Does this scraper extract ad engagement and destination-link data?

Yes, when `fetchEngagementData` is on (the default). Each row carries `engagementSaves`, `engagementCommentCount`, `engagementShareCount`, `engagementReactionTotal`, `engagementReactionBreakdown`, `destinationUrl`, `destinationDomain`, and `videoFormatVariants`. These are left `null` (with `engagementDataAvailable: false`) when Pinterest's own pin page doesn't expose aggregated stats for that ad — never estimated.

#### How many ads does this scraper return per run?

Up to `maxAds` (default 100, maximum 10,000). Of those, up to `maxEngagementFetches` also get the extra engagement/destination lookup — `0` (the default) means every collected ad gets it.

#### How is this different from the base Pinterest Ads Scraper?

It's a superset: same two-stage Ads Library fetch and the same `pin_id`/`ad_details` fields, plus the base ad fields flattened into named columns, real engagement metrics, destination URLs, and video-format variants pulled from each pin's closeup page — none of which the base Ads Library fetch alone returns.

#### How do I monitor an ad's engagement or destination link over time?

Run this Actor on a schedule against the same market, join successive runs on `pin_id`, and diff `engagementSaves`/`engagementCommentCount`/`engagementShareCount`/`destinationUrl` between runs. Use [Apify Schedules](https://docs.apify.com/platform/schedules) to automate the recurring runs.

#### Does this scraper work with Claude, ChatGPT, and other AI agent frameworks?

It's callable as an HTTP endpoint through the Apify API by any agent framework that can send a request — an agent can trigger a run, poll for completion, and pass the returned JSON to a model as grounded context. It is not currently exposed through a dedicated MCP server.

#### Can I use this without managing proxies or Pinterest credentials?

Yes. No Pinterest login or credentials are needed at all, and the Apify Proxy configuration is entirely optional — most runs work without enabling it.

### 📬 Your feedback

Found a bug, or is a field missing that you'd expect from Pinterest's Ads Library or a pin's engagement data? Let us know through the Actor's **Issues** tab on Apify or the support contact on its store listing — feedback like this drives what gets fixed and added next.

# Actor input Schema

## `startDate` (type: `string`):

First day of the ad flight window to search (YYYY-MM-DD). Also accepts the legacy 'start\_date' key. Pinterest's public Ads Library lags real time - very recent windows (2025+) commonly return 0 ads; the prefilled window is a known-populated one.

## `endDate` (type: `string`):

Last day of the ad flight window to search (YYYY-MM-DD). Also accepts the legacy 'end\_date' key.

## `market` (type: `string`):

The country whose Pinterest Ads Library you want to search. Also accepts the legacy 'country' key. Only markets Pinterest's own Ads Library actually supports are listed (United States and United Kingdom are not covered by Pinterest's public Ads Library and were removed; Norway was added).

## `maxAds` (type: `integer`):

Maximum number of ads to collect (1-10,000). Also accepts the legacy 'resultsLimit' key.

## `fetchEngagementData` (type: `boolean`):

When enabled, fetches each ad's pin closeup page to collect saves/comments/shares/reaction counts, the real outbound destination (landing-page) URL, and video-format variants for video ads. Coverage of the engagement counts is real-data-dependent (not every pin exposes them) - populated fields report real numbers, unavailable ones are left null, never faked.

## `maxEngagementFetches` (type: `integer`):

Caps how many of the collected ads get the extra closeup-page engagement/destination lookup (bounds the extra requests). 0 = look up every collected ad (up to Max Ads). Ignored when 'Fetch Engagement & Destination Data' is off.

## `start_date` (type: `string`):

Legacy alias for 'startDate' - kept so existing base-actor input JSON keeps working. Prefer 'startDate' for new runs.

## `end_date` (type: `string`):

Legacy alias for 'endDate' - kept so existing base-actor input JSON keeps working. Prefer 'endDate' for new runs.

## `country` (type: `string`):

Legacy alias for 'market' - kept so existing base-actor input JSON keeps working. Prefer 'market' for new runs.

## `resultsLimit` (type: `integer`):

Legacy alias for 'maxAds' - kept so existing base-actor input JSON keeps working. Prefer 'maxAds' for new runs.

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

Enable if you experience access issues. Most users can leave this disabled.

## Actor input object example

```json
{
  "startDate": "2024-06-01",
  "endDate": "2024-06-30",
  "market": "France",
  "maxAds": 100,
  "fetchEngagementData": true,
  "maxEngagementFetches": 0,
  "start_date": "2024-06-01",
  "end_date": "2024-06-30",
  "country": "France",
  "resultsLimit": 100,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

All scraped items in the Actor's 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 = {
    "startDate": "2024-06-01",
    "endDate": "2024-06-30",
    "market": "France",
    "maxAds": 100,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapier/pinterest-ads-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 = {
    "startDate": "2024-06-01",
    "endDate": "2024-06-30",
    "market": "France",
    "maxAds": 100,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("scrapier/pinterest-ads-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 '{
  "startDate": "2024-06-01",
  "endDate": "2024-06-30",
  "market": "France",
  "maxAds": 100,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call scrapier/pinterest-ads-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapier/pinterest-ads-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/g4GX5EykHEaqbxuXb/builds/tqZnEOG3FRunNtwa4/openapi.json
