{
  "openapi": "3.0.1",
  "info": {
    "title": "Apple App Store Ad Repository Scraper — Apple Ads Library (DSA)",
    "description": "Scrape Apple's App Store Ad Repository (EU, DSA): app and developer, seller legal name, country, placement, format, first/last impression, audience refinement, creatives, language variations and advertising restrictions.",
    "version": "0.1",
    "x-build-id": "0CkHum0VLol5tbn3O"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rastriq~apple-ad-repository-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rastriq-apple-ad-repository-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/rastriq~apple-ad-repository-scraper/runs": {
      "post": {
        "operationId": "runs-sync-rastriq-apple-ad-repository-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/rastriq~apple-ad-repository-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-rastriq-apple-ad-repository-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": {
          "developers": {
            "title": "🏢 Developers",
            "type": "array",
            "description": "Developer names as shown on the App Store, or developer ids (the number after <code>/developer/…/id</code>). Names are matched as whole words (<code>Temu</code> → <i>Temu</i>, not <i>Temurbek Rakhimov</i>).",
            "items": {
              "type": "string"
            }
          },
          "apps": {
            "title": "📱 Apps",
            "type": "array",
            "description": "App names or App Store app ids (the number in <code>apps.apple.com/app/id&lt;id&gt;</code>).",
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "🌍 Countries",
            "uniqueItems": true,
            "type": "array",
            "description": "EU countries where Apple delivers App Store ads. Empty = all 25.",
            "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",
                "🇨🇿 Czechia",
                "🇩🇰 Denmark",
                "🇪🇪 Estonia",
                "🇫🇮 Finland",
                "🇫🇷 France",
                "🇩🇪 Germany",
                "🇬🇷 Greece",
                "🇭🇺 Hungary",
                "🇮🇪 Ireland",
                "🇮🇹 Italy",
                "🇱🇻 Latvia",
                "🇱🇺 Luxembourg",
                "🇳🇱 Netherlands",
                "🇵🇱 Poland",
                "🇵🇹 Portugal",
                "🇷🇴 Romania",
                "🇸🇰 Slovakia",
                "🇸🇮 Slovenia",
                "🇪🇸 Spain",
                "🇸🇪 Sweden"
              ]
            }
          },
          "datePreset": {
            "title": "📅 Period",
            "enum": [
              "LAST_90_DAYS",
              "LAST_180_DAYS",
              "LAST_YEAR"
            ],
            "type": "string",
            "description": "Apple only offers these periods. Data is delayed by 7 days.",
            "default": "LAST_90_DAYS"
          },
          "maxItems": {
            "title": "💯 Max ads",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum ads in the dataset for the whole run. 0 = no limit.",
            "default": 1000
          },
          "discoveryPrefixes": {
            "title": "🔭 Discovery prefixes",
            "type": "array",
            "description": "Texts of 2+ characters. Every developer in the repository whose name contains one of them is scraped (e.g. <code>bank</code>, <code>games</code>). Each prefix can return hundreds of developers — combine with <b>Max ads</b>.",
            "items": {
              "type": "string"
            }
          },
          "browseCountries": {
            "title": "Browse whole countries",
            "type": "boolean",
            "description": "Also list <b>every</b> ad of the selected countries, without a developer (Spain alone has ~130,000 ads in 90 days). Combine with <b>Max ads</b>.",
            "default": false
          },
          "nameMatch": {
            "title": "Name match",
            "enum": [
              "word",
              "contains",
              "exact",
              "any"
            ],
            "type": "string",
            "description": "How names in <b>Developers</b>/<b>Apps</b> are matched against the repository.",
            "default": "word"
          },
          "outputFormat": {
            "title": "📄 Output format",
            "enum": [
              "flat",
              "nested"
            ],
            "type": "string",
            "description": "<b>Flat</b> (default): every value in its own column — lists become comma-separated text, reach per country becomes <code>reach_min_DE</code> / <code>reach_max_DE</code> columns, and art. 39 coverage becomes <code>art39_ratio</code> / <code>art39_missing</code>.<br><br><b>Nested</b>: keeps the source's original objects and lists (e.g. the full per-language variations or per-country breakdown) for programmatic use.",
            "default": "flat"
          },
          "fetchVariations": {
            "title": "🌐 Fetch language & device variations",
            "type": "boolean",
            "description": "Add every language and device variation of each ad (texts and screenshots per locale). One extra request per ad (~10 s each). Charged per ad with variations.",
            "default": false
          },
          "maxVariations": {
            "title": "Max ads with variations",
            "minimum": 0,
            "type": "integer",
            "description": "0 = all.",
            "default": 0
          },
          "restrictions": {
            "title": "🚫 Advertising restrictions",
            "enum": [
              "none",
              "removed",
              "suspended",
              "both"
            ],
            "type": "string",
            "description": "Add Apple's DSA moderation decisions of the period (action, reason, basis, details, placements, countries) as rows with <code>recordType: restriction</code>.",
            "default": "none"
          },
          "hashPersonalNames": {
            "title": "🔒 Pseudonymise personal names",
            "type": "boolean",
            "description": "Some developers are private individuals. Rows are always flagged <code>is_natural_person_suspected</code>; turn this on to replace those names with a stable SHA-256 pseudonym.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "🔒 Proxy",
            "type": "object",
            "description": "Not needed normally."
          },
          "intervalSec": {
            "title": "⏱️ Pause between requests",
            "minimum": 2,
            "maximum": 30,
            "type": "integer",
            "description": "Apple answers 429 to faster bursts.",
            "default": 4
          },
          "maxRetries": {
            "title": "Max retries",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Retries after 429/5xx with exponential backoff.",
            "default": 5
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}