# Pinterest Ad Library Scraper: EU Ads & Reach (`rastriq/pinterest-ad-library-scraper`) Actor

Extract ads from the Pinterest Ads Repository (DSA Art. 39): advertiser, creative, targeting, reach per EU country and delivery dates. No API key needed.

- **URL**: https://apify.com/rastriq/pinterest-ad-library-scraper.md
- **Developed by:** [Rastriq — Structured data from the world](https://apify.com/rastriq) (community)
- **Categories:** Social media, Marketing
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.90 / 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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Pinterest Ad Library Scraper

Extracts ads from the **Pinterest Ads Repository** — the DSA Article 39 transparency library.

Filter by country, date range, advertiser name, category, age and gender. Returns creative data, audience targeting, reach per country and delivery dates. No API key or login needed.

### Features

- **No browser, no API key** — pure HTTP calls to Pinterest's public API
- Filter by EU country, advertiser name, ad category, gender and age bucket
- Automatic detail enrichment (fetches full ad data per pin)
- Returns per-country reach, interest/device targeting and pinner-list types
- Outputs structured JSON ready for analysis

### Input

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `country` | string | **Yes** | `ES` | EU country code (`ES`, `DE`, `FR`…) |
| `startDate` | string | No | 30 days ago | Ads shown from this date (`YYYY-MM-DD`) |
| `endDate` | string | No | Today | Ads shown up to this date (`YYYY-MM-DD`) |
| `advertiserName` | string | No | All | Filter by advertiser name (partial match) |
| `adCategory` | string | No | Any | `ALL`, `HOUSING`, `CREDIT` or `EMPLOYMENT` |
| `gender` | string | No | Any | `UNSPECIFIED`, `FEMALE` or `MALE` |
| `ageBucket` | string | No | Any | Age range: `AGE_18_24`, `AGE_25_34`… `AGE_65_PLUS` |
| `maxResults` | integer | No | 200 | Max ads to extract (1–5 000) |
| `proxyConfiguration` | object | No | None | Optional proxy (EU IP may help) |

#### Example input

```json
{
  "country": "ES",
  "advertiserName": "adidas",
  "maxResults": 50
}
```

### Output

Each dataset item represents one ad.

#### Common fields (shared across our DSA ad library scrapers)

| Field | Description |
|-------|-------------|
| `adId` | Durable ad identifier |
| `advertiser` | Advertiser / brand |
| `adPayer` | Entity that paid for the ad (`null` if not disclosed) |
| `firstShownDate` / `lastShownDate` | Delivery period |
| `impressions` | Impressions (`null` when the platform only reports reach) |
| `searchCountry` | Country used in the search |
| `sourceUrl` | Library endpoint the record came from |
| `is_natural_person_suspected` | `true` if the advertiser/payer name looks like a private individual (heuristic). Treat flagged records as personal data under GDPR |

The platform-specific fields follow:

| Field | Type | Description |
|-------|------|-------------|
| `pinId` | string | Unique Pinterest pin/ad identifier |
| `advertiserNames` | string\[] | Advertiser names |
| `title` | string | Ad creative title |
| `description` | string | Ad description text |
| `imageUrl` | string | Ad image URL |
| `videoUrl` | string | Video URL (for video ads) |
| `startDate` | string | Delivery start date |
| `endDate` | string | Delivery end date |
| `ageBuckets` | string\[] | Age targeting buckets |
| `genders` | string\[] | Gender targeting |
| `countries` | string\[] | Targeted countries |
| `interests` | string\[] | Interest targeting categories |
| `devices` | string\[] | Device targeting |
| `keywordsUsed` | boolean | Whether keyword targeting was used |
| `userCountByCountry` | object | Reach per country (10K ranges) |
| `userCountEu` | string | Total EU reach (10K ranges) |
| `contentCommercial` | boolean | Declared as commercial communication |
| `isLocalInventory` | boolean | Local inventory ad |
| `pinnerListTypes` | string\[] | Pinner list types for targeting |
| `searchCountry` | string | Country used in the query |
| `scrapedAt` | string | Extraction timestamp (ISO 8601) |
| `source` | string | Always `pinterest_ad_library` |

#### Example output

```json
{
  "adId": "1234567890123",
  "advertiser": "adidas",
  "adPayer": null,
  "firstShownDate": "2026-10-15",
  "lastShownDate": null,
  "impressions": null,
  "sourceUrl": "https://api.pinterest.com/ads/v4/ads_repository/ad_library/1234567890123",
  "is_natural_person_suspected": false,
  "pinId": "1234567890123",
  "advertiserNames": ["adidas"],
  "title": "Ultraboost 22",
  "description": "Run beyond limits",
  "imageUrl": "https://i.pinimg.com/...",
  "startDate": "2026-10-15",
  "ageBuckets": ["AGE_25_34", "AGE_35_44"],
  "genders": ["FEMALE", "MALE"],
  "countries": ["ES", "FR", "DE"],
  "userCountByCountry": { "ES": "10000-20000", "FR": "20000-30000" },
  "userCountEu": "50000-60000",
  "scrapedAt": "2026-11-12T10:30:00Z",
  "source": "pinterest_ad_library"
}
```

### How it works

The scraper calls Pinterest's **public Ads Repository API** (`GET /ads/v4/ads_repository/ad_library`). No authentication is required.

1. **List pass** — fetches paginated ad listings filtered by country, date, advertiser, etc.
2. **Detail pass** — for each ad, calls the detail endpoint (`/ad_library/{pin_id}`) to get full targeting and advertiser data (the list endpoint omits some fields).

Concurrent detail requests are limited to 5 at a time with exponential backoff on rate limits.

### Notes

- **Country is required** by the Pinterest API. It defaults to `ES` (Spain).
- Start date defaults to 30 days ago if not specified.
- Reach counts are returned as ranges (e.g. `10000-20000`), not exact numbers.
- The API may require an EU IP for some country queries — use the proxy option if needed.

### 💰 How much does it cost to use Pinterest Ad Library Scraper?

Pinterest Ad Library Scraper uses **pay-per-event** pricing, so you only pay for the ads you get:

| Event | Price |
|-------|-------|
| Actor start (per GB of memory) | $0.0005 |
| Each ad record in the dataset | $0.0009 |

That works out to roughly **$0.90 per 1,000 ads**, platform compute included. A 10-ad test run costs about one cent. Use **Max ads** to cap what a run can cost.

### Related scrapers

- [Snapchat Ad Library Scraper](https://apify.com/rastriq/snapchat-ad-library-scraper)
- [AliExpress Ad Repository Scraper](https://apify.com/rastriq/aliexpress-ad-repository-scraper)
- [Zalando Ads Repository Scraper](https://apify.com/rastriq/zalando-ads-repository-scraper)
- [Temu Ad Library Scraper](https://apify.com/rastriq/temu-ad-library-scraper)
- [TikTok Ad Library Scraper](https://apify.com/rastriq/tiktok-ad-library-scraper)
- [Facebook Ad Library Scraper](https://apify.com/rastriq/fb-adlibrary-scraper)
- [Google Ads Transparency Center Scraper](https://apify.com/rastriq/google-ads-scraper)

# Actor input Schema

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

EU country to search ads in. Required by the Pinterest API.

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

Ads shown from this date onward. Leave empty to use the last 30 days.

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

Ads shown up to this date. Leave empty for today.

## `advertiserName` (type: `string`):

Filter by advertiser name (partial match). Leave empty for all advertisers.

## `adCategory` (type: `string`):

Pinterest only labels special ad categories (housing, credit, employment). Leave on <b>Any</b> to get every ad.

## `gender` (type: `string`):

Filter by gender targeting.

## `ageBucket` (type: `string`):

Filter by age targeting bucket.

## `maxResults` (type: `integer`):

Maximum number of ads to extract. Use it to cap the cost of a run.

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

Optional proxy. The Pinterest API is open but may require an EU IP for some queries.

## Actor input object example

```json
{
  "country": "ES",
  "adCategory": "",
  "gender": "",
  "ageBucket": "",
  "maxResults": 50,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

Dataset containing all scraped ads.

# 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 = {
    "country": "ES",
    "maxResults": 50,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("rastriq/pinterest-ad-library-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 = {
    "country": "ES",
    "maxResults": 50,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("rastriq/pinterest-ad-library-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 '{
  "country": "ES",
  "maxResults": 50,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call rastriq/pinterest-ad-library-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rastriq/pinterest-ad-library-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/L5oLK8wtIo9qoceG0/builds/giWMEJksHTziUNfdC/openapi.json
