{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ecomscout-com/json-schema/ecomscout-com-audience-definition-schema.json",
  "title": "AudienceDefinition",
  "description": "Audience filters. Same keys on GET (comma lists) and POST (arrays). Export requires at least one narrowing key: country, countryCode, vertical, category, industry, appSlug, includeApps, requireApps, includeProducts, mainMarketingChannel, domains or q.",
  "x-generated": "2026-11-06",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ecomscout-com-openapi.json#/components/schemas/AudienceDefinition",
  "type": "object",
  "properties": {
    "q": {
      "type": "string"
    },
    "country": {
      "type": "string"
    },
    "countryCode": {
      "type": "string"
    },
    "excludeCountries": {
      "type": "string"
    },
    "vertical": {
      "type": "string"
    },
    "excludeVerticals": {
      "type": "string"
    },
    "category": {
      "type": "string"
    },
    "industry": {
      "type": "string"
    },
    "isDropshipper": {
      "type": "boolean"
    },
    "appSlug": {
      "type": "string"
    },
    "includeApps": {
      "type": "string"
    },
    "requireApps": {
      "type": "string"
    },
    "excludeApps": {
      "type": "string"
    },
    "appsMatch": {
      "type": "string",
      "enum": [
        "any",
        "all"
      ]
    },
    "removedApps": {
      "type": "string",
      "description": "Comma slugs. Stores that uninstalled any of these inside the window (appRemovedSince, default last 30 days). Not excludeApps."
    },
    "installedApps": {
      "type": "string",
      "description": "Comma slugs. Stores that newly installed any of these inside the window (appInstalledSince, default last 30 days)."
    },
    "appRemovedSince": {
      "type": "string",
      "format": "date"
    },
    "appInstalledSince": {
      "type": "string",
      "format": "date"
    },
    "newAdsSince": {
      "type": "string",
      "format": "date"
    },
    "includeProducts": {
      "type": "string"
    },
    "excludeProducts": {
      "type": "string"
    },
    "minVisits": {
      "type": "number"
    },
    "maxVisits": {
      "type": "number"
    },
    "minRevenue": {
      "type": "number"
    },
    "maxRevenue": {
      "type": "number"
    },
    "minRating": {
      "type": "number"
    },
    "minAdSpend": {
      "type": "number"
    },
    "maxAdSpend": {
      "type": "number"
    },
    "minTrustpilotRating": {
      "type": "number",
      "minimum": 0,
      "maximum": 5
    },
    "minProducts": {
      "type": "integer"
    },
    "maxProducts": {
      "type": "integer"
    },
    "sizeTier": {
      "type": "string",
      "description": "Comma list of tier keys"
    },
    "revenueTier": {
      "type": "string",
      "description": "Comma list of tier keys"
    },
    "mainMarketingChannel": {
      "type": "string",
      "description": "Organic|Direct|Paid|Social|Referral, comma list"
    },
    "minVisitsGrowthPct": {
      "type": "number"
    },
    "growthWindow": {
      "type": "integer",
      "enum": [
        1,
        3,
        6
      ]
    },
    "updatedSince": {
      "type": "string",
      "format": "date"
    },
    "domains": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ],
      "description": "GET max 200, POST max 500"
    },
    "excludeDomains": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ],
      "description": "GET max 200, POST max 5000"
    }
  }
}