{
  "openapi": "3.0.1",
  "info": {
    "title": "Apple Ads Library Scraper: App Store Ad Repository",
    "description": "Scrape the Apple Ads Library, Apple's EU App Store ad repository, by App Store link, app or developer id, name or country. Every page read to the end: app, developer, legal name, placement, format, dates shown, targeting flags, screenshots. Misses are free rows. JSON, CSV, API.",
    "version": "0.1",
    "x-build-id": "4MD693GGoc3816Z6B"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automation_craft~apple-ads-library-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automation_craft-apple-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~apple-ads-library-scraper/runs": {
      "post": {
        "operationId": "runs-sync-automation_craft-apple-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~apple-ads-library-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-automation_craft-apple-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": {
          "searchTerms": {
            "title": "App or developer names",
            "type": "array",
            "description": "One name per line, for example Temu or Booking.com. Each name goes through Apple's own name search, which matches names from their first letter. By default only an app or developer named exactly like your text is used (capitals and spaces aside); when none or several are named so, you get a free row listing the candidates with their ids instead. An App Store link pasted here is read as that app or developer. At least 2 characters, up to 100 names per run; each name search draws on the run's work allowance, so a long list of names whose apps advertise little (a few ads each in your scope) can end early, with a free row naming the names not started.",
            "items": {
              "type": "string"
            }
          },
          "apps": {
            "title": "App Store apps (links or app ids)",
            "type": "array",
            "description": "One per line: an App Store app link (https://apps.apple.com/de/app/temu-shop-like-a-billionaire/id1641486558) or an app id (1641486558 or id1641486558). Every ad of the app in your countries and period is returned. A developer link pasted here is read as that developer. Up to 1,000 per run.",
            "items": {
              "type": "string"
            }
          },
          "developers": {
            "title": "App Store developers (links or developer ids)",
            "type": "array",
            "description": "One per line: an App Store developer link (https://apps.apple.com/us/developer/temu/id1641486560) or a developer id (1641486560). Every ad of every app of that developer is returned. An app link pasted here is read as that app. Up to 1,000 per run.",
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Keep ads shown in these countries. Leave empty for all 25. Through the API send ISO codes (DE, FR, IT, ...) or country names (Germany).",
            "items": {
              "type": "string",
              "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"
              ],
              "enumSuggestedValues": [
                "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"
              ]
            }
          },
          "period": {
            "title": "Period",
            "enum": [
              "LAST_90_DAYS",
              "LAST_180_DAYS",
              "LAST_YEAR"
            ],
            "type": "string",
            "description": "Apple's reporting window: ads that ran on at least one day of the last 90 days, 180 days or year up to Apple's latest day. When left out, the shortest period that holds your dates is used (90 days without dates)."
          },
          "startDate": {
            "title": "Shown since",
            "type": "string",
            "description": "Keep ads that ran on this day or later: YYYY-MM-DD, today, yesterday, or a number of days or weeks back from today such as 30 days. Applied to each ad's last day shown."
          },
          "endDate": {
            "title": "Shown until",
            "type": "string",
            "description": "Keep ads that started on this day or earlier: YYYY-MM-DD, today, yesterday or a number of days back. Applied to each ad's first day shown. Open ended when left out."
          },
          "placements": {
            "title": "Placements",
            "type": "array",
            "description": "Keep ads in these App Store placements. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "searchResults",
                "searchTab",
                "todayTab",
                "productPage"
              ],
              "enumTitles": [
                "Search results",
                "Search tab",
                "Today tab",
                "Product page"
              ]
            }
          },
          "formats": {
            "title": "Ad formats",
            "type": "array",
            "description": "Keep ads of these formats. Leave empty for both.",
            "items": {
              "type": "string",
              "enum": [
                "iconAd",
                "iconAssetAd"
              ],
              "enumTitles": [
                "Icon ad (icon and text only)",
                "Icon + asset ad (with screenshots or a video)"
              ]
            }
          },
          "nameMatch": {
            "title": "Name matching",
            "enum": [
              "exact",
              "startsWith"
            ],
            "type": "string",
            "description": "exact (when left out): only the app or developer named exactly like your text. startsWith: every app and developer whose name begins with your words as whole words (Temu gives the developer Temu and the app Temu: Shop Like a Billionaire, but not the developer Temurbek Rakhimov)."
          },
          "nameTypes": {
            "title": "Names of",
            "enum": [
              "all",
              "apps",
              "developers"
            ],
            "type": "string",
            "description": "Look names up among apps and developers (when left out), apps only, or developers only."
          },
          "includeVariations": {
            "title": "Add variations (language versions and icons)",
            "type": "boolean",
            "description": "Read each delivered ad's variations with one extra call per ad: every language version of the ad (app name, subtitle, category, promotional text and, where Apple has them, per device screenshots) and its icon variations. Charged as one Ad variation set per ad only when Apple answered. Apple's variations call is slow (4 to 33 seconds) and fails now and then: a failed call leaves the ad without variations and costs nothing extra, and after about 35 seconds of failed calls in a run (plus 15 seconds for every set charged) no more variations are asked while the ads are still delivered. Off when left out."
          },
          "maxAds": {
            "title": "Max ads",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Stop after this many ads in total. 1,000 when left out, up to 1,000,000. Germany alone holds about 175,000 ads over 90 days."
          },
          "maxAdsPerTarget": {
            "title": "Max ads per app, developer or country",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Stop each app, developer or browsed country after this many ads. 0 or left out: no cap per target (the total cap still applies)."
          },
          "memoryName": {
            "title": "Memory name (new ads only)",
            "type": "string",
            "description": "A short plain name such as temu-watch (letters, digits, spaces and . _ , : # ( ) -). The memory belongs to this Actor; two runs on one name at the same time are not supported (the second one delivers its rows free and remembers nothing)."
          },
          "resetMemory": {
            "title": "Reset the memory",
            "type": "boolean",
            "description": "Forget every ad the memory knows before this run starts, so every ad counts as new again. Needs a memory name. Off when left out."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}