{
  "openapi": "3.0.1",
  "info": {
    "title": "Pinterest Ads Repository Exporter (EU DSA)",
    "description": "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.",
    "version": "1.0",
    "x-build-id": "wqm5RusmQ8kYHqorz"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/xyrelith-data~pinterest-ads-repository/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-xyrelith-data-pinterest-ads-repository",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/xyrelith-data~pinterest-ads-repository/runs": {
      "post": {
        "operationId": "runs-sync-xyrelith-data-pinterest-ads-repository",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/xyrelith-data~pinterest-ads-repository/run-sync": {
      "post": {
        "operationId": "run-sync-xyrelith-data-pinterest-ads-repository",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "ads",
              "advertisers"
            ],
            "type": "string",
            "description": "`ads` extracts ad rows. `advertisers` resolves a partial advertiser name to the exact names the repository uses, so you can copy one into `advertiserNames`.",
            "default": "ads"
          },
          "adSource": {
            "title": "Ad source",
            "enum": [
              "all",
              "pinterest",
              "thirdParty"
            ],
            "type": "string",
            "description": "`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.",
            "default": "all"
          },
          "countries": {
            "title": "Markets",
            "type": "array",
            "description": "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.",
            "items": {
              "type": "string",
              "enum": [
                "AT",
                "BE",
                "BG",
                "BR",
                "HR",
                "CY",
                "CZ",
                "DK",
                "EE",
                "FI",
                "FR",
                "DE",
                "GR",
                "HU",
                "IE",
                "IT",
                "LV",
                "LT",
                "LU",
                "MT",
                "NL",
                "NO",
                "PL",
                "PT",
                "RO",
                "SK",
                "SI",
                "ES",
                "SE",
                "TR"
              ],
              "enumTitles": [
                "Austria",
                "Belgium",
                "Bulgaria",
                "Brazil",
                "Croatia",
                "Cyprus",
                "Czech Republic",
                "Denmark",
                "Estonia",
                "Finland",
                "France",
                "Germany",
                "Greece",
                "Hungary",
                "Ireland",
                "Italy",
                "Latvia",
                "Lithuania",
                "Luxembourg",
                "Malta",
                "Netherlands",
                "Norway",
                "Poland",
                "Portugal",
                "Romania",
                "Slovakia",
                "Slovenia",
                "Spain",
                "Sweden",
                "Turkey"
              ]
            },
            "default": [
              "DE"
            ]
          },
          "startDate": {
            "title": "Start date (inclusive)",
            "type": "string",
            "description": "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": {
            "title": "End date (inclusive)",
            "type": "string",
            "description": "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": {
            "title": "Ad category",
            "enum": [
              "ALL",
              "ANIMALS",
              "ARCHITECTURE",
              "ART",
              "BEAUTY",
              "CHILDRENS_FASHION",
              "DESIGN",
              "DIY_AND_CRAFTS",
              "EDUCATION",
              "ELECTRONICS",
              "ENTERTAINMENT",
              "EVENT_PLANNING",
              "FINANCE",
              "FOOD_AND_DRINKS",
              "HEALTH",
              "HOME_DECOR",
              "GARDENING",
              "MENS_FASHION",
              "PARENTING",
              "QUOTES",
              "SPORT",
              "TRAVEL",
              "VEHICLES",
              "WEDDING",
              "WOMENS_FASHION",
              "OTHER"
            ],
            "type": "string",
            "description": "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.",
            "default": "ALL"
          },
          "gender": {
            "title": "Gender",
            "enum": [
              "ALL",
              "FEMALE",
              "MALE",
              "UNSPECIFIED"
            ],
            "type": "string",
            "description": "Gender targeting bucket, applied to promoted Pins. The repository returns only the three disclosed buckets; third-party ads have no disclosed gender.",
            "default": "ALL"
          },
          "ageBucket": {
            "title": "Age bucket",
            "enum": [
              "ALL",
              "AGE_18_24",
              "AGE_25_34",
              "AGE_35_44",
              "AGE_45_49",
              "AGE_50_54",
              "AGE_55_64",
              "AGE_65_PLUS"
            ],
            "type": "string",
            "description": "Age targeting bucket, applied to promoted Pins. Third-party ads disclose no age bucket.",
            "default": "ALL"
          },
          "advertiserNames": {
            "title": "Advertiser names (exact)",
            "type": "array",
            "description": "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.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "advertiserSearch": {
            "title": "Advertiser name fragment (advertisers mode)",
            "type": "string",
            "description": "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.",
            "default": ""
          },
          "adIds": {
            "title": "Specific ad ids or links",
            "type": "array",
            "description": "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.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "searchTerms": {
            "title": "Keyword filter",
            "type": "array",
            "description": "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.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "minReach": {
            "title": "Minimum reach",
            "minimum": 0,
            "maximum": 1000000000000,
            "type": "integer",
            "description": "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.",
            "default": 0
          },
          "maxDaysSinceLastShown": {
            "title": "Shown within the last N days",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "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.",
            "default": 0
          },
          "maxAdsPerAdvertiser": {
            "title": "Maximum ads per advertiser",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Cap rows per advertiser after filters. 0 means no cap.",
            "default": 0
          },
          "maxItems": {
            "title": "Maximum ads",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Hard cap on dataset rows. Reading stops as soon as this many ads pass the filters.",
            "default": 100
          },
          "includeAdDetails": {
            "title": "Fetch ad details",
            "type": "boolean",
            "description": "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.",
            "default": true
          },
          "includePinDetails": {
            "title": "Fetch pin details",
            "type": "boolean",
            "description": "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.",
            "default": true
          },
          "onlyNewAds": {
            "title": "Only new ads (monitor)",
            "type": "boolean",
            "description": "Remember the ads delivered under `monitorStoreName` and skip them on later runs. New rows carry `changeType=NEW`, `firstSeenAt`, `lastSeenAt` and `contentHash`.",
            "default": false
          },
          "monitorStoreName": {
            "title": "Monitor store name",
            "type": "string",
            "description": "Key-value store used by the only-new monitor. Give every scheduled run of the same watch the same name.",
            "default": "pinterest-ads-repository-monitor"
          },
          "retries": {
            "title": "Retries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Extra attempts after rate limits (HTTP 429), over-capacity answers and transient errors, with exponential backoff.",
            "default": 5
          },
          "requestDelayMs": {
            "title": "Delay between requests (ms)",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Minimum pause between two repository requests. The repository rate-limits bursts; 300 ms is a safe default.",
            "default": 800
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. The actor works without a proxy; use one only if your own environment requires it.",
            "default": {
              "useApifyProxy": false
            }
          },
          "maxPages": {
            "title": "Maximum list pages",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "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.",
            "default": 50
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}