{
  "openapi": "3.0.1",
  "info": {
    "title": "Apple App Store & iOS Reviews Scraper API (Apps & Leads)",
    "description": "Fast pure-HTTP Apple App Store & iOS reviews scraper API. Extract app metadata, multi-country customer reviews, 1-2 star churn pain points, top charts, IAP pricing & publisher domains in <2s (256MB, MCP & Clay ready).",
    "version": "1.0",
    "x-build-id": "PocbEDA9eueizQGf6"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/yan0lovesha~apple-app-store-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-yan0lovesha-apple-app-store-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/yan0lovesha~apple-app-store-scraper/runs": {
      "post": {
        "operationId": "runs-sync-yan0lovesha-apple-app-store-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/yan0lovesha~apple-app-store-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-yan0lovesha-apple-app-store-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": {
          "mode": {
            "title": "Scraping Mode",
            "enum": [
              "apps_and_reviews",
              "reviews_only",
              "apps_only",
              "top_charts"
            ],
            "type": "string",
            "description": "Choose 'apps_and_reviews' (enriched app profiles + embedded review samples & pain points), 'reviews_only' (flat 1-row-per-review dataset for bulk sentiment/churn mining), 'apps_only' (ultra-fast app metadata + storefront enrichment without reviews), or 'top_charts' (Apple Top Free / Paid / Grossing charts).",
            "default": "apps_and_reviews"
          },
          "appUrlsOrIds": {
            "title": "App Store URLs, Track IDs, or Bundle IDs",
            "type": "array",
            "description": "Full apps.apple.com URLs ('https://apps.apple.com/us/app/notion-notes-tasks-ai/id1232780281'), numeric App Store trackIds ('1477376905'), or iOS bundleIds ('notion.id').",
            "items": {
              "type": "string"
            }
          },
          "searchTerms": {
            "title": "Keyword Search Terms",
            "type": "array",
            "description": "Optional App Store search keywords (e.g. 'expense tracker', 'crm', 'habit tracker') queried via Apple's official Search API.",
            "items": {
              "type": "string"
            }
          },
          "maxAppsPerSearch": {
            "title": "Max Apps Per Search Keyword",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum apps returned per keyword in searchTerms (1-200).",
            "default": 3
          },
          "chartType": {
            "title": "Top Chart Type (when mode = top_charts)",
            "enum": [
              "topfreeapplications",
              "toppaidapplications",
              "topgrossingapplications",
              "all_charts"
            ],
            "type": "string",
            "description": "Apple App Store chart feed to scrape when mode is 'top_charts' ('topfreeapplications', 'toppaidapplications', 'topgrossingapplications', or 'all_charts').",
            "default": "topfreeapplications"
          },
          "maxChartApps": {
            "title": "Max Apps Per Top Chart",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Number of ranked apps to scrape per Top Chart per country (1-100, enriched via batch Lookup in a single HTTP request).",
            "default": 25
          },
          "countries": {
            "title": "Storefront Countries (ISO-2)",
            "type": "array",
            "description": "One or more ISO-2 App Store country codes (e.g. ['us'], ['us', 'gb', 'de', 'ca', 'au', 'fr', 'jp']) for multi-country pricing, rank, and localized review scraping.",
            "default": [
              "us"
            ],
            "items": {
              "type": "string"
            }
          },
          "includeReviews": {
            "title": "Include Customer Reviews & Pain-Point Mining",
            "type": "boolean",
            "description": "Fetch structured customer reviews via Apple RSS JSON pagination (up to 500 reviews/app/country across pages 1..10).",
            "default": true
          },
          "emitIndividualReviews": {
            "title": "Emit Flat Review Rows in Dataset",
            "type": "boolean",
            "description": "When enabled (or automatically when mode = 'reviews_only'), pushes each matching review as its own flat Dataset item (recordType = 'review'). When false in 'apps_and_reviews' mode, reviews are embedded in recentReviewsSample on each app item.",
            "default": false
          },
          "maxReviewsPerApp": {
            "title": "Max Reviews Per App (Per Country)",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum matching customer reviews to collect per app per country (0-500).",
            "default": 10
          },
          "sortBy": {
            "title": "Review Sort Order",
            "enum": [
              "mostrecent",
              "mosthelpful"
            ],
            "type": "string",
            "description": "Sort customer reviews by 'mostrecent' or 'mosthelpful'.",
            "default": "mostrecent"
          },
          "minRating": {
            "title": "Minimum Review Star Rating (1-5)",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Only keep reviews with rating >= minRating (1-5).",
            "default": 1
          },
          "maxRating": {
            "title": "Maximum Review Star Rating (1-5)",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Only keep reviews with rating <= maxRating. Tip: Set maxRating = 2 to scrape ONLY 1-2★ angry user reviews for competitor churn hijacking!",
            "default": 5
          },
          "enrichStorefrontDetails": {
            "title": "Enrich Live Storefront Details (IAPs, Support URL & Privacy Labels)",
            "type": "boolean",
            "description": "Fetches apps.apple.com/{country}/app/id{trackId} via pure HTTP to extract In-App Purchases, supportUrl, privacyPolicyUrl, developerWebsite, privacy nutrition labels, and 1-5★ rating histogram.",
            "default": true
          },
          "maxTotalItems": {
            "title": "Max Total Dataset Items Across Run",
            "minimum": 1,
            "maximum": 25000,
            "type": "integer",
            "description": "Global cap on total dataset records (apps + individual reviews) pushed and billed in a single run.",
            "default": 500
          },
          "generatePublisherDossier": {
            "title": "Generate B2B Publisher Lead & Churn Dossiers ($0.01/publisher)",
            "type": "boolean",
            "description": "Optional add-on (off by default). Generates account-level publisher intelligence dossiers in Key-Value Store record PUBLISHER_DOSSIERS with root publisherDomain, monetization model, 1-2★ pain-point breakdown, churn risk score (0-100), and ready-to-send B2B SDR outreach hook.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}