{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/mentio-dev/json-schema/mentio-dev-filter-group-schema.json",
  "title": "FilterGroup",
  "description": "A group of conditions, all of which must hold: the vocabulary of a view filter, without anyOf.",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/mentio-dev-api-openapi.json#/components/schemas/FilterGroup",
  "type": "object",
  "properties": {
    "q": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200,
      "description": "Substring in the post text or the author's name."
    },
    "keywordIds": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      },
      "maxItems": 50,
      "description": "Only matches of any of these keywords."
    },
    "notKeywordIds": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      },
      "maxItems": 50,
      "description": "Never matches of these keywords."
    },
    "keywordKinds": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "brand",
          "competitor",
          "topic"
        ]
      },
      "maxItems": 3,
      "description": "Only matches of keywords of any of these kinds: brand, competitor, topic."
    },
    "groupIds": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      },
      "maxItems": 50,
      "description": "Only matches of keywords in any of these groups (grp_...)."
    },
    "notGroupIds": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      },
      "maxItems": 50,
      "description": "Never matches of keywords in these groups."
    },
    "platforms": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "bluesky",
          "hackernews",
          "github",
          "stackoverflow",
          "devto",
          "reddit",
          "x",
          "youtube",
          "news",
          "linkedin",
          "tiktok",
          "instagram",
          "appstore",
          "googleplay",
          "trustpilot",
          "googlemaps",
          "rss"
        ],
        "description": "Platform: bluesky, hackernews, github, stackoverflow, devto, reddit, x, youtube, news, linkedin, tiktok, instagram, appstore (App Store reviews), googleplay (Google Play reviews), trustpilot (Trustpilot reviews), googlemaps (Google reviews of a place), rss (RSS and Atom feeds a keyword reads)."
      },
      "maxItems": 20,
      "description": "Only posts from any of these platforms."
    },
    "notPlatforms": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "bluesky",
          "hackernews",
          "github",
          "stackoverflow",
          "devto",
          "reddit",
          "x",
          "youtube",
          "news",
          "linkedin",
          "tiktok",
          "instagram",
          "appstore",
          "googleplay",
          "trustpilot",
          "googlemaps",
          "rss"
        ],
        "description": "Platform: bluesky, hackernews, github, stackoverflow, devto, reddit, x, youtube, news, linkedin, tiktok, instagram, appstore (App Store reviews), googleplay (Google Play reviews), trustpilot (Trustpilot reviews), googlemaps (Google reviews of a place), rss (RSS and Atom feeds a keyword reads)."
      },
      "maxItems": 20,
      "description": "Never posts from these platforms."
    },
    "status": {
      "type": "string",
      "enum": [
        "open",
        "ignored",
        "done"
      ],
      "description": "Only mentions in this status: open, ignored, done."
    },
    "relevant": {
      "type": "boolean",
      "description": "true: only mentions the classifier scored relevant; false: only the rest."
    },
    "minRelevance": {
      "type": "integer",
      "minimum": 0,
      "maximum": 100,
      "description": "Only mentions scored at least this."
    },
    "minConfidence": {
      "type": "number",
      "minimum": 0,
      "maximum": 1,
      "description": "Only mentions whose classifier confidence is at least this."
    },
    "sentiments": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "positive",
          "neutral",
          "negative"
        ],
        "description": "Classifier sentiment."
      },
      "maxItems": 3,
      "description": "Only these sentiments."
    },
    "notSentiments": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "positive",
          "neutral",
          "negative"
        ],
        "description": "Classifier sentiment."
      },
      "maxItems": 3,
      "description": "Never these sentiments; an unscored mention still passes."
    },
    "intents": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 40
      },
      "maxItems": 20,
      "description": "Only mentions carrying any of these intent or topic tags."
    },
    "notIntents": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 40
      },
      "maxItems": 20,
      "description": "Never mentions carrying these tags."
    },
    "automated": {
      "type": "boolean",
      "description": "true: only posts that read as machine-made; false: only the rest."
    },
    "languages": {
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^[a-z]{2}$"
      },
      "maxItems": 20,
      "description": "Only posts in any of these languages (ISO 639-1)."
    },
    "notLanguages": {
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^[a-z]{2}$"
      },
      "maxItems": 20,
      "description": "Never posts in these languages; an unknown language still passes."
    },
    "countries": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "us",
          "ca",
          "mx",
          "br",
          "ar",
          "co",
          "cl",
          "pe",
          "gb",
          "ie",
          "fr",
          "de",
          "es",
          "pt",
          "it",
          "nl",
          "be",
          "ch",
          "at",
          "se",
          "no",
          "dk",
          "fi",
          "pl",
          "cz",
          "ro",
          "gr",
          "hu",
          "ua",
          "ru",
          "lt",
          "lv",
          "ee",
          "tr",
          "il",
          "ae",
          "sa",
          "eg",
          "ng",
          "ke",
          "za",
          "ma",
          "in",
          "pk",
          "bd",
          "lk",
          "np",
          "cn",
          "hk",
          "tw",
          "jp",
          "kr",
          "sg",
          "my",
          "id",
          "ph",
          "vn",
          "th",
          "au",
          "nz"
        ]
      },
      "maxItems": 100,
      "description": "Only posts whose author is in any of these countries (ISO 3166-1 alpha-2: us, in, de). An unknown country never passes."
    },
    "notCountries": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "us",
          "ca",
          "mx",
          "br",
          "ar",
          "co",
          "cl",
          "pe",
          "gb",
          "ie",
          "fr",
          "de",
          "es",
          "pt",
          "it",
          "nl",
          "be",
          "ch",
          "at",
          "se",
          "no",
          "dk",
          "fi",
          "pl",
          "cz",
          "ro",
          "gr",
          "hu",
          "ua",
          "ru",
          "lt",
          "lv",
          "ee",
          "tr",
          "il",
          "ae",
          "sa",
          "eg",
          "ng",
          "ke",
          "za",
          "ma",
          "in",
          "pk",
          "bd",
          "lk",
          "np",
          "cn",
          "hk",
          "tw",
          "jp",
          "kr",
          "sg",
          "my",
          "id",
          "ph",
          "vn",
          "th",
          "au",
          "nz"
        ]
      },
      "maxItems": 100,
      "description": "Never posts whose author is in these countries; an unknown country still passes."
    },
    "organization": {
      "type": "boolean",
      "description": "true: only posts by companies, brands and organizations; false: only posts by people."
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 40
      },
      "maxItems": 20,
      "description": "Only authors tagged with any of these, in the workspace's tags or those of the mention's own keyword group."
    },
    "notTags": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 40
      },
      "maxItems": 20,
      "description": "Never authors tagged with any of these, in the workspace's tags or those of the mention's own keyword group."
    },
    "linkHosts": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 200
      },
      "maxItems": 20,
      "description": "Only posts linking to any of these hosts, the host itself or a subdomain of it."
    },
    "notLinkHosts": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 200
      },
      "maxItems": 20,
      "description": "Never posts linking to these hosts."
    },
    "subreddits": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 60
      },
      "maxItems": 50,
      "description": "Only Reddit posts from any of these subreddits (names without the r/, any case); every other post fails it."
    },
    "notSubreddits": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 60
      },
      "maxItems": 50,
      "description": "Never Reddit posts from these subreddits; posts from other platforms still pass."
    },
    "minFollowers": {
      "type": "integer",
      "minimum": 0,
      "description": "Only authors with at least this many followers; unknown reach never passes."
    },
    "maxFollowers": {
      "type": "integer",
      "minimum": 0,
      "description": "Only authors with at most this many followers; unknown reach never passes."
    },
    "isReply": {
      "type": "boolean",
      "description": "true: only replies and comments; false: only top-level posts."
    },
    "kind": {
      "type": "string",
      "enum": [
        "post",
        "comment",
        "repository"
      ],
      "description": "Only posts (post), only comments (comment) or only GitHub repository events (repository)."
    },
    "excludeAuthors": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 200
      },
      "maxItems": 200,
      "description": "Never these authors: display names, handles or profile URLs."
    },
    "ratings": {
      "type": "array",
      "items": {
        "type": "integer",
        "minimum": 1,
        "maximum": 5
      },
      "maxItems": 5,
      "description": "Only app store reviews with any of these star ratings; every other post fails it."
    },
    "notRatings": {
      "type": "array",
      "items": {
        "type": "integer",
        "minimum": 1,
        "maximum": 5
      },
      "maxItems": 5,
      "description": "Never reviews with these star ratings; posts that are not reviews still pass."
    },
    "minLikes": {
      "type": "integer",
      "minimum": 0,
      "description": "Only posts with at least this many likes (upvotes, reactions), as the platform reported them when the post was found. A post without that count never passes."
    },
    "minReposts": {
      "type": "integer",
      "minimum": 0,
      "description": "Only posts with at least this many reposts (shares, retweets), as the platform reported them when the post was found. A post without that count never passes."
    },
    "minReplies": {
      "type": "integer",
      "minimum": 0,
      "description": "Only posts with at least this many replies (comments), as the platform reported them when the post was found. A post without that count never passes."
    },
    "minQuotes": {
      "type": "integer",
      "minimum": 0,
      "description": "Only posts with at least this many quotes, as the platform reported them when the post was found. A post without that count never passes."
    },
    "minViews": {
      "type": "integer",
      "minimum": 0,
      "description": "Only posts with at least this many views (plays), as the platform reported them when the post was found. A post without that count never passes."
    },
    "minBookmarks": {
      "type": "integer",
      "minimum": 0,
      "description": "Only posts with at least this many bookmarks (saves), as the platform reported them when the post was found. A post without that count never passes."
    }
  },
  "additionalProperties": false
}