{
  "openapi": "3.0.1",
  "info": {
    "title": "App Store & Google Play Churn Intel, Reviews & Lead Enricher",
    "description": "Unified iOS App Store & Google Play scraper, review & churn intelligence + lead enricher. Pulls iOS/Android reviews & dev replies, IAP SKUs, EU-DSA contacts, CNAME MMP & GTM X-Ray, 14-lang NLP, ASO audits, Slack/Discord alerts & HTML Dashboard in 128MB RAM ($0 proxy/LLM).",
    "version": "0.3",
    "x-build-id": "gO4aLOS9U95XLTfFe"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/maitreya_buddha~app-store-google-play-churn-intel-lead-enricher/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-maitreya_buddha-app-store-google-play-churn-intel-lead-enricher",
        "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/maitreya_buddha~app-store-google-play-churn-intel-lead-enricher/runs": {
      "post": {
        "operationId": "runs-sync-maitreya_buddha-app-store-google-play-churn-intel-lead-enricher",
        "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/maitreya_buddha~app-store-google-play-churn-intel-lead-enricher/run-sync": {
      "post": {
        "operationId": "run-sync-maitreya_buddha-app-store-google-play-churn-intel-lead-enricher",
        "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": "Run Mode",
            "enum": [
              "app_intelligence",
              "review_stream"
            ],
            "type": "string",
            "description": "'app_intelligence' (default): unified iOS + Android app records with Silent Churn divergence, 14-language negation-aware NLP, Apple Catalog API (IAP SKUs, 25-ver history, Privacy, full iOS dev replies), EU-DSA contacts, CNAME MMPs, Wayback->Live gtm.js X-Ray, ASO Suite & Interactive HTML Dashboard. 'review_stream': constant-RAM streaming individual reviews across iOS + Google Play (up to 10,000/app).",
            "default": "app_intelligence"
          },
          "searchTerms": {
            "title": "Discovery Search Keywords",
            "type": "array",
            "description": "Search both iOS App Store and Google Play simultaneously (e.g., ['invoice maker', 'habit tracker']). Captures $0 ASO search ranks, Keyword Competition Difficulty (0-100), and Apple Search Hints.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "iosAppIds": {
            "title": "Target iOS App IDs or App Store URLs",
            "type": "array",
            "description": "Numeric Apple track IDs (e.g., '694831622') or full apps.apple.com URLs. Automatically cross-matched to Google Play via Tier 0A/0B cryptographic .well-known AASA/assetlinks & Auto-Bridge.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "androidPackageIds": {
            "title": "Target Android Package IDs or Google Play URLs",
            "type": "array",
            "description": "Google Play package IDs (e.g., 'com.duolingo', 'viva.republica.toss') or full play.google.com URLs. Automatically cross-matched to iOS counterparts (including cross-script EN<->KO/JA/ZH/RU/AR).",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "upstreamItems": {
            "title": "Upstream Pipeline Items (n8n / Clay / MCP / Chaining)",
            "type": "array",
            "description": "Optional structured JSON array of upstream records ({ iosAppId, androidPackageId, appUrl, domain, companyName, label }) for zero-permission pipeline chaining from n8n, Clay, MCP agents, or upstream Actors.",
            "default": []
          },
          "topChartFeed": {
            "title": "Optional Store Top Chart Feed",
            "enum": [
              "none",
              "topfreeapplications",
              "toppaidapplications",
              "topgrossingapplications",
              "googleplaytop"
            ],
            "type": "string",
            "description": "Optionally seed discovery directly from live App Store or Google Play Top Charts (combined with topChartCategory).",
            "default": "none"
          },
          "topChartCategory": {
            "title": "Top Chart Commercial Category",
            "enum": [
              "ALL",
              "BUSINESS",
              "FINANCE",
              "PRODUCTIVITY",
              "HEALTH_AND_FITNESS",
              "EDUCATION",
              "SHOPPING",
              "LIFESTYLE",
              "SOCIAL",
              "TOOLS",
              "TRAVEL_AND_LOCAL",
              "FOOD_AND_DRINK",
              "PHOTOGRAPHY"
            ],
            "type": "string",
            "description": "Maps commercial B2B/SaaS categories deterministically across Apple genreId and Google Play category slugs when topChartFeed is enabled.",
            "default": "ALL"
          },
          "countries": {
            "title": "Storefront Countries (ISO-2)",
            "type": "array",
            "description": "Country storefronts to query (e.g., ['us'] or ['us','gb','de','jp','kr']). Combined with autoLocalLanguage, pulls native local-language Google Play & Apple Catalog reviews with (hl) stream deduplication.",
            "items": {
              "type": "string"
            },
            "default": [
              "us"
            ]
          },
          "language": {
            "title": "Fallback Storefront Language",
            "type": "string",
            "description": "Two-letter fallback language code (e.g., 'en', 'es', 'de', 'ja', 'ko') when autoLocalLanguage is disabled or country is unmapped.",
            "default": "en"
          },
          "autoLocalLanguage": {
            "title": "Auto-Map Country to Native Local Language (35+ Countries)",
            "type": "boolean",
            "description": "Automatically maps each country storefront to its native language (e.g., de->de, jp->ja, kr->ko, br->pt) and deduplicates shared-language Google Play streams to avoid wasted duplicate RPCs.",
            "default": true
          },
          "starFilter": {
            "title": "Review Star Filter",
            "enum": [
              "all",
              "critical_1_2",
              "1",
              "2",
              "3",
              "4",
              "5"
            ],
            "type": "string",
            "description": "Filter reviews by star rating. 'critical_1_2' uses Google Play native 1★+2★ feeds and Apple sort=critical with spillover early-termination while keeping Silent Churn unbiased via recent-only baseline.",
            "default": "all"
          },
          "enableAppleDualSort": {
            "title": "Enable Apple Catalog Dual-Sort (Recent + Helpful/Critical)",
            "type": "boolean",
            "description": "Combines Apple Catalog Reviews API sorts (recent + helpful, or critical + recent under starFilter) with full developerResponse extraction and automatic RSS circuit-breaker fallback.",
            "default": true
          },
          "enableGooglePlayDualSort": {
            "title": "Enable Google Play Multi-Sort (Newest + Relevant/Top-Upvoted)",
            "type": "boolean",
            "description": "Combines Google Play newest (unbiased) with most-relevant (or all-time top-upvoted critical complaints under critical_1_2) at 199 reviews/page.",
            "default": true
          },
          "crossPlatformBridge": {
            "title": "Auto-Match Counterpart Store (iOS <-> Android)",
            "type": "boolean",
            "description": "Uses Tier 0A/0B cryptographic .well-known AASA/assetlinks, Cross-Script US title overlay, EU-DSA legal entity, domain/bundle ownership gates, and active counterpart bridge to unify iOS and Android records with zero false merges.",
            "default": true
          },
          "maxApps": {
            "title": "Max Unified Apps",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum unified app records to analyze (app_intelligence) or scan for reviews (review_stream).",
            "default": 15
          },
          "sampleReviewsPerStore": {
            "title": "Sample Reviews Per Store (app_intelligence mode)",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Reviews sampled per store (iOS and Google Play each) to compute Silent Churn divergence, 14-language pain taxonomy, sentiment velocity, release-impact correlations, and cross-OS developer reply rate at $0 extra review fee.",
            "default": 50
          },
          "maxReviewsPerApp": {
            "title": "Max Reviews Per App (review_stream mode)",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum combined iOS + Google Play reviews to stream per app in mode='review_stream' (constant RAM up to 10,000/app).",
            "default": 100
          },
          "includeWebsiteGtmXray": {
            "title": "Enable Pure-HTTP gtm.js, CNAME MMP & app-ads.txt X-Ray",
            "type": "boolean",
            "description": "Inspects configured GTM resource.tags, productSettings (AW-*/G-*), and custom templates plus 12-subdomain DNS CNAME MMPs, DNS TXT, .well-known AASA/assetlinks, and IAB app-ads.txt with 0% boilerplate false positives.",
            "default": true
          },
          "enableWaybackWafFallback": {
            "title": "Enable Wayback Machine WAF Fallback -> Live GTM X-Ray",
            "type": "boolean",
            "description": "When a developer website returns HTTP 403/429 (Cloudflare/WAF) on both apex and alt subdomains, automatically fetches a fresh (<=24m) Wayback snapshot to recover GTM container IDs and fetches LIVE gtm.js directly from googletagmanager.com.",
            "default": true
          },
          "includeDeveloperEmailEnrich": {
            "title": "Enable EU-DSA & 1-Hop Developer Contact Enricher",
            "type": "boolean",
            "description": "Combines Google Play EU-DSA trader contacts (email, phone, legal entity, address) and mailto: with bounded 1-hop website contact discovery, placeholder filtering, honest emailRoleTier, and social links.",
            "default": true
          },
          "includeMxCheck": {
            "title": "Verify Email Domain DNS MX Record",
            "type": "boolean",
            "description": "Performs a lightweight DNS MX lookup on discovered developer email domains to verify mail deliverability.",
            "default": true
          },
          "enableAsoKeywordHints": {
            "title": "Enable Apple Search Hints ASO Keyword Gap",
            "type": "boolean",
            "description": "Queries Apple's MZSearchHints autocomplete API to surface high-intent keywords missing from the app's title and subtitle.",
            "default": true
          },
          "enableMultiCountryAso": {
            "title": "Enable Multi-Country ASO Rank Matrix (up to 5 countries)",
            "type": "boolean",
            "description": "Opt-in: queries searchTerms across up to 5 storefronts to build a cross-country iOS & Android organic rank matrix.",
            "default": false
          },
          "generateDashboardHtml": {
            "title": "Generate Interactive HTML Executive Dashboard (OUTPUT_DASHBOARD.html)",
            "type": "boolean",
            "description": "Persists a zero-dependency, XSS-proof interactive HTML executive dashboard (<350KB) to Key-Value Store record OUTPUT_DASHBOARD.html with SVG charts, filters, and 1-click Copy Outreach / CS Reply buttons.",
            "default": true
          },
          "minOpportunityScore": {
            "title": "Minimum Opportunity Score Filter (0-100)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "In app_intelligence mode, only emit apps with opportunityScore >= this threshold (0 keeps all apps).",
            "default": 0
          },
          "painBucketFilter": {
            "title": "Optional Pain-Bucket Pre-Charge Filter",
            "type": "array",
            "description": "Opt-in filter (empty keeps all). Restrict emitted apps/reviews to specific pain themes (CRASH_BUG, PAYWALL_PRICING, SUBSCRIPTION_CANCEL, LOGIN_AUTH, PERFORMANCE_BATTERY, UX_UPDATE_REGRESSION, SUPPORT_GHOSTED, COMPETITOR_SWITCH_INTENT).",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "switchIntentOnly": {
            "title": "Only Emit Competitor Switch-Intent Signals",
            "type": "boolean",
            "description": "Opt-in pre-charge filter: emit only apps or reviews showing explicit competitor switching intent.",
            "default": false
          },
          "onlyWithEmail": {
            "title": "Only Emit Apps With Verified Developer Email",
            "type": "boolean",
            "description": "Opt-in pre-charge filter (app_intelligence mode): skip apps that have no verified developer contact email.",
            "default": false
          },
          "outreachPersona": {
            "title": "Outreach Copy Persona ($0 LLM)",
            "enum": [
              "mobile_agency",
              "aso_growth_agency",
              "sdk_b2b_sales",
              "product_competitor_intel"
            ],
            "type": "string",
            "description": "Tailors the deterministic outreach subject, opener, and pitch body to your agency or sales motion.",
            "default": "mobile_agency"
          },
          "crmPreset": {
            "title": "CRM Export Preset",
            "enum": [
              "default",
              "instantly",
              "smartlead",
              "hubspot",
              "lemlist"
            ],
            "type": "string",
            "description": "Format dataset rows for direct CSV import into Instantly, Smartlead, HubSpot, or Lemlist (with EU-DSA phone, legal entity, ASO score, sentiment, SDKs & OWASP CSV formula neutralization), or keep full nested JSON ('default').",
            "default": "default"
          },
          "watchDiff": {
            "title": "Enable Incremental Watch-Diff ($0 Unchanged Skip + 90-Run History)",
            "type": "boolean",
            "description": "Persists compact per-app snapshots (10,000-ID ring buffer + 90-run historical trend series) in a Named Key-Value Store. Unchanged apps/reviews are skipped at $0 charge; emits NEW_CRITICAL_REVIEW (with $0 CS reply draft), VERSION_RELEASED, RATING_DROP_ALERT, and CRASH_SPIKE_ALERT.",
            "default": false
          },
          "preflightShortCircuit": {
            "title": "Enable Cheap Pre-Flight Short-Circuit (Watch-Diff)",
            "type": "boolean",
            "description": "When watchDiff is enabled and a prior snapshot exists with a fresh 7-day enrichment cache, probes store versions, ASO ranks, and the single latest iOS/Google Play review ID before skipping heavy website & deep-review fetches (~75-85% faster at 0 missed alerts).",
            "default": true
          },
          "dedupStoreName": {
            "title": "Watch-Diff Named Key-Value Store",
            "type": "string",
            "description": "Alphanumeric/hyphen store name for watchDiff state & 90-run history persistence across runs (auto-sanitized).",
            "default": "app-store-churn-intel-watch"
          },
          "webhookUrl": {
            "title": "Optional Alert Webhook URL (HTTPS)",
            "type": "string",
            "description": "Optional public HTTPS endpoint (Slack/Discord/Make/n8n/Zapier) to receive high-priority churn or watch-diff alerts with suggested CS reply drafts. Private/local IPs are strictly blocked (SSRF-safe).",
            "default": ""
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}