{
  "openapi": "3.0.1",
  "info": {
    "title": "Pinterest Ads Scraper & Multi-Country Ad Coverage",
    "description": "📌 Pinterest Ads Scraper pulls ads at scale — creatives, titles, descriptions, advertiser, landing URLs, dates & metrics — straight from Pinterest. 📊 Ideal for competitor research, trend tracking & creative benchmarking. ⚙️ Export CSV/JSON, schedule runs, API-ready. 🚀",
    "version": "0.1",
    "x-build-id": "67QyqKD3KDhe9EPSz"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/api-empire~pinterest-ads-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-api-empire-pinterest-ads-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/api-empire~pinterest-ads-scraper/runs": {
      "post": {
        "operationId": "runs-sync-api-empire-pinterest-ads-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/api-empire~pinterest-ads-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-api-empire-pinterest-ads-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",
        "required": [
          "start_date",
          "end_date"
        ],
        "properties": {
          "start_date": {
            "title": "📅 Start Date",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
            "type": "string",
            "description": "First day of the period (YYYY-MM-DD), applied to every selected country. Pinterest's Ads Library has a real reporting delay - very recent windows frequently return 0 ads even for large advertisers. Default below is a window with confirmed live data.",
            "default": "2024-06-01"
          },
          "end_date": {
            "title": "📅 End Date",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
            "type": "string",
            "description": "Last day of the period (YYYY-MM-DD), applied to every selected country. Required.",
            "default": "2024-06-30"
          },
          "resultsLimit": {
            "title": "🔢 Results Limit Per Country",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of ads to fetch PER COUNTRY (1-10,000). With 3 countries selected and this set to 100, up to 300 ads total can be collected.",
            "default": 100
          },
          "countries": {
            "title": "🌍 Countries",
            "type": "array",
            "description": "Pick one or more markets to scan. When set, this overrides the legacy single Country field below. Only markets actually supported by Pinterest's Ads Library are listed (US and UK are not supported by Pinterest's own API and are intentionally excluded).",
            "items": {
              "type": "string",
              "enum": [
                "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": [
                "🇦🇹 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"
              ]
            }
          },
          "country": {
            "title": "🌍 Country (legacy single-market input)",
            "enum": [
              "",
              "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"
            ],
            "type": "string",
            "description": "Legacy single-country field kept for backward compatibility with the original single-country actor. Ignored whenever the Countries list above is non-empty. Accepts a country name (e.g. \"France\") or a 2-letter code. US and UK were dropped (Pinterest's Ads Library never supports them, confirmed via a live API error), Norway was added (a real supported market that was missing).",
            "default": ""
          },
          "proxyConfiguration": {
            "title": "🔒 Proxy (Optional)",
            "type": "object",
            "description": "Enable if you experience access issues. Most users can leave this disabled."
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}