{
  "openapi": "3.0.1",
  "info": {
    "title": "Apple Search Ads API: App Store Keyword Rankings and Ad Intel",
    "description": "Apple Search Ads API and App Store keyword rank tracker: daily keyword rankings and 30 day history, top and organic keywords, search volume, top charts, category ranks, ad creatives, top advertisers and Search Ads paid keywords and paying apps (MobileAction). Bring your own key.",
    "version": "0.1",
    "x-build-id": "aDedDQKFZays9Q9DS"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~apple-search-ads-keyword-intelligence-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-apple-search-ads-keyword-intelligence-api",
        "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/nabeelbaghoor~apple-search-ads-keyword-intelligence-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-apple-search-ads-keyword-intelligence-api",
        "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/nabeelbaghoor~apple-search-ads-keyword-intelligence-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-apple-search-ads-keyword-intelligence-api",
        "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": {
          "mode": {
            "title": "What to read",
            "enum": [
              "keywordRankings",
              "keywordHistory",
              "topKeywords",
              "organicKeywords",
              "keywordMetadata",
              "keywordApps",
              "impressionShare",
              "topCharts",
              "categoryRankings",
              "adCreatives",
              "topAdvertisers",
              "adDistribution",
              "searchAdsPaidKeywords",
              "searchAdsPayingApps"
            ],
            "type": "string",
            "description": "Each mode calls one documented read endpoint of the MobileAction API with your own API key. Every request spends MobileAction credits from your plan (shown in brackets). Nothing in your MobileAction workspace is ever added, changed or deleted.",
            "default": "keywordRankings"
          },
          "apiKey": {
            "title": "MobileAction API key",
            "type": "string",
            "description": "Your own MobileAction API key. API access is an enterprise feature: MobileAction issues keys through its sales and support team. Sent only as the token parameter to api.mobileaction.co and removed from every log line. Leave empty to use the DATA_API_KEY secret."
          },
          "trackIds": {
            "title": "App IDs",
            "type": "array",
            "description": "One app per line. App Store track ID (the number after id in an apps.apple.com link, such as 284882215 for Facebook) or a full App Store link. Ad creatives and ad distribution also take Google Play package names such as com.facebook.katana. Used by keyword rankings, history, top and organic keywords, category ranking, ad creatives, ad distribution and Search Ads paid keywords.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "One search keyword per line, such as ticket or photo editor. Keyword rankings send up to 100 per request; history, metadata, app lists, impression share and Search Ads paying apps make one request per keyword.",
            "items": {
              "type": "string"
            }
          },
          "countryCode": {
            "title": "Country",
            "enum": [
              "US",
              "GB",
              "CA",
              "AU",
              "NZ",
              "IE",
              "DE",
              "FR",
              "IT",
              "ES",
              "PT",
              "NL",
              "BE",
              "AT",
              "CH",
              "SE",
              "NO",
              "DK",
              "FI",
              "PL",
              "CZ",
              "HU",
              "RO",
              "GR",
              "TR",
              "RU",
              "UA",
              "IL",
              "AE",
              "SA",
              "EG",
              "ZA",
              "NG",
              "IN",
              "PK",
              "ID",
              "MY",
              "SG",
              "TH",
              "VN",
              "PH",
              "JP",
              "KR",
              "CN",
              "TW",
              "HK",
              "BR",
              "MX",
              "AR",
              "CL",
              "CO",
              "PE"
            ],
            "type": "string",
            "description": "The App Store storefront for keyword, chart and Search Ads modes.",
            "default": "US"
          },
          "device": {
            "title": "Device",
            "enum": [
              "IPHONE",
              "IPAD"
            ],
            "type": "string",
            "description": "Top keywords, organic keywords, organic impression share and top charts.",
            "default": "IPHONE"
          },
          "date": {
            "title": "Date",
            "type": "string",
            "description": "YYYY-MM-DD. Keyword rankings, top keywords, organic keywords and top charts. Leave empty for yesterday."
          },
          "startDate": {
            "title": "Start date",
            "type": "string",
            "description": "YYYY-MM-DD. Keyword history, category ranking and ad intelligence allow up to 30 days a request; Search Ads modes up to 14 days. Leave empty for 7 days before the end date."
          },
          "endDate": {
            "title": "End date",
            "type": "string",
            "description": "YYYY-MM-DD, inclusive (exclusive for category ranking, as documented). Leave empty for yesterday."
          },
          "topKeywordsLimit": {
            "title": "Top keywords per app",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Top keywords. How many keywords the API returns per app; the documented default is 100.",
            "default": 100
          },
          "categoryId": {
            "title": "Category",
            "enum": [
              "36",
              "6000",
              "6001",
              "6002",
              "6003",
              "6004",
              "6005",
              "6006",
              "6007",
              "6008",
              "6009",
              "6010",
              "6011",
              "6012",
              "6013",
              "6014",
              "7001",
              "7002",
              "7003",
              "7004",
              "7005",
              "7006",
              "7007",
              "7008",
              "7009",
              "7010",
              "7011",
              "7012",
              "7013",
              "7014",
              "7015",
              "7016",
              "7017",
              "7018",
              "7019",
              "6015",
              "6016",
              "6017",
              "6018",
              "6020",
              "6021",
              "6022",
              "6023",
              "6024",
              "6025",
              "6026",
              "6027"
            ],
            "type": "string",
            "description": "Top charts. App Store category, from the documentation's App Store Categories table.",
            "default": "36"
          },
          "rankingType": {
            "title": "Chart",
            "enum": [
              "FREE",
              "PAID",
              "GROSSING"
            ],
            "type": "string",
            "description": "Top charts.",
            "default": "FREE"
          },
          "chartVersion": {
            "title": "Chart version",
            "enum": [
              "v1",
              "v2"
            ],
            "type": "string",
            "description": "Top charts and category ranking. v1 is the iOS 11 and earlier chart with every category; v2 is the iOS 12 and later chart, overall category only.",
            "default": "v1"
          },
          "hourly": {
            "title": "Hourly ranks",
            "type": "boolean",
            "description": "Category ranking. On returns the exact ranks as recorded; off returns daily average ranks.",
            "default": false
          },
          "adCountry": {
            "title": "Ad country",
            "enum": [
              "any",
              "US",
              "GB",
              "CA",
              "AU",
              "NZ",
              "IE",
              "DE",
              "FR",
              "IT",
              "ES",
              "PT",
              "NL",
              "BE",
              "AT",
              "CH",
              "SE",
              "NO",
              "DK",
              "FI",
              "PL",
              "CZ",
              "HU",
              "RO",
              "GR",
              "TR",
              "RU",
              "UA",
              "IL",
              "AE",
              "SA",
              "EG",
              "ZA",
              "NG",
              "IN",
              "PK",
              "ID",
              "MY",
              "SG",
              "TH",
              "VN",
              "PH",
              "JP",
              "KR",
              "CN",
              "TW",
              "HK",
              "BR",
              "MX",
              "AR",
              "CL",
              "CO",
              "PE"
            ],
            "type": "string",
            "description": "Ad creatives, top advertisers and ad distribution. Only ads seen in this country.",
            "default": "any"
          },
          "adNetwork": {
            "title": "Ad network",
            "type": "string",
            "description": "Ad creatives and top advertisers. Only ads on this network, by name, such as facebook, admob, unity, applovin or tiktok."
          },
          "platformId": {
            "title": "Store",
            "enum": [
              "any",
              "1",
              "2"
            ],
            "type": "string",
            "description": "Top advertisers.",
            "default": "any"
          },
          "distribution": {
            "title": "Split ads by",
            "enum": [
              "network",
              "country",
              "language"
            ],
            "type": "string",
            "description": "Ad distribution.",
            "default": "network"
          },
          "adMediaType": {
            "title": "Count by",
            "enum": [
              "any",
              "1",
              "2"
            ],
            "type": "string",
            "description": "Ad distribution by network or country. The language split takes no media type.",
            "default": "any"
          },
          "maxPages": {
            "title": "Pages per lookup",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Ad creatives and top advertisers. Each page holds up to 50 rows and costs 200 (creatives) or 150 (advertisers) MobileAction credits. Reading stops early at the last page.",
            "default": 1
          },
          "maxResults": {
            "title": "Maximum rows",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "The run stops after this many rows.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}