# Pinterest Ads Repository Exporter (EU DSA) (`xyrelith-data/pinterest-ads-repository`) Actor

Export Pinterest's public EU Digital Services Act Ads Repository across 30 markets: promoted Pins and third-party ads with advertiser accounts, creative media, flight dates, per-country reach, disclosed targeting and moderation status. No login or proxy.

- **URL**: https://apify.com/xyrelith-data/pinterest-ads-repository.md
- **Developed by:** [Xyrelith Data](https://apify.com/xyrelith-data) (community)
- **Categories:** Social media, Automation, E-commerce
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.49 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 Ads Repository Exporter (EU DSA)

Pinterest publishes the ads it serves in the European Union, Norway, Turkey and Brazil through its public Digital Services Act Ads Repository at `ads.pinterest.com/ads-repository`. This actor turns that repository into a clean dataset: one row per disclosed ad, with the advertiser, the creative, the flight dates, the reach band per country, the targeting Pinterest discloses and the moderation fields it publishes.

It reads the repository the same way the public page does — an anonymous session, the page's own `ApiResource` endpoints and the public Pin resource — so there is no Pinterest login, developer app, cookie, API key or paid proxy to set up.

Two ad sources are included:

- **Promoted Pins** (`adSource=pinterest`): Pinterest's own ads, with a pin id, the advertiser's Pinterest account, saves, comments and the landing link.
- **Third-party partner ads** (`adSource=thirdParty`): ads Pinterest serves for other ad networks. They have a hashed `adId`, a link to the partner's transparency page and no Pinterest pinner or engagement counts.

`adSource=all` alternates pages from both sources, so one run can deliver a mixed sample. Norway is covered through the third-party source; the promoted-Pin source has no Norwegian rows.

### Quick start

1. Keep the prefill: Germany, last 7 days, three ads. It is the smallest run that still returns full records.
2. Raise `maxItems`, add markets from the 30-market list and choose a date window. Long ranges are split into 32-day slices for promoted Pins and 1-day slices for third-party ads, then deduplicated.
3. Optional: set `advertiserNames` to exact repository names (run `mode=advertisers` first if you only know part of a name), pick a category, gender or age bucket, add a keyword filter, or paste specific ad ids/links into `adIds`.
4. For a recurring watch, turn on `onlyNewAds` and keep the same `monitorStoreName`; later runs return only ads they have not delivered before.

### What you get

Each ad row has `recordType=ad` and `adSource` telling you which source it came from. Advertiser suggestions from `mode=advertisers` have `recordType=advertiserSuggestion`.

| Field group | Fields | What it means |
|---|---|---|
| Identity | `adKey`, `adSource`, `pinId` or `adId`, `adUrl`, `pinUrl` | Stable key (`pin:<id>` or `ad:<id>`), repository detail page, and the public Pin page for promoted Pins. |
| Advertiser | `advertiserName`, `advertiserNames`, `advertiserNameSource` | The repository's own advertiser name from the ad detail; falls back to the Pin account for deleted pins. |
| Pinterest account | `pinnerUsername`, `pinnerFullName`, `pinnerId`, `pinnerUrl`, `pinnerImageUrl`, `pinnerFollowerCount`, `pinnerVerified`, `pinnerVerifiedMerchant`, `pinnerDomainUrl`, `pinnerDomainVerified`, `pinnerAdsOnlyProfile` | The advertiser's public Pinterest account, when the Pin still exists. |
| Creative | `title`, `description`, `imageUrl`, `imageWidth`, `imageHeight`, `imageOriginalUrl`, `hashtags`, `storyPinPages` | Pin text, highest-resolution image and story-page blocks. |
| Video | `videoUrl`, `videoHlsUrl`, `videoThumbnailUrl`, `videoVariants` | Reliable MP4 and HLS variants from the Pin record; the raw `mc/720p` link Pinterest returns in the ad detail is often hotlink-blocked and is not used. |
| Landing | `link`, `domain`, `destinationUrls`, `destinationDomain` | The Pin's landing URL and domain plus the destination URLs the DSA detail discloses. |
| Dates | `firstShownDate`, `lastShownDate`, `deliveryDays`, `daysSinceLastShown` | First and last day the ad was shown, the calendar span in days, and how long ago it last ran. |
| Markets | `countries`, `countryCodes`, `advertiserCountries`, `advertiserCountryCodes`, `searchCountry`, `searchCountryName` | Countries the ad ran in (promoted Pins), the advertiser's disclosed countries (third-party ads), and the market that returned the row. |
| Reach | `reachEu`, `reachEuMin`, `reachEuMax`, `reachByCountry`, `reachMin`, `reachMax` | Pinterest publishes reach in 10,000-user bands, not exact people. `reachMin`/`reachMax` use the EU band when present, otherwise the highest per-country band. |
| Targeting | `ages`, `genders`, `regions`, `metros`, `postalCodes`, `hasExcludedLocations`, `interests`, `pinnerListTypes`, `devices`, `internetServiceProviders`, `contextualSignals`, `geoLocation`, `dsaDeviceTargeting`, `keywordsUsed`, `negativeKeywordsUsed`, `contentCommercial`, `localInventory` | Every targeting field the repository discloses for that ad, omitted when Pinterest publishes nothing. |
| Moderation | `reviewStatus`, `statementOfReasons`, `violationSource`, `violationDecisionMeans` | Populated for the small share of disapproved ads that carry a statement of reasons. |
| Localisation | `isVerifiedMerchant`, `usePinterestAi`, `archivalInfo` | Extra fields Pinterest sets on some ads, mostly Brazilian inventory. |
| Engagement | `savedPinCount`, `commentCount`, `reactionCounts`, `shareCount`, `pinCreatedAt`, `siteName` | Public Pin counters and creation date; 0 is a real value and is kept. |
| Third-party extras | `externalAtcUrl`, `sourceVerticalId`, `creativeId`, `isRemovedCreative` | Partner transparency link and partner ad metadata. |
| Enrichment | `enrichmentStatus`, `qualityFlags` | `full`, `partial` or `listOnly`, plus flags such as `pinDeleted`, `adDetailUnavailable` or `advertiserNameMissing`. |
| Monitor | `changeType`, `firstSeenAt`, `lastSeenAt`, `contentHash` | Added when `onlyNewAds` is on. |
| Provenance | `scrapedAt` | UTC timestamp of the run that produced the row. |

Empty values are omitted at every depth: a row never contains `null`, `""`, `[]` or `{}`. `false` and `0` are kept because they are disclosed values.

#### Fill rates measured on 2026-11-15

Promoted Pins, 128 ads from France, Germany, Spain, Poland, Brazil, Turkey, Italy and the Netherlands (20 Oct – 14 Nov 2026), each with the ad detail and the public Pin record:

| Field | Filled | Note |
|---|---|---|
| dates, countries, `user_count_by_country` | 128/128 | The core DSA record. |
| advertiser name | 126/128 | The two missing ones are disapproved ads with no advertiser name. |
| EU reach band | 105/128 | Per-country reach is filled for all 128. |
| live Pinterest Pin (pinner, link, saves, comments) | 114/128 | 14 pins (10.9%) were deleted after the archive kept the ad; the DSA row still ships. |
| interests | 5/128 | Sparse by nature. |
| pinner list types | 29/128 | Audience-list disclosure. |
| destination URLs | 11/128 | The Pin's `link` covers landing URLs for live pins. |
| regions | 2/128 | Devices, carriers, contextual signals, geolocation and dynamic images were not present in this sample. |
| statement of reasons / review status | 2/128 | About 1 in 64 ads here. |

Third-party ads, 40 ad details from France and Norway:

| Field | Filled | Note |
|---|---|---|
| title, description, image, advertiser, dates, `geo_location` | 40/40 | Core partner record. |
| reach by country | 36/40 | Pinterest publishes no EU total for third-party ads. |
| interests, contextual signals, external transparency link | 18/40 | Partner disclosures. |
| regions / countries / metros | 9/40, 9/40, 7/40 | Only some partner ads disclose them. |
| ages, genders, EU reach | 0/40 | Not published for third-party ads. |

### Modes

| Mode | What it does |
|---|---|
| `ads` | Collect ad rows for the selected markets, dates, advertisers and targeting filters, or fetch the exact ids/links in `adIds`. |
| `advertisers` | Resolve a partial advertiser name (`etsy`, `ikea`) into the exact names the repository uses, ready to paste into `advertiserNames`. |

### Inputs

| Input | Type | Default | What it does |
|---|---|---|---|
| `mode` | select | `ads` | `ads` or `advertisers`. |
| `adSource` | select | `all` | `all`, `pinterest` or `thirdParty`. |
| `countries` | multi-select | `["DE"]` | Any of the 30 repository markets. |
| `startDate` / `endDate` | date | – (blank = last 7 days) | Inclusive flight-date window, `YYYY-MM-DD`. |
| `adCategory` | select | `ALL` | Pinterest ad category; promoted Pins only. |
| `gender` | select | `ALL` | Female, male or unspecified; promoted Pins only. |
| `ageBucket` | select | `ALL` | 18-24 through 65+; promoted Pins only. |
| `advertiserNames` | list | empty | Exact repository advertiser names, case-insensitive. Empty means all. |
| `advertiserSearch` | text | empty | Partial name for `mode=advertisers`. |
| `adIds` | list | empty | Pin ids, third-party ad ids or repository links. When set, filters are ignored. |
| `searchTerms` | list | empty | Case-insensitive match on title, description, advertiser, landing URL/domain, country, interest or hashtag. |
| `minReach` | integer | 0 | Minimum reach lower bound; 0 disables. |
| `maxDaysSinceLastShown` | integer | 0 | Keep ads last shown within N days; 0 disables. |
| `maxAdsPerAdvertiser` | integer | 0 | Per-advertiser cap; 0 disables. |
| `maxItems` | integer | 100 | Hard cap on dataset rows. Prefill is 3. |
| `maxPages` | integer | 50 | Safety budget for list pages across all markets and sources; 0 means no limit. |
| `includeAdDetails` | boolean | true | Fetch advertiser, full targeting, reach, dates and moderation per ad. |
| `includePinDetails` | boolean | true | Fetch the Pinterest account, landing link, engagement and video variants per promoted Pin. |
| `onlyNewAds` | boolean | false | Skip ads already delivered under `monitorStoreName`. |
| `monitorStoreName` | text | `pinterest-ads-repository-monitor` | Key-value store for the only-new memory. |
| `retries` | integer | 5 | Extra attempts after 429/5xx and transient errors. |
| `requestDelayMs` | integer | 800 | Minimum pause between requests. |
| `proxyConfiguration` | proxy | no proxy | Optional; the actor works directly. |

### Output example

A promoted Pin, trimmed:

```json
{
  "recordType": "ad",
  "adSource": "pinterest",
  "adKey": "pin:4610700951660680576",
  "pinId": "4610700951660680576",
  "adUrl": "https://ads.pinterest.com/ads-repository/4610700951660680576/",
  "advertiserName": "Amazon.fr",
  "advertiserNames": ["Amazon.fr"],
  "title": "Traxxas TRX-4M F150 1/18 MARRON AVEC ACCUS/CHARGEUR",
  "imageUrl": "https://i.pinimg.com/originals/4b/b5/44/4bb544766e7fd192d8a78f31b2ed717c.jpg",
  "link": "https://www.amazon.fr/Traxxas-TRX-4M-MARRON-ACCUS-CHARGEUR/dp/B0CP3QTL5V",
  "domain": "amazon.fr",
  "firstShownDate": "2026-05-29",
  "lastShownDate": "2026-11-07",
  "deliveryDays": 163,
  "countries": ["France"],
  "countryCodes": ["FR"],
  "reachEu": "20000 - 30000",
  "reachEuMin": 20000,
  "reachEuMax": 30000,
  "reachByCountry": {"France": "20000 - 30000"},
  "ages": ["18+"],
  "genders": ["UNSPECIFIED", "FEMALE", "MALE"],
  "contentCommercial": true,
  "pinnerUsername": "amazonshoppingfr",
  "pinnerFollowerCount": 21236,
  "savedPinCount": 7,
  "commentCount": 0,
  "enrichmentStatus": "full"
}
```

A third-party ad, trimmed:

```json
{
  "recordType": "ad",
  "adSource": "thirdParty",
  "adKey": "ad:ffffda48f69ac1b071bde8236cb362ee9f4a5d88140453de147f7a61e8121c06",
  "adId": "ffffda48f69ac1b071bde8236cb362ee9f4a5d88140453de147f7a61e8121c06",
  "adUrl": "https://ads.pinterest.com/ads-repository/ffffda48f69ac1b071bde8236cb362ee9f4a5d88140453de147f7a61e8121c06/",
  "advertiserName": "Booking.com",
  "title": "Booking.com: Hôtels et voyage",
  "searchCountry": "FR",
  "firstShownDate": "2026-11-01",
  "lastShownDate": "2026-11-13",
  "reachByCountry": {"Spain": "0 - 10000", "France": "0 - 10000"},
  "interests": ["OTHER"],
  "contextualSignals": "CRITERIA_INCLUDED_AND_EXCLUDED",
  "externalAtcUrl": "https://adstransparency.google.com/advertiser/AR02934798844673654785/creative/CR08635221706047489"
}
```

### How it works

- The public page sets an anonymous `csrftoken` on `GET /ads-repository/`. Every request then calls `/resource/ApiResource/get/` with the page's own handler (`sterling/ads-repository.js`) and the JSON payload the page itself sends.
- The ad list endpoint accepts one market and a date window. This actor walks one market at a time, splits the requested range into the server's accepted window sizes, and follows the returned `bookmark` until the page budget or `maxItems` is reached.
- Promoted Pins get two enrichment calls: the ad detail endpoint (advertiser, targeting, reach, dates, moderation) and the public `PinResource` (account, landing link, saves, comments, media, video variants). Third-party ads get the detail endpoint only.
- Rows are deduplicated by `pin:<id>` or `ad:<id>`, so an ad that appears in several pages, date slices or markets is delivered once. A third-party ad seen on several days is also delivered once.
- Pins deleted from Pinterest since the archive kept the ad are expected: the row keeps the DSA record, adds `pinDeleted` and simply has no pinner or engagement fields.
- The repository rate-limits bursts. Requests are paced (`requestDelayMs`, 800 ms by default), and 429/5xx answers are retried with backoff. A `maxPages` budget (50 by default) bounds heavily filtered scans.

### Limits

- **Coverage is 30 markets.** There is no US, UK or global version. The repository refuses unsupported country codes.
- **About 12 months of history.** It is a rolling archive and removes ads as they age out. In this run the earliest day with data was 2025-11-14. Earlier windows return nothing rather than an error.
- **Reach is a band, not a count.** Pinterest publishes ranges such as `0 - 10000` and `20000 - 30000`. The actor exposes the range and its bounds; it does not invent a midpoint.
- **Third-party ads are thinner.** They have no ages, genders, EU reach total, pinner, saves or comments, and category/gender/age filters do not apply to them. When a category, gender or age filter is set with `adSource=all`, the actor skips third-party ads and says so in the run status. With `includeAdDetails=false`, third-party rows carry no dates or reach, so the date and reach filters cannot be checked for them.
- **Deleted pins lose their Pin fields.** About 11% of a recent sample had been removed from Pinterest. Their DSA record still ships; the `pinDeleted` flag and `partial` enrichment status make this explicit.
- **Sparse disclosures stay sparse.** Devices, carriers, contextual signals, geolocation, dynamic images and archival info are absent from most promoted-Pin records. They are filled when Pinterest publishes them, not fabricated.
- **Dates lag.** The repository's last-shown dates trail the live ad state by about two days; future or too-recent days can be empty.
- **One market per query.** Multi-market runs are a sequence of per-market queries. With a small `maxItems`, rows come from the first markets in your list.
- **Page budget.** The default 50-page budget is plenty for a few hundred rows but not for an exhaustive read of a busy market. Set `maxPages` higher (or 0) when you need every page.
- **No spend, impressions or payer.** Pinterest does not disclose them in this repository, so they are not fields in this actor.

### FAQ

**Do I need a Pinterest account or cookies?** No. The actor uses the anonymous session the public page creates.

**Do I need an Apify proxy?** No. It runs directly. The optional proxy input exists only for environments that require one.

**Why did an advertiser return no ads?** The name must match the repository's own advertiser name. Run `mode=advertisers` with a fragment of the name, then paste the exact result into `advertiserNames`. The run status also lists suggestions when an exact name returns nothing.

**Why are there fewer rows than I expected?** The repository has no total count and pages in 24-row blocks. `maxItems` and `maxPages` stop the walk; per-market and per-source streams are interleaved, and deduplication removes repeats. Raise both or narrow to one market and one source for a complete read of that slice.

**How do I monitor new competitor ads?** Set `onlyNewAds=true` and keep `monitorStoreName` the same across scheduled runs. Only ads not delivered before are emitted, each with `changeType=NEW`.

**Can I fetch an ad I saw on the site?** Yes. Paste the pin id, the third-party ad id or the full `ads.pinterest.com/ads-repository/...` link into `adIds`.

**Why is `videoUrl` sometimes missing?** The raw video link in the ad detail is often hotlink-blocked. The actor uses the public Pin record's MP4/HLS variants, which are accessible. Deleted pins have no Pin record, so they have no video.

# Actor input Schema

## `mode` (type: `string`):

`ads` extracts ad rows. `advertisers` resolves a partial advertiser name to the exact names the repository uses, so you can copy one into `advertiserNames`.

## `adSource` (type: `string`):

`all` alternates Pinterest promoted Pins and third-party partner ads. Third-party ads have no Pinterest pin, so they carry an `adId` and a link to the partner's transparency page instead of a pinner, saves or comments.

## `countries` (type: `array`):

Repository markets: the 27 EU member states plus Norway, Turkey and Brazil. Every selected country is queried separately; an ad shown in several selected countries is delivered once and lists all its disclosed countries.

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

First day the ad was shown, `YYYY-MM-DD`. Leave blank for seven days before today. The repository retains about twelve months and currently starts on 2025-11-14.

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

Last day the ad was shown, `YYYY-MM-DD`. Leave blank for today. Long ranges are split into 32-day windows for promoted Pins and 1-day windows for third-party ads, then deduplicated.

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

Repository ad category, applied to promoted Pins. Third-party ads are skipped when a category is selected because the repository does not return their category.

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

Gender targeting bucket, applied to promoted Pins. The repository returns only the three disclosed buckets; third-party ads have no disclosed gender.

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

Age targeting bucket, applied to promoted Pins. Third-party ads disclose no age bucket.

## `advertiserNames` (type: `array`):

Exact repository advertiser names such as `EtsyFR` or `Genesis Group AG`, one per line; matching is case-insensitive. Run `mode=advertisers` first if you only know part of a name. Empty means every advertiser.

## `advertiserSearch` (type: `string`):

Partial name to resolve in `advertisers` mode, for example `etsy` or `ikea`. The repository returns up to about 100 matching names. Leave blank to list the first names it holds.

## `adIds` (type: `array`):

Optional pin ids, third-party ad ids, or repository links such as `https://ads.pinterest.com/ads-repository/4610700951660680576/`. When non-empty, the actor fetches exactly these ads and ignores market, date, advertiser, category, gender and age filters.

## `searchTerms` (type: `array`):

Keep ads whose title, description, advertiser name, landing URL or domain, disclosed country, interest or hashtag contains any of these terms (case-insensitive). Empty disables the filter.

## `minReach` (type: `integer`):

Drop ads whose reach lower bound is below this number. The lower bound is the EU reach band when disclosed, otherwise the highest per-country band. 0 disables the filter.

## `maxDaysSinceLastShown` (type: `integer`):

Keep ads whose last shown date is at most N days before today. 3 keeps ads that are likely still running; 0 disables the filter. The repository's dates lag about two days.

## `maxAdsPerAdvertiser` (type: `integer`):

Cap rows per advertiser after filters. 0 means no cap.

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

Hard cap on dataset rows. Reading stops as soon as this many ads pass the filters.

## `includeAdDetails` (type: `boolean`):

Fetch each ad's detail record (the advertiser name, full targeting, reach bands, flight dates and moderation fields). Turning it off saves one request per ad but leaves third-party ads without dates or reach and promoted Pins without the official advertiser name.

## `includePinDetails` (type: `boolean`):

Fetch the public Pin record for each promoted Pin: advertiser account, landing link and domain, saves, comments, reactions, hashtags, story pages and the reliable MP4/HLS video variants. Pins deleted from Pinterest since the archive are reported and skipped without failing the run.

## `onlyNewAds` (type: `boolean`):

Remember the ads delivered under `monitorStoreName` and skip them on later runs. New rows carry `changeType=NEW`, `firstSeenAt`, `lastSeenAt` and `contentHash`.

## `monitorStoreName` (type: `string`):

Key-value store used by the only-new monitor. Give every scheduled run of the same watch the same name.

## `retries` (type: `integer`):

Extra attempts after rate limits (HTTP 429), over-capacity answers and transient errors, with exponential backoff.

## `requestDelayMs` (type: `integer`):

Minimum pause between two repository requests. The repository rate-limits bursts; 300 ms is a safe default.

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

Optional. The actor works without a proxy; use one only if your own environment requires it.

## `maxPages` (type: `integer`):

Safety budget for repository list pages across all markets and sources. 0 means no limit. Raise it for exhaustive scans of a large window; lower it to bound a heavily filtered run.

## Actor input object example

```json
{
  "mode": "ads",
  "adSource": "all",
  "countries": [
    "DE"
  ],
  "adCategory": "ALL",
  "gender": "ALL",
  "ageBucket": "ALL",
  "advertiserNames": [],
  "advertiserSearch": "",
  "adIds": [],
  "searchTerms": [],
  "minReach": 0,
  "maxDaysSinceLastShown": 0,
  "maxAdsPerAdvertiser": 0,
  "maxItems": 3,
  "includeAdDetails": true,
  "includePinDetails": true,
  "onlyNewAds": false,
  "monitorStoreName": "pinterest-ads-repository-monitor",
  "retries": 5,
  "requestDelayMs": 800,
  "proxyConfiguration": {
    "useApifyProxy": false
  },
  "maxPages": 50
}
```

# Actor output Schema

## `items` (type: `string`):

Every collected row. Ads carry recordType=ad; advertiser name suggestions carry recordType=advertiserSuggestion.

# 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 = {
    "mode": "ads",
    "adSource": "all",
    "countries": [
        "DE"
    ],
    "adCategory": "ALL",
    "gender": "ALL",
    "ageBucket": "ALL",
    "advertiserNames": [],
    "advertiserSearch": "",
    "adIds": [],
    "searchTerms": [],
    "minReach": 0,
    "maxDaysSinceLastShown": 0,
    "maxAdsPerAdvertiser": 0,
    "maxItems": 3,
    "includeAdDetails": true,
    "includePinDetails": true,
    "onlyNewAds": false,
    "monitorStoreName": "pinterest-ads-repository-monitor",
    "retries": 5,
    "requestDelayMs": 800,
    "proxyConfiguration": {
        "useApifyProxy": false
    },
    "maxPages": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("xyrelith-data/pinterest-ads-repository").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 = {
    "mode": "ads",
    "adSource": "all",
    "countries": ["DE"],
    "adCategory": "ALL",
    "gender": "ALL",
    "ageBucket": "ALL",
    "advertiserNames": [],
    "advertiserSearch": "",
    "adIds": [],
    "searchTerms": [],
    "minReach": 0,
    "maxDaysSinceLastShown": 0,
    "maxAdsPerAdvertiser": 0,
    "maxItems": 3,
    "includeAdDetails": True,
    "includePinDetails": True,
    "onlyNewAds": False,
    "monitorStoreName": "pinterest-ads-repository-monitor",
    "retries": 5,
    "requestDelayMs": 800,
    "proxyConfiguration": { "useApifyProxy": False },
    "maxPages": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("xyrelith-data/pinterest-ads-repository").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 '{
  "mode": "ads",
  "adSource": "all",
  "countries": [
    "DE"
  ],
  "adCategory": "ALL",
  "gender": "ALL",
  "ageBucket": "ALL",
  "advertiserNames": [],
  "advertiserSearch": "",
  "adIds": [],
  "searchTerms": [],
  "minReach": 0,
  "maxDaysSinceLastShown": 0,
  "maxAdsPerAdvertiser": 0,
  "maxItems": 3,
  "includeAdDetails": true,
  "includePinDetails": true,
  "onlyNewAds": false,
  "monitorStoreName": "pinterest-ads-repository-monitor",
  "retries": 5,
  "requestDelayMs": 800,
  "proxyConfiguration": {
    "useApifyProxy": false
  },
  "maxPages": 50
}' |
apify call xyrelith-data/pinterest-ads-repository --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,xyrelith-data/pinterest-ads-repository"
        }
    }
}
```

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/jfPu2cZZTbpClAyDA/builds/wqm5RusmQ8kYHqorz/openapi.json
