{
  "openapi": "3.0.1",
  "info": {
    "title": "Apple App Store & Reviews Scraper (iOS Apps & Ratings)",
    "description": "Call Apple's public iTunes Lookup, Search, and Customer Reviews JSON APIs across global storefronts. Extracts iOS app profiles, ratings, release notes, and pre-filtered customer reviews without browsers or proxies.",
    "version": "1.0",
    "x-build-id": "0Ob0thqlnfQDX8FiC"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tsun_tsun~app-store-reviews-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tsun_tsun-app-store-reviews-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/tsun_tsun~app-store-reviews-scraper/runs": {
      "post": {
        "operationId": "runs-sync-tsun_tsun-app-store-reviews-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/tsun_tsun~app-store-reviews-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-tsun_tsun-app-store-reviews-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": {
          "appInputs": {
            "title": "App Store URLs, Track IDs, or Bundle IDs",
            "type": "array",
            "description": "Target iOS apps to look up and scrape. Accepts full App Store URLs (e.g. https://apps.apple.com/us/app/chatgpt/id6448311069), bare numeric track IDs (6448311069), id-prefixed IDs (id6448311069), or reverse-DNS bundle IDs (com.openai.chat). At least one of appInputs or searchTerms must be provided.",
            "items": {
              "type": "string"
            }
          },
          "searchTerms": {
            "title": "App Store Search Keywords",
            "type": "array",
            "description": "Keywords to search in the Apple App Store catalog (e.g. 'ai assistant', 'habit tracker', 'meditation'). Discovered apps are automatically deduplicated against appInputs. At least one of appInputs or searchTerms must be provided.",
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Apple Storefront Country Codes",
            "type": "array",
            "description": "Two-letter ISO 3166-1 alpha-2 Apple App Store storefront codes to fan out across (e.g. ['US'], ['US', 'GB', 'DE', 'JP']; 'UK' is automatically mapped to 'GB'). When omitted or empty, any storefront code in an appInputs URL (such as /jp/app/...) is used automatically before falling back to ['US'].",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "includeAppProfile": {
            "title": "Include App Profile Records",
            "type": "boolean",
            "description": "Emit a full app_profile metadata record (rating averages, rating count, price, version, developer, release notes, genres, screenshots) for each verified app per country (billed as app-analyzed).",
            "default": true
          },
          "includeReviews": {
            "title": "Include Customer Reviews",
            "type": "boolean",
            "description": "Fetch and emit individual customer review records from Apple's Customer Reviews RSS feed with automatic iTunes Storefront JSON fallback (billed as review-scraped). Disable if you only need app catalog metadata.",
            "default": true
          },
          "sortBy": {
            "title": "Review Sort Order",
            "enum": [
              "mostRecent",
              "mostHelpful"
            ],
            "type": "string",
            "description": "Order in which Apple's customer reviews feed is paginated: newest reviews first (mostRecent) or highest-voted reviews first (mostHelpful).",
            "default": "mostRecent"
          },
          "minRating": {
            "title": "Minimum Star Rating",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Keep only customer reviews with a star rating greater than or equal to this value (1 to 5). Set minRating=1 and maxRating=2 to isolate negative bug and churn feedback.",
            "default": 1
          },
          "maxRating": {
            "title": "Maximum Star Rating",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Keep only customer reviews with a star rating less than or equal to this value (1 to 5).",
            "default": 5
          },
          "keywords": {
            "title": "Review Keyword Filter",
            "type": "array",
            "description": "Optional case-insensitive keywords matched against each decoded review title or body (OR logic: keeps reviews containing any listed keyword, e.g. ['crash', 'subscription', 'refund']). Leave empty to keep all reviews.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "postedWithinDays": {
            "title": "Posted Within Last N Days",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "Only emit reviews updated within the last N days. Set to 0 for unlimited review age.",
            "default": 0
          },
          "maxReviewsPerApp": {
            "title": "Max Reviews Per App (Per Country)",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum matching reviews to extract per app per country storefront. Apple's Customer Reviews RSS feed and automatic Storefront JSON fallback provide up to 500 reviews (10 pages of 50) per app per country.",
            "default": 50
          },
          "maxAppsPerQuery": {
            "title": "Max Apps Per Search Term",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum number of apps discovered per keyword in searchTerms per country storefront.",
            "default": 5
          },
          "concurrency": {
            "title": "Worker Concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Number of apps processed concurrently (1 to 10). Keep between 3 and 5 for optimal throughput without hitting Apple rate limits.",
            "default": 4
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}