{
  "openapi": "3.0.1",
  "info": {
    "title": "Pinterest Ads Library Scraper - EU Ads Repository",
    "description": "Scrape Pinterest's public EU Ads Repository: promoted Pins by country, advertiser, dates, category, gender and age, with the advertiser name and landing link on each ad, reach bands, targeting and moderation status. 30 countries, 12 months, many advertisers per run, new ads only memory. Pay per ad.",
    "version": "0.1",
    "x-build-id": "iPavJhb6N5jeJhQJW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automation_craft~pinterest-ads-library-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automation_craft-pinterest-ads-library-scraper",
        "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/automation_craft~pinterest-ads-library-scraper/runs": {
      "post": {
        "operationId": "runs-sync-automation_craft-pinterest-ads-library-scraper",
        "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/automation_craft~pinterest-ads-library-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-automation_craft-pinterest-ads-library-scraper",
        "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": {
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Repository countries to search. ALL searches all 30 in one run. Country names such as Germany are accepted too. Each country is searched on its own; an ad found in several is delivered and charged once. Norway is read one day at a time (the repository answers a server error for longer Norwegian windows), so a Norwegian week is seven searches.",
            "items": {
              "type": "string",
              "enum": [
                "ALL",
                "AT",
                "BE",
                "BR",
                "BG",
                "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": [
                "All 30 countries",
                "Austria",
                "Belgium",
                "Brazil",
                "Bulgaria",
                "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"
              ]
            }
          },
          "startDate": {
            "title": "Start date",
            "type": "string",
            "description": "First day of the window, YYYY-MM-DD, or a number of days back from the end date such as 30 days. Default: 6 days before the end date (a 7 day window). An ad is returned when its run overlaps the window. Windows longer than 31 days are cut into 31 day slices automatically, newest first; the repository keeps 12 months."
          },
          "endDate": {
            "title": "End date",
            "type": "string",
            "description": "Last day of the window, YYYY-MM-DD, today or yesterday. Default: today."
          },
          "advertiserNames": {
            "title": "Advertiser names",
            "type": "array",
            "description": "One advertiser per line. With exact matching the name must equal a repository advertiser name (an unknown name costs nothing and comes back as a free row with the names Pinterest suggests; a run may hit 10 unknown or unconfirmed names plus 3 per billed search, then skips the rest in one free row; a name the lookup cannot confirm gets one probing search, at most 5 per run). With contains matching every advertiser whose name contains the text is searched (ikea gives IKEA Deutschland, IKEA France and the rest).",
            "items": {
              "type": "string"
            }
          },
          "advertiserNameMatch": {
            "title": "Advertiser name matching",
            "enum": [
              "exact",
              "contains"
            ],
            "type": "string",
            "description": "exact: the repository's own exact name filter. contains: expand each name (at most 10 per run) through Pinterest's advertiser lookup to every advertiser whose name contains it, then search each of them (the rows carry both the typed text and the resolved name)."
          },
          "adIds": {
            "title": "Ad ids or repository URLs",
            "type": "array",
            "description": "Look up specific ads: pin ids or repository URLs such as https://ads.pinterest.com/ads-repository/4594867985295070848/, one per line. An id the repository does not know costs nothing and comes back as a free row. Given on its own (no countries or advertisers), only these ads are fetched.",
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "Pinterest's ad categories (verticals). Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "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"
              ],
              "enumTitles": [
                "Animals",
                "Architecture",
                "Art",
                "Beauty",
                "Children's Fashion",
                "Design",
                "DIY and Crafts",
                "Education",
                "Electronics",
                "Entertainment",
                "Event Planning",
                "Finance",
                "Food and Drinks",
                "Health",
                "Home Decor",
                "Gardening",
                "Men's Fashion",
                "Parenting",
                "Quotes",
                "Sport",
                "Travel",
                "Vehicles",
                "Wedding",
                "Women's Fashion",
                "Other"
              ]
            }
          },
          "genders": {
            "title": "Gender targeting",
            "type": "array",
            "description": "Only ads targeted at these genders. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "FEMALE",
                "MALE",
                "UNSPECIFIED"
              ],
              "enumTitles": [
                "Female",
                "Male",
                "Unspecified"
              ]
            }
          },
          "ageBuckets": {
            "title": "Age targeting",
            "type": "array",
            "description": "Only ads targeted at these age groups. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "AGE_18_24",
                "AGE_25_34",
                "AGE_35_44",
                "AGE_45_49",
                "AGE_50_54",
                "AGE_55_64",
                "AGE_65_PLUS"
              ],
              "enumTitles": [
                "18-24",
                "25-34",
                "35-44",
                "45-49",
                "50-54",
                "55-64",
                "65+"
              ]
            }
          },
          "maxDaysSinceLastShown": {
            "title": "Last shown within N days",
            "minimum": 0,
            "maximum": 400,
            "type": "integer",
            "description": "Deliver only ads whose last shown day is at most this many days before today. The repository's dates run about two days behind the live state, so 3 keeps the ads still running and drops the ended ones. Ads without a last shown day (the third party ads) are left out when this is set. Leave empty for every ad of the window, running or ended."
          },
          "maxAds": {
            "title": "Maximum ads per run",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Most ads delivered (and charged) in one run, across all countries and advertisers. Default 100 when the field is left empty."
          },
          "maxPagesPerQuery": {
            "title": "Maximum pages per query",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "The repository lists 100 ads per page and never says how many a query has; large advertisers and unfiltered countries can run to thousands of pages. Each query (country x advertiser x filters x 31 day slice) stops after this many pages and its coverage row says so. Default 50 (5,000 rows)."
          },
          "includeAdvertiserName": {
            "title": "Advertiser name on every ad",
            "type": "boolean",
            "description": "Fetch the ad detail for every ad (the only place the repository names the advertiser). Off: faster and the rows carry no advertiser name."
          },
          "includeLandingLink": {
            "title": "Landing link on every ad",
            "type": "boolean",
            "description": "Fetch the pin for every ad: the landing URL and domain, the pinner account, the pin creation date. About 1 in 11 pins of a recent window (1 in 5 of older ads) has been deleted from Pinterest since; those rows say pin_deleted."
          },
          "includeThirdPartyAds": {
            "title": "Include third party ads",
            "type": "boolean",
            "description": "The repository also archives ads Pinterest serves for third party networks (title, image, advertiser, a numeric country code, no pin). They appear as rows with adSource third_party."
          },
          "includeAdvertiserAccount": {
            "title": "Advertiser's Pinterest account on every ad",
            "type": "boolean",
            "description": "Add the advertiser's Pinterest account to each ad: account name, username, profile URL, follower count, verified domain, board. Off by default: some advertisers are individual creators, so this is personal data. Needs the landing link switch on (both come from the pin)."
          },
          "memoryName": {
            "title": "Memory name (new ads only)",
            "type": "string",
            "description": "A plain name for this watch, for example temu-de-daily. Ads delivered under it in earlier runs are skipped free. Leave empty for no memory."
          },
          "resetMemory": {
            "title": "Reset the memory",
            "type": "boolean",
            "description": "Forget every ad remembered under the memory name before this run (every ad in the window counts as new again)."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional Apify proxy. Leave off for the container address."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}