{
  "openapi": "3.0.1",
  "info": {
    "title": "Apple Ad Repository Scraper — EU App Store Ads & Restrictions",
    "description": "Query Apple's public EU DSA Ad Repository by app or developer name, App Store ID or URL, or whole country. Get ads with placement, dates, targeting, banner copy, creatives and locale variations, plus restriction/advertiser rows. No login or proxy.",
    "version": "1.0",
    "x-build-id": "dIcIB0cQ3sI1brng3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/xyrelith-data~apple-ad-repository/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-xyrelith-data-apple-ad-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~apple-ad-repository/runs": {
      "post": {
        "operationId": "runs-sync-xyrelith-data-apple-ad-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~apple-ad-repository/run-sync": {
      "post": {
        "operationId": "run-sync-xyrelith-data-apple-ad-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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "entities",
              "appIds",
              "developerIds",
              "appUrls",
              "adIds",
              "countrySweep",
              "restrictions"
            ],
            "type": "string",
            "description": "What to fetch: name search, advertiser/entity rows, exact app or developer IDs, App Store URLs, exact ad IDs, a country-wide sweep, or Apple's advertising-restrictions feed.",
            "default": "search"
          },
          "searchTerms": {
            "title": "App or developer names",
            "type": "array",
            "description": "Names resolved through Apple's own entity lookup (minimum 2 characters). Used by mode=search and mode=entities. Each term can resolve to several apps and developers.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "entityTypes": {
            "title": "Entity types",
            "type": "array",
            "description": "Only resolve apps, only developers, or both. Used by mode=search and mode=entities.",
            "items": {
              "type": "string",
              "enum": [
                "APP",
                "DEVELOPER"
              ],
              "enumTitles": [
                "Apps",
                "Developers"
              ]
            },
            "default": [
              "APP",
              "DEVELOPER"
            ]
          },
          "exactNameMatch": {
            "title": "Require exact entity name",
            "type": "boolean",
            "description": "Only accept an app or developer whose name is identical to the search term (case and outer spaces ignored). Useful when similar names collide.",
            "default": false
          },
          "appIds": {
            "title": "App Store app IDs",
            "type": "array",
            "description": "Numeric App Store app IDs (for example 1641486558) or bare `id1641486558` values. Used by mode=appIds.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "developerIds": {
            "title": "App Store developer IDs",
            "type": "array",
            "description": "Numeric App Store developer IDs. Every ad of every app of the developer is returned. Used by mode=developerIds.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "appUrls": {
            "title": "App Store URLs",
            "type": "array",
            "description": "App Store app or developer URLs, or bare numeric IDs. App IDs, developer URLs and Ad Repository detail URLs are auto-detected. Used by mode=appUrls.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "adIds": {
            "title": "Ad Repository ad IDs",
            "type": "array",
            "description": "Exact Ad Repository ad IDs or detail URLs (adrepository.apple.com/ad-repository-ads/...). Used by mode=adIds and also accepted by mode=appUrls.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxEntities": {
            "title": "Max resolved entities",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Cap on apps plus developers resolved from the name lookup across all search terms.",
            "default": 10
          },
          "countries": {
            "title": "Countries or regions",
            "type": "array",
            "description": "Apple's 25 EU ad markets. Empty = all countries (one all-country query for ID/name modes, one query per country for countrySweep). Lists longer than five are chunked automatically because Apple accepts at most five per request.",
            "items": {
              "type": "string",
              "enum": [
                "AT",
                "BE",
                "BG",
                "HR",
                "CY",
                "CZ",
                "DK",
                "EE",
                "FI",
                "FR",
                "DE",
                "GR",
                "HU",
                "IE",
                "IT",
                "LV",
                "LU",
                "NL",
                "PL",
                "PT",
                "RO",
                "SK",
                "SI",
                "ES",
                "SE"
              ],
              "enumTitles": [
                "Austria",
                "Belgium",
                "Bulgaria",
                "Croatia",
                "Cyprus",
                "Czech Republic",
                "Denmark",
                "Estonia",
                "Finland",
                "France",
                "Germany",
                "Greece",
                "Hungary",
                "Ireland",
                "Italy",
                "Latvia",
                "Luxembourg",
                "Netherlands",
                "Poland",
                "Portugal",
                "Romania",
                "Slovakia",
                "Slovenia",
                "Spain",
                "Sweden"
              ]
            },
            "default": []
          },
          "datePreset": {
            "title": "Impression window",
            "enum": [
              "LAST_90_DAYS",
              "LAST_180_DAYS",
              "LAST_YEAR"
            ],
            "type": "string",
            "description": "Apple reports ads with impressions inside this window. Data is delayed by seven days.",
            "default": "LAST_90_DAYS"
          },
          "placements": {
            "title": "Placements",
            "type": "array",
            "description": "Keep only ads or restrictions in these App Store placements. Apple has no placement selector on this API, so the actor filters the rows it reads. Empty = all placements.",
            "items": {
              "type": "string",
              "enum": [
                "APPSTORE_SEARCH_RESULTS",
                "APPSTORE_SEARCH_TAB",
                "APPSTORE_TODAY_TAB",
                "APPSTORE_PRODUCT_PAGE"
              ],
              "enumTitles": [
                "Search Results",
                "Search Tab",
                "Today Tab",
                "Product Page"
              ]
            },
            "default": []
          },
          "formats": {
            "title": "Ad formats",
            "type": "array",
            "description": "Keep only ads in these formats (client-side). Empty = all formats.",
            "items": {
              "type": "string",
              "enum": [
                "Icon Ad",
                "Icon + Asset Ad"
              ],
              "enumTitles": [
                "Icon Ad",
                "Icon + Asset Ad"
              ]
            },
            "default": []
          },
          "restrictionActions": {
            "title": "Restriction actions",
            "type": "array",
            "description": "Which restriction events to read in mode=restrictions. Apple requires one action per request, so the actor queries each selected value. Empty = both.",
            "items": {
              "type": "string",
              "enum": [
                "ACTION_ADVERTISING_REMOVED",
                "ACTION_ACCOUNT_SUSPENDED"
              ],
              "enumTitles": [
                "Advertising removed",
                "Account suspended"
              ]
            },
            "default": [
              "ACTION_ADVERTISING_REMOVED",
              "ACTION_ACCOUNT_SUSPENDED"
            ]
          },
          "maxItems": {
            "title": "Max primary rows",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Cap on emitted ads (ad modes), restrictions (restrictions mode) or entities (entities mode). Locale-variation rows and search-mode entity rows are additional.",
            "default": 100
          },
          "maxPagesPerQuery": {
            "title": "Max pages per query",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Pagination guard for each ad query (100 ads per page). Raise it for deep sweeps and complete advertiser histories; lower it to bound requests.",
            "default": 100
          },
          "expandVariations": {
            "title": "Expand locale and device variations",
            "type": "boolean",
            "description": "Fetch each ad's detail endpoint (one extra request per ad) and emit one flat row per locale variation and device asset, including localized names, subtitles, categories, promotional text and per-device creatives.",
            "default": false
          },
          "includeEntities": {
            "title": "Include resolved entity rows in search",
            "type": "boolean",
            "description": "In mode=search, also emit one entity row per resolved app or developer before its ads. Ignored by other modes.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}