{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/hg-insights/json-schema/hg-insights-companies-search-request-schema.json",
  "title": "CompaniesSearchRequest",
  "description": "Search and filter companies. Returns paginated matching companies.",
  "x-generated": "2026-12-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/hg-insights-openapi.yaml#/components/schemas/CompaniesSearchRequest",
  "additionalProperties": false,
  "properties": {
    "fields": {
      "description": "Fields to include in the response. At least one field is required.",
      "items": {
        "$ref": "#/$defs/CompanySearchV2FieldNames"
      },
      "minItems": 1,
      "type": "array",
      "x-struct": null,
      "x-validate": null
    },
    "filters": {
      "$ref": "#/$defs/CompanySearchV2Filters"
    },
    "limit": {
      "default": 10,
      "description": "Maximum number of companies to return",
      "maximum": 100,
      "minimum": 1,
      "type": "integer",
      "x-struct": null,
      "x-validate": null
    },
    "offset": {
      "default": 0,
      "description": "Number of companies to skip (max 24,999)",
      "maximum": 24999,
      "minimum": 0,
      "type": "integer",
      "x-struct": null,
      "x-validate": null
    },
    "sorts": {
      "$ref": "#/$defs/CompanySearchV2Sorts"
    }
  },
  "required": [
    "fields",
    "filters"
  ],
  "type": "object",
  "x-struct": "Elixir.TalariaWeb.Schemas.V2.Companies.Search.Request",
  "x-validate": "Elixir.TalariaWeb.Schemas.V2.Companies.Search.Request",
  "$defs": {
    "AnyAllIdInclusionFilter": {
      "description": "Inclusion filter object for use with hex encoded IDs. Can filter ids by ANY_PRESENT or ALL_PRESENT inclusion methods",
      "properties": {
        "ids": {
          "description": "Hex Encoded IDs",
          "items": {
            "$ref": "#/$defs/Id"
          },
          "minItems": 1,
          "type": "array",
          "x-struct": null,
          "x-validate": null
        },
        "inclusion_method": {
          "$ref": "#/$defs/AnyAllInclusionMethod"
        }
      },
      "required": [
        "ids",
        "inclusion_method"
      ],
      "title": "AnyAllIdInclusionFilter",
      "type": "object",
      "x-struct": "Elixir.TalariaWeb.Schemas.V1.Filters.AnyAllIdInclusionFilter",
      "x-validate": null
    },
    "AnyAllInclusionMethod": {
      "description": "Inclusion method for just ANY_PRESENT or ALL_PRESENT",
      "enum": [
        "ANY_PRESENT",
        "ALL_PRESENT"
      ],
      "title": "AnyAllInclusionMethod",
      "type": "string",
      "x-struct": "Elixir.TalariaWeb.Schemas.V1.Filters.AnyAllInclusionMethod",
      "x-validate": null
    },
    "AnyIdInclusionFilter": {
      "description": "Inclusion filter object for use with hex encoded IDs. Can filter ids by ANY_PRESENT inclusion method",
      "properties": {
        "ids": {
          "description": "Hex Encoded IDs",
          "items": {
            "$ref": "#/$defs/Id"
          },
          "minItems": 1,
          "type": "array",
          "x-struct": null,
          "x-validate": null
        },
        "inclusion_method": {
          "$ref": "#/$defs/AnyInclusionMethod"
        }
      },
      "required": [
        "ids",
        "inclusion_method"
      ],
      "title": "AnyIdInclusionFilter",
      "type": "object",
      "x-struct": "Elixir.TalariaWeb.Schemas.V1.Filters.AnyIdInclusionFilter",
      "x-validate": null
    },
    "AnyInclusionMethod": {
      "description": "Inclusion method for just ANY_PRESENT",
      "enum": [
        "ANY_PRESENT"
      ],
      "title": "AnyInclusionMethod",
      "type": "string",
      "x-struct": "Elixir.TalariaWeb.Schemas.V1.Filters.AnyInclusionMethod",
      "x-validate": null
    },
    "AnyNameInclusionFilter": {
      "description": "Inclusion filter object (using string names as IDs)",
      "properties": {
        "ids": {
          "description": "Name IDs",
          "items": {
            "type": "string",
            "x-struct": null,
            "x-validate": null
          },
          "minItems": 1,
          "type": "array",
          "x-struct": null,
          "x-validate": null
        },
        "inclusion_method": {
          "$ref": "#/$defs/AnyInclusionMethod"
        }
      },
      "required": [
        "ids",
        "inclusion_method"
      ],
      "title": "AnyNameInclusionFilter",
      "type": "object",
      "x-struct": "Elixir.TalariaWeb.Schemas.V1.Filters.AnyNameInclusionFilter",
      "x-validate": null
    },
    "AnyNoneCodeInclusionFilter": {
      "additionalProperties": false,
      "description": "Inclusion filter object for use with standard code strings. Can filter codes by ANY_PRESENT or NONE_PRESENT inclusion methods",
      "properties": {
        "codes": {
          "description": "Standard code strings",
          "items": {
            "minLength": 1,
            "type": "string",
            "x-struct": null,
            "x-validate": null
          },
          "minItems": 1,
          "type": "array",
          "x-struct": null,
          "x-validate": null
        },
        "inclusion_method": {
          "$ref": "#/$defs/AnyNoneInclusionMethod"
        }
      },
      "required": [
        "codes",
        "inclusion_method"
      ],
      "title": "AnyNoneCodeInclusionFilter",
      "type": "object",
      "x-struct": "Elixir.TalariaWeb.Schemas.V1.Filters.AnyNoneCodeInclusionFilter",
      "x-validate": null
    },
    "AnyNoneCodeOrIdInclusionFilter": {
      "description": "Inclusion filter accepting either hex-encoded HG IDs (`ids`) or standard code strings (`codes`), together with an inclusion method. Exactly one of `ids` or `codes` must be provided.",
      "oneOf": [
        {
          "$ref": "#/$defs/AnyNoneIdInclusionFilter"
        },
        {
          "$ref": "#/$defs/AnyNoneCodeInclusionFilter"
        }
      ],
      "title": "AnyNoneCodeOrIdInclusionFilter",
      "x-struct": "Elixir.TalariaWeb.Schemas.V1.Filters.AnyNoneCodeOrIdInclusionFilter",
      "x-validate": null
    },
    "AnyNoneIdInclusionFilter": {
      "description": "Inclusion filter object for use with hex encoded IDs. Can filter ids by ANY_PRESENT or NONE_PRESENT inclusion methods",
      "properties": {
        "ids": {
          "description": "Hex Encoded IDs",
          "items": {
            "$ref": "#/$defs/Id"
          },
          "minItems": 1,
          "type": "array",
          "x-struct": null,
          "x-validate": null
        },
        "inclusion_method": {
          "$ref": "#/$defs/AnyNoneInclusionMethod"
        }
      },
      "required": [
        "ids",
        "inclusion_method"
      ],
      "title": "AnyNoneIdInclusionFilter",
      "type": "object",
      "x-struct": "Elixir.TalariaWeb.Schemas.V1.Filters.AnyNoneIdInclusionFilter",
      "x-validate": null
    },
    "AnyNoneInclusionMethod": {
      "description": "Inclusion method for just ANY_PRESENT or NONE_PRESENT",
      "enum": [
        "ANY_PRESENT",
        "NONE_PRESENT"
      ],
      "title": "AnyNoneInclusionMethod",
      "type": "string",
      "x-struct": "Elixir.TalariaWeb.Schemas.V1.Filters.AnyNoneInclusionMethod",
      "x-validate": null
    },
    "AnyNoneNameInclusionFilter": {
      "description": "Inclusion filter object (using string names as IDs)",
      "properties": {
        "ids": {
          "description": "Name IDs",
          "items": {
            "type": "string",
            "x-struct": null,
            "x-validate": null
          },
          "minItems": 1,
          "type": "array",
          "x-struct": null,
          "x-validate": null
        },
        "inclusion_method": {
          "$ref": "#/$defs/AnyNoneInclusionMethod"
        }
      },
      "required": [
        "ids",
        "inclusion_method"
      ],
      "title": "AnyNoneNameInclusionFilter",
      "type": "object",
      "x-struct": "Elixir.TalariaWeb.Schemas.V1.Filters.AnyNoneNameInclusionFilter",
      "x-validate": null
    },
    "AnyNoneNumericInclusionFilter": {
      "description": "Inclusion filter object using integer IDs. Can filter ids by ANY_PRESENT or NONE_PRESENT inclusion methods",
      "properties": {
        "ids": {
          "description": "Numeric IDs",
          "items": {
            "type": "integer",
            "x-struct": null,
            "x-validate": null
          },
          "minItems": 1,
          "type": "array",
          "x-struct": null,
          "x-validate": null
        },
        "inclusion_method": {
          "$ref": "#/$defs/AnyNoneInclusionMethod"
        }
      },
      "required": [
        "ids",
        "inclusion_method"
      ],
      "title": "AnyNoneNumericInclusionFilter",
      "type": "object",
      "x-struct": "Elixir.TalariaWeb.Schemas.V1.Filters.AnyNoneNumericInclusionFilter",
      "x-validate": null
    },
    "CompanyCorporateHierarchyFilters": {
      "description": "Filters based on a company's corporate hierarchy classification.",
      "properties": {
        "is_corporate_parent": {
          "description": "Filter based on if a company is classified as a corporate parent or not.",
          "type": "boolean",
          "x-struct": null,
          "x-validate": null
        },
        "is_domestic_parent": {
          "description": "Filter based on if a company is classified as a domestic parent or not.",
          "type": "boolean",
          "x-struct": null,
          "x-validate": null
        },
        "is_global_headquarters": {
          "description": "Filter based on if a company is classified as a global headquarters or not.",
          "type": "boolean",
          "x-struct": null,
          "x-validate": null
        }
      },
      "title": "CompanyCorporateHierarchyFilters",
      "type": "object",
      "x-struct": "Elixir.TalariaWeb.Schemas.V1.Company.Filters.CorporateHierarchy",
      "x-validate": null
    },
    "CompanyFiltersIntent": {
      "description": "Filters based around intent signals.\nIntent signals are signals that indicate a company is showing interest in a particular topic.\n",
      "minProperties": 1,
      "properties": {
        "buyers_journey_ids": {
          "$ref": "#/$defs/IdInclusionFilter"
        },
        "context_type_ids": {
          "$ref": "#/$defs/IdInclusionFilter"
        },
        "location": {
          "$ref": "#/$defs/IntentLocationFilter"
        },
        "number_of_cadences": {
          "description": "Number of cadences",
          "minimum": 1,
          "type": "integer",
          "x-struct": null,
          "x-validate": null
        },
        "signal_score": {
          "$ref": "#/$defs/IntentSignalScoreFilter"
        },
        "topics": {
          "$ref": "#/$defs/IntentTopicsFilter"
        }
      },
      "title": "CompanyFiltersIntent",
      "type": "object",
      "x-struct": "Elixir.TalariaWeb.Schemas.V1.Company.Filters.Intent",
      "x-validate": null
    },
    "CompanyInstallsCountryFilter": {
      "additionalProperties": false,
      "description": "Filter by the install's own country, independent of the company's location.",
      "properties": {
        "codes": {
          "description": "Array of ISO 3166-1 alpha-2 country codes (e.g., US, GB, DE)",
          "items": {
            "maxLength": 2,
            "minLength": 2,
            "type": "string",
            "x-struct": null,
            "x-validate": null
          },
          "maxItems": 249,
          "minItems": 1,
          "type": "array",
          "x-struct": null,
          "x-validate": null
        }
      },
      "title": "CompanyInstallsCountryFilter",
      "type": "object",
      "x-struct": "Elixir.TalariaWeb.Schemas.V2.Companies.Filters.Installs.CountryFilter",
      "x-validate": null
    },
    "CompanyInstallsLastVerifiedDateFilter": {
      "additionalProperties": false,
      "description": "Filter by product last verified date range (inclusive)",
      "properties": {
        "max": {
          "description": "Maximum last verified date (inclusive), e.g. 2024-12-31",
          "format": "date",
          "type": "string",
          "x-struct": null,
          "x-validate": null
        },
        "min": {
          "description": "Minimum last verified date (inclusive), e.g. 2024-01-01",
          "format": "date",
          "type": "string",
          "x-struct": null,
          "x-validate": null
        }
      },
      "title": "CompanyInstallsLastVerifiedDateFilter",
      "type": "object",
      "x-struct": "Elixir.TalariaWeb.Schemas.V2.Companies.Filters.Installs.LastVerifiedDateFilter",
      "x-validate": null
    },
    "CompanySearchV2AiMaturityFilter": {
      "additionalProperties": false,
      "description": "Filter by AI maturity data fields.",
      "properties": {
        "ai_maturity_6m_delta": {
          "$ref": "#/$defs/CompanySearchV2RangeFilter"
        },
        "ai_maturity_rank": {
          "$ref": "#/$defs/CompanySearchV2RangeFilter"
        },
        "ai_maturity_score": {
          "$ref": "#/$defs/CompanySearchV2RangeFilter"
        },
        "ai_product_use": {
          "description": "Whether company has AI product installed",
          "type": "boolean",
          "x-struct": null,
          "x-validate": null
        },
        "data_maturity_level": {
          "description": "Filter by data maturity level",
          "items": {
            "enum": [
              "LOW",
              "MEDIUM",
              "HIGH"
            ],
            "type": "string",
            "x-struct": null,
            "x-validate": null
          },
          "type": "array",
          "x-struct": null,
          "x-validate": null
        },
        "dominant_cloud_provider": {
          "description": "Filter by dominant cloud provider",
          "items": {
            "type": "string",
            "x-struct": null,
            "x-validate": null
          },
          "type": "array",
          "x-struct": null,
          "x-validate": null
        },
        "genai_intent_score": {
          "$ref": "#/$defs/CompanySearchV2RangeFilter"
        }
      },
      "title": "CompanySearchV2AiMaturityFilter",
      "type": "object",
      "x-struct": "Elixir.TalariaWeb.Schemas.V2.Companies.Filters.AiMaturityFilter",
      "x-validate": null
    },
    "CompanySearchV2AiSpendFilter": {
      "additionalProperties": false,
      "description": "Filter by USD spent by a company in certain AI spend categories.",
      "minProperties": 2,
      "properties": {
        "categories": {
          "$ref": "#/$defs/AnyIdInclusionFilter"
        },
        "range": {
          "$ref": "#/$defs/CompanySearchV2RangeFilter"
        }
      },
      "required": [
        "categories",
        "range"
      ],
      "title": "CompanySearchV2AiSpendFilter",
      "type": "object",
      "x-struct": "Elixir.TalariaWeb.Schemas.V2.Companies.Filters.AiSpendFilter",
      "x-validate": null
    },
    "CompanySearchV2CloudMaturityFilter": {
      "additionalProperties": false,
      "description": "Filter by cloud maturity data fields.",
      "properties": {
        "aws_products_count": {
          "$ref": "#/$defs/CompanySearchV2RangeFilter"
        },
        "azure_products_count": {
          "$ref": "#/$defs/CompanySearchV2RangeFilter"
        },
        "cloud_stack_percent_change": {
          "$ref": "#/$defs/CompanySearchV2SignedRangeFilter"
        },
        "current_products_used_cloud_percent": {
          "$ref": "#/$defs/CompanySearchV2RangeFilter"
        },
        "current_products_used_total_count": {
          "$ref": "#/$defs/CompanySearchV2RangeFilter"
        },
        "gcp_products_count": {
          "$ref": "#/$defs/CompanySearchV2RangeFilter"
        },
        "new_products_used_cloud_percent": {
          "$ref": "#/$defs/CompanySearchV2RangeFilter"
        }
      },
      "title": "CompanySearchV2CloudMaturityFilter",
      "type": "object",
      "x-struct": "Elixir.TalariaWeb.Schemas.V2.Companies.Filters.CloudMaturityFilter",
      "x-validate": null
    },
    "CompanySearchV2EmployeesFilter": {
      "additionalProperties": false,
      "description": "Filter by the number of employees working at a company. Some companies are listed as having a single discrete number of employees, while others are listed as a range. By default this filter will match against both.",
      "properties": {
        "has_fixed_employees": {
          "description": "Whether to limit the companies returned to those with a fixed number of employees (and exclude those listed as a range).",
          "type": [
            "boolean",
            "null"
          ],
          "x-struct": null,
          "x-validate": null
        },
        "max": {
          "description": "The maximum number of employees to match against.",
          "minimum": 0,
          "type": [
            "integer",
            "null"
          ],
          "x-struct": null,
          "x-validate": null
        },
        "min": {
          "description": "The minimum number of employees to match against.",
          "minimum": 0,
          "type": [
            "integer",
            "null"
          ],
          "x-struct": null,
          "x-validate": null
        }
      },
      "title": "CompanySearchV2EmployeesFilter",
      "type": "object",
      "x-struct": "Elixir.TalariaWeb.Schemas.V2.Companies.Filters.EmployeesFilter",
      "x-validate": "Elixir.TalariaWeb.Schemas.V2.Companies.Filters.EmployeesFilter"
    },
    "CompanySearchV2FieldNames": {
      "description": "Allowed fields to be selected and returned in the response.",
      "enum": [
        "id",
        "name",
        "domain",
        "domain_normalized"
      ],
      "title": "CompanySearchV2FieldNames",
      "type": "string",
      "x-struct": "Elixir.TalariaWeb.Schemas.V2.Companies.Search.FieldNames",
      "x-validate": null
    },
    "CompanySearchV2Filters": {
      "additionalProperties": false,
      "description": "Filters object",
      "properties": {
        "ai_maturity": {
          "$ref": "#/$defs/CompanySearchV2AiMaturityFilter"
        },
        "ai_spend": {
          "description": "Filter results based on AI spend filters",
          "items": {
            "$ref": "#/$defs/CompanySearchV2AiSpendFilter"
          },
          "minItems": 1,
          "type": "array",
          "x-struct": null,
          "x-validate": null
        },
        "cloud_maturity": {
          "$ref": "#/$defs/CompanySearchV2CloudMaturityFilter"
        },
        "company_identifiers": {
          "$ref": "#/$defs/CompanySearchV2IdentifierFilters"
        },
        "corporate_hierarchy": {
          "$ref": "#/$defs/CompanyCorporateHierarchyFilters"
        },
        "firmographics": {
          "$ref": "#/$defs/CompanySearchV2FirmographicFilters"
        },
        "installs": {
          "$ref": "#/$defs/CompanySearchV2InstallsFilters"
        },
        "intent": {
          "$ref": "#/$defs/CompanyFiltersIntent"
        },
        "scoring": {
          "$ref": "#/$defs/CompanySearchV2ScoringFilter"
        },
        "spend": {
          "description": "Filter results based on spend filters",
          "items": {
            "$ref": "#/$defs/CompanySearchV2SpendFilter"
          },
          "minItems": 1,
          "type": "array",
          "x-struct": null,
          "x-validate": null
        }
      },
      "title": "CompanySearchV2Filters",
      "type": "object",
      "x-struct": "Elixir.TalariaWeb.Schemas.V2.Companies.Filters",
      "x-validate": null
    },
    "CompanySearchV2FirmographicFilters": {
      "additionalProperties": false,
      "description": "Firmographic based filters for companies.",
      "properties": {
        "company_level": {
          "default": "ALL_ENTITIES",
          "description": "Filter by corporate hierarchy level. ALL_ENTITIES returns all companies (default). CORPORATE_PARENT limits to corporate parents. DOMESTIC_PARENT limits to domestic parents. GLOBAL_HEADQUARTER limits to global headquarters.\nWhen set, this takes precedence over the deprecated boolean filters in corporate_hierarchy.\n",
          "enum": [
            "ALL_ENTITIES",
            "CORPORATE_PARENT",
            "DOMESTIC_PARENT",
            "GLOBAL_HEADQUARTER"
          ],
          "type": "string",
          "x-struct": null,
          "x-validate": null
        },
        "country_codes": {
          "$ref": "#/$defs/CountryCodesFilter"
        },
        "employees": {
          "$ref": "#/$defs/CompanySearchV2EmployeesFilter"
        },
        "industries": {
          "description": "Filter by the industry which a company is categorized by.\nAccepts a list of HG Insights derived identifiers along with an inclusion method, with the inclusion method specifying whether companies should be included or excluded from the results based on the provided industry ids.\n",
          "items": {
            "$ref": "#/$defs/AnyNoneNumericInclusionFilter"
          },
          "minItems": 1,
          "type": "array",
          "x-struct": null,
          "x-validate": null
        },
        "naics_codes": {
          "description": "Filter by NAICS (North American Industry Classification System) codes.\nAccepts either a list of hex-encoded HG Insights derived identifiers (`ids`) or a list of standard\nNAICS code strings (`codes`, e.g. \"5221\"), along with an inclusion method specifying whether companies\nshould be included or excluded from the results. Each entry must provide exactly one of `ids` or `codes`.\n",
          "items": {
            "$ref": "#/$defs/AnyNoneCodeOrIdInclusionFilter"
          },
          "minItems": 1,
          "type": "array",
          "x-struct": null,
          "x-validate": null
        },
        "region_names": {
          "$ref": "#/$defs/AnyNameInclusionFilter"
        },
        "revenue": {
          "$ref": "#/$defs/CompanySearchV2RevenueFilter"
        },
        "sic_codes": {
          "description": "Filter by SIC (Standard Industrial Classification) codes.\nAccepts either a list of hex-encoded HG Insights derived identifiers (`ids`) or a list of standard\nSIC code strings (`codes`, e.g. \"5912\"), along with an inclusion method specifying whether companies\nshould be included or excluded from the results. Each entry must provide exactly one of `ids` or `codes`.\n",
          "items": {
            "$ref": "#/$defs/AnyNoneCodeOrIdInclusionFilter"
          },
          "minItems": 1,
          "type": "array",
          "x-struct": null,
          "x-validate": null
        },
        "state_ids": {
          "$ref": "#/$defs/AnyIdInclusionFilter"
        }
      },
      "title": "CompanySearchV2FirmographicFilters",
      "type": "object",
      "x-struct": "Elixir.TalariaWeb.Schemas.V2.Companies.Filters.Firmographics",
      "x-validate": null
    },
    "CompanySearchV2IdentifierFilters": {
      "additionalProperties": false,
      "description": "Filters based around company identifiers.",
      "properties": {
        "company_ids": {
          "allOf": [
            {
              "$ref": "#/$defs/AnyNoneIdInclusionFilter"
            }
          ],
          "description": "A list of hex encoded company identifiers to filter your results by.\nUse `ANY_PRESENT` to return companies matching one of the provided identifiers.\nUse `NONE_PRESENT` to exclude the provided identifiers from your results — useful for\nwhitespace analysis, where you exclude companies already known to you (e.g. existing\nCRM/pipeline accounts) and return only net-new companies matching the rest of your filters.\n",
          "type": "object",
          "x-struct": null,
          "x-validate": null
        },
        "company_ids_including_corporate_relatives": {
          "allOf": [
            {
              "$ref": "#/$defs/AnyNoneIdInclusionFilter"
            }
          ],
          "description": "A list of hex encoded company identifiers to filter your results by.\nWith `ANY_PRESENT`, results include both the companies which match the provided IDs, as well as all other companies within its corporate hierarchy.\nWith `NONE_PRESENT`, the matching companies and their entire corporate hierarchies are excluded from your results — useful for whitespace analysis at the corporate family level.\n",
          "type": "object",
          "x-struct": null,
          "x-validate": null
        },
        "domains": {
          "allOf": [
            {
              "$ref": "#/$defs/AnyNoneNameInclusionFilter"
            }
          ],
          "description": "A list of company domains to filter your results by.\nUse `ANY_PRESENT` to return companies matching one of the provided domains.\nUse `NONE_PRESENT` to exclude companies with the provided domains from your results.\n",
          "type": "object",
          "x-struct": null,
          "x-validate": null
        },
        "name": {
          "description": "Search companies by name. Case-insensitive substring match — all space-separated tokens must appear in the company name.",
          "maxLength": 200,
          "minLength": 1,
          "type": "string",
          "x-struct": null,
          "x-validate": null
        }
      },
      "title": "CompanySearchV2IdentifierFilters",
      "type": "object",
      "x-struct": "Elixir.TalariaWeb.Schemas.V2.Companies.Filters.CompanyIdentifiers",
      "x-validate": null
    },
    "CompanySearchV2InstallsFilters": {
      "additionalProperties": false,
      "description": "Filters based around the install records detected at a company.",
      "properties": {
        "country": {
          "$ref": "#/$defs/CompanyInstallsCountryFilter"
        },
        "product_attributes": {
          "$ref": "#/$defs/ProductAttributesFilterCompanyInstalls"
        },
        "product_categories": {
          "$ref": "#/$defs/ProductCategoriesFilter"
        },
        "product_last_verified_date": {
          "$ref": "#/$defs/CompanyInstallsLastVerifiedDateFilter"
        },
        "products": {
          "description": "Filter based on the associated products for an install record. Can provide a list of product filters so different inclusion methods may be combined.",
          "items": {
            "$ref": "#/$defs/ProductFilter"
          },
          "minItems": 1,
          "type": "array",
          "x-struct": null,
          "x-validate": null
        },
        "vendors": {
          "description": "Filter based on the associated vendor for an install record. Can provide a list of vendor filters so different inclusion methods may be combined.",
          "items": {
            "$ref": "#/$defs/VendorFilter"
          },
          "minItems": 1,
          "type": "array",
          "x-struct": null,
          "x-validate": null
        }
      },
      "title": "CompanySearchV2InstallsFilters",
      "type": "object",
      "x-struct": "Elixir.TalariaWeb.Schemas.V2.Companies.Filters.Installs",
      "x-validate": null
    },
    "CompanySearchV2RangeFilter": {
      "additionalProperties": false,
      "description": "Range filter object. At least one of min or max is required. When both are provided, min must be less than or equal to max.",
      "minProperties": 1,
      "properties": {
        "max": {
          "description": "Maximum value",
          "minimum": 0,
          "type": "integer",
          "x-struct": null,
          "x-validate": null
        },
        "min": {
          "description": "Minimum value",
          "minimum": 0,
          "type": "integer",
          "x-struct": null,
          "x-validate": null
        }
      },
      "title": "CompanySearchV2RangeFilter",
      "type": "object",
      "x-struct": "Elixir.TalariaWeb.Schemas.V2.Companies.Filters.RangeFilter",
      "x-validate": "Elixir.TalariaWeb.Schemas.V2.Companies.Filters.RangeFilter"
    },
    "CompanySearchV2RevenueFilter": {
      "additionalProperties": false,
      "description": "Filter by the revenue earned by a company. Some companies are listed as having a single discrete revenue value, while others are listed as a range. By default this filter will match against both.",
      "properties": {
        "has_fixed_revenue": {
          "description": "Whether to limit the companies returned to those listed with a single/fixed revenue value (and exclude those listed as a range).",
          "type": [
            "boolean",
            "null"
          ],
          "x-struct": null,
          "x-validate": null
        },
        "max": {
          "description": "The maximum revenue to match against.",
          "minimum": 0,
          "type": [
            "integer",
            "null"
          ],
          "x-struct": null,
          "x-validate": null
        },
        "min": {
          "description": "The minimum revenue to match against.",
          "minimum": 0,
          "type": [
            "integer",
            "null"
          ],
          "x-struct": null,
          "x-validate": null
        }
      },
      "title": "CompanySearchV2RevenueFilter",
      "type": "object",
      "x-struct": "Elixir.TalariaWeb.Schemas.V2.Companies.Filters.RevenueFilter",
      "x-validate": "Elixir.TalariaWeb.Schemas.V2.Companies.Filters.RevenueFilter"
    },
    "CompanySearchV2ScoreRangeFilter": {
      "additionalProperties": false,
      "description": "An inclusive score range. Scores run 0-100.",
      "properties": {
        "max": {
          "maximum": 100,
          "minimum": 0,
          "type": [
            "integer",
            "null"
          ],
          "x-struct": null,
          "x-validate": null
        },
        "min": {
          "maximum": 100,
          "minimum": 0,
          "type": [
            "integer",
            "null"
          ],
          "x-struct": null,
          "x-validate": null
        }
      },
      "title": "CompanySearchV2ScoreRangeFilter",
      "type": "object",
      "x-struct": "Elixir.TalariaWeb.Schemas.V2.Companies.Filters.ScoreRangeFilter",
      "x-validate": "Elixir.TalariaWeb.Schemas.V2.Companies.Filters.ScoreRangeFilter"
    },
    "CompanySearchV2ScoringFilter": {
      "additionalProperties": false,
      "description": "Filter companies by their AI score under one scoring model.\n\nCompanies with no score under `model_id` are excluded. Scores are read from\nthe model's most recent published snapshot, so they can differ slightly from\nthe live scores returned by `POST /v2/companies/score`.\n",
      "properties": {
        "fit_score": {
          "$ref": "#/$defs/CompanySearchV2ScoreRangeFilter"
        },
        "intent_score": {
          "$ref": "#/$defs/CompanySearchV2ScoreRangeFilter"
        },
        "model_id": {
          "description": "The scoring model to filter on. Get available ids from GET /v2/scoring/models.",
          "type": "string",
          "x-struct": null,
          "x-validate": null
        },
        "need_score": {
          "$ref": "#/$defs/CompanySearchV2ScoreRangeFilter"
        },
        "tier": {
          "description": "Match any of these tiers",
          "items": {
            "enum": [
              "A",
              "B",
              "C",
              "D",
              "F",
              "DQ"
            ],
            "type": "string",
            "x-struct": null,
            "x-validate": null
          },
          "minItems": 1,
          "type": "array",
          "x-struct": null,
          "x-validate": null
        },
        "total_score": {
          "$ref": "#/$defs/CompanySearchV2ScoreRangeFilter"
        }
      },
      "required": [
        "model_id"
      ],
      "title": "CompanySearchV2ScoringFilter",
      "type": "object",
      "x-struct": "Elixir.TalariaWeb.Schemas.V2.Companies.Filters.Scoring",
      "x-validate": null
    },
    "CompanySearchV2SignedRangeFilter": {
      "additionalProperties": false,
      "description": "Range filter object allowing negative bounds. At least one of min or max is required. When both are provided, min must be less than or equal to max.",
      "minProperties": 1,
      "properties": {
        "max": {
          "description": "Maximum value (may be negative)",
          "type": "integer",
          "x-struct": null,
          "x-validate": null
        },
        "min": {
          "description": "Minimum value (may be negative)",
          "type": "integer",
          "x-struct": null,
          "x-validate": null
        }
      },
      "title": "CompanySearchV2SignedRangeFilter",
      "type": "object",
      "x-struct": "Elixir.TalariaWeb.Schemas.V2.Companies.Filters.SignedRangeFilter",
      "x-validate": "Elixir.TalariaWeb.Schemas.V2.Companies.Filters.SignedRangeFilter"
    },
    "CompanySearchV2Sort": {
      "additionalProperties": false,
      "description": "A sort object for company search results",
      "properties": {
        "direction": {
          "$ref": "#/$defs/CompanySearchV2SortDirection"
        },
        "field": {
          "$ref": "#/$defs/CompanySearchV2SortFieldNames"
        }
      },
      "required": [
        "field",
        "direction"
      ],
      "title": "CompanySearchV2Sort",
      "type": "object",
      "x-struct": "Elixir.TalariaWeb.Schemas.V2.Companies.Search.Sort",
      "x-validate": null
    },
    "CompanySearchV2SortDirection": {
      "default": "ASC",
      "description": "Sort direction",
      "enum": [
        "ASC",
        "DESC"
      ],
      "title": "CompanySearchV2SortDirection",
      "type": "string",
      "x-struct": "Elixir.TalariaWeb.Schemas.V2.Companies.Search.SortDirection",
      "x-validate": null
    },
    "CompanySearchV2SortFieldNames": {
      "description": "Allowed fields to sort by. Includes ranking signals that are filterable/sortable but not returned as columns. Score fields require filters.scoring.model_id and must be the first sort.",
      "enum": [
        "id",
        "name",
        "domain",
        "domain_normalized",
        "ai_maturity_score",
        "ai_maturity_rank",
        "ai_maturity_6m_delta",
        "genai_intent_score",
        "current_products_used_cloud_percent",
        "cloud_stack_percent_change",
        "total_score",
        "fit_score",
        "need_score",
        "intent_score"
      ],
      "title": "CompanySearchV2SortFieldNames",
      "type": "string",
      "x-struct": "Elixir.TalariaWeb.Schemas.V2.Companies.Search.SortFieldNames",
      "x-validate": null
    },
    "CompanySearchV2Sorts": {
      "default": [],
      "description": "List of sort objects",
      "items": {
        "$ref": "#/$defs/CompanySearchV2Sort"
      },
      "title": "CompanySearchV2Sorts",
      "type": "array",
      "x-struct": "Elixir.TalariaWeb.Schemas.V2.Companies.Search.Sorts",
      "x-validate": null
    },
    "CompanySearchV2SpendFilter": {
      "additionalProperties": false,
      "description": "Filter by USD spent by a company in certain categories.",
      "minProperties": 2,
      "properties": {
        "categories": {
          "$ref": "#/$defs/AnyIdInclusionFilter"
        },
        "range": {
          "$ref": "#/$defs/CompanySearchV2RangeFilter"
        }
      },
      "required": [
        "categories",
        "range"
      ],
      "title": "CompanySearchV2SpendFilter",
      "type": "object",
      "x-struct": "Elixir.TalariaWeb.Schemas.V2.Companies.Filters.SpendFilter",
      "x-validate": null
    },
    "CountryCodeFilter": {
      "description": "Inclusion filter object (using string names as IDs)",
      "properties": {
        "ids": {
          "description": "Country Codes",
          "items": {
            "maxLength": 2,
            "minLength": 2,
            "type": "string",
            "x-struct": null,
            "x-validate": null
          },
          "minItems": 1,
          "type": "array",
          "x-struct": null,
          "x-validate": null
        },
        "inclusion_method": {
          "$ref": "#/$defs/AnyNoneInclusionMethod"
        }
      },
      "required": [
        "ids",
        "inclusion_method"
      ],
      "title": "CountryCodeFilter",
      "type": "object",
      "x-struct": "Elixir.TalariaWeb.Schemas.V1.Filters.CountryCodeFilter",
      "x-validate": null
    },
    "CountryCodesFilter": {
      "description": "Filter by the country in which a company is based.\nAccepts a list of alpha-2 codes along with an inclusion method, with the inclusion method specifying whether companies should be included or excluded from the results based on the provided country codes.\nAlpha-2 codes are based on the ISO 3166 international standard. A complete list can be found here: https://www.iso.org/obp/ui/#search\",\n",
      "items": {
        "$ref": "#/$defs/CountryCodeFilter"
      },
      "minItems": 1,
      "title": "CountryCodesFilter",
      "type": "array",
      "x-struct": "Elixir.TalariaWeb.Schemas.V1.Filters.CountryCodesFilter",
      "x-validate": null
    },
    "Id": {
      "description": "A unique hexadecimal identifier for the desired field.",
      "oneOf": [
        {
          "type": "string",
          "x-struct": null,
          "x-validate": null
        },
        {
          "type": "integer",
          "x-struct": null,
          "x-validate": null
        }
      ],
      "title": "Id",
      "x-struct": null,
      "x-validate": "Elixir.TalariaWeb.Schemas.Common.Id"
    },
    "IdInclusionFilter": {
      "description": "Inclusion filter object for use with hex encoded IDs",
      "properties": {
        "ids": {
          "description": "Hex Encoded IDs",
          "items": {
            "$ref": "#/$defs/Id"
          },
          "minItems": 1,
          "type": "array",
          "x-struct": null,
          "x-validate": null
        },
        "inclusion_method": {
          "$ref": "#/$defs/InclusionMethod"
        }
      },
      "required": [
        "ids",
        "inclusion_method"
      ],
      "title": "IdInclusionFilter",
      "type": "object",
      "x-struct": "Elixir.TalariaWeb.Schemas.V1.Filters.IdInclusionFilter",
      "x-validate": null
    },
    "InclusionMethod": {
      "description": "Inclusion method",
      "enum": [
        "ANY_PRESENT",
        "ALL_PRESENT",
        "NONE_PRESENT"
      ],
      "title": "InclusionMethod",
      "type": "string",
      "x-struct": "Elixir.TalariaWeb.Schemas.V1.Filters.InclusionMethod",
      "x-validate": null
    },
    "IntentLocationFilter": {
      "description": "Intent location filter — at least one of state_ids, region_names, or country_alpha2s required",
      "minProperties": 1,
      "properties": {
        "country_alpha2s": {
          "description": "Country Alpha-2 code filters",
          "items": {
            "$ref": "#/$defs/CountryCodeFilter"
          },
          "minItems": 1,
          "type": [
            "array",
            "null"
          ],
          "x-struct": null,
          "x-validate": null
        },
        "region_names": {
          "$ref": "#/$defs/AnyNameInclusionFilter"
        },
        "state_ids": {
          "$ref": "#/$defs/IdInclusionFilter"
        }
      },
      "title": "IntentLocationFilter",
      "type": "object",
      "x-struct": "Elixir.TalariaWeb.Schemas.V1.Company.Filters.Intent.IntentLocationFilter",
      "x-validate": null
    },
    "IntentSignalScoreFilter": {
      "default": "HIGH",
      "description": "Filter based on the signal score for an intent signal.\nAccepts either \"MEDIUM\" (from 65 to 84), and \"HIGH\" (from 85 to 100).\n",
      "enum": [
        "MEDIUM",
        "HIGH"
      ],
      "title": "IntentSignalScoreFilter",
      "type": "string",
      "x-struct": "Elixir.TalariaWeb.Schemas.V1.Company.Filters.Intent.IntentSignalScoreFilter",
      "x-validate": null
    },
    "IntentTopicsFilter": {
      "allOf": [
        {
          "$ref": "#/$defs/AnyAllIdInclusionFilter"
        }
      ],
      "description": "Filter based on the topics associated with an intent signal.",
      "title": "IntentTopicsFilter",
      "type": "object",
      "x-struct": "Elixir.TalariaWeb.Schemas.V1.Company.Filters.Intent.IntentTopicsFilter",
      "x-validate": null
    },
    "MaxFilter": {
      "description": "Maximum range filter object",
      "maxProperties": 1,
      "properties": {
        "max": {
          "description": "Maximum value",
          "minimum": 0,
          "type": "integer",
          "x-struct": null,
          "x-validate": null
        }
      },
      "required": [
        "max"
      ],
      "title": "MaxFilter",
      "type": "object",
      "x-struct": "Elixir.TalariaWeb.Schemas.V1.Filters.MaxFilter",
      "x-validate": null
    },
    "MinFilter": {
      "description": "Minimum range filter object",
      "maxProperties": 1,
      "properties": {
        "min": {
          "description": "Minimum value",
          "minimum": 0,
          "type": "integer",
          "x-struct": null,
          "x-validate": null
        }
      },
      "required": [
        "min"
      ],
      "title": "MinFilter",
      "type": "object",
      "x-struct": "Elixir.TalariaWeb.Schemas.V1.Filters.MinFilter",
      "x-validate": null
    },
    "MinMaxFilter": {
      "description": "MinMax range filter object",
      "properties": {
        "max": {
          "description": "Maximum value",
          "minimum": 0,
          "type": "integer",
          "x-struct": null,
          "x-validate": null
        },
        "min": {
          "description": "Minimum value",
          "minimum": 0,
          "type": "integer",
          "x-struct": null,
          "x-validate": null
        }
      },
      "required": [
        "min",
        "max"
      ],
      "title": "MinMaxFilter",
      "type": "object",
      "x-struct": "Elixir.TalariaWeb.Schemas.V1.Filters.MinMaxFilter",
      "x-validate": null
    },
    "ProductAttributesFilterCompanyInstalls": {
      "description": "Filter based on the product attributes associated with an install record, with optional install age sub-filters.",
      "properties": {
        "ids": {
          "description": "Product Attribute IDs",
          "items": {
            "type": "integer",
            "x-struct": null,
            "x-validate": null
          },
          "minItems": 1,
          "type": "array",
          "x-struct": null,
          "x-validate": null
        },
        "inclusion_method": {
          "$ref": "#/$defs/InclusionMethod"
        },
        "install_age": {
          "$ref": "#/$defs/RangeFilter"
        },
        "install_age_months": {
          "$ref": "#/$defs/RangeFilter"
        }
      },
      "required": [
        "ids",
        "inclusion_method"
      ],
      "title": "ProductAttributesFilterCompanyInstalls",
      "type": "object",
      "x-struct": "Elixir.TalariaWeb.Schemas.V1.Company.Filters.Installs.ProductAttributesFilter",
      "x-validate": null
    },
    "ProductCategoriesFilter": {
      "description": "Filter based on the product category an install record is classified under, with optional FAI and install age sub-filters.",
      "properties": {
        "fai": {
          "description": "Functional Area Intelligence filter — at least one of departments or roles required",
          "minProperties": 1,
          "properties": {
            "departments": {
              "$ref": "#/$defs/IdInclusionFilter"
            },
            "roles": {
              "$ref": "#/$defs/IdInclusionFilter"
            }
          },
          "type": "object",
          "x-struct": null,
          "x-validate": null
        },
        "ids": {
          "description": "Product Category IDs (hex encoded)",
          "items": {
            "$ref": "#/$defs/Id"
          },
          "minItems": 1,
          "type": "array",
          "x-struct": null,
          "x-validate": null
        },
        "inclusion_method": {
          "$ref": "#/$defs/InclusionMethod"
        },
        "install_age": {
          "$ref": "#/$defs/RangeFilter"
        },
        "install_age_months": {
          "$ref": "#/$defs/RangeFilter"
        }
      },
      "required": [
        "ids",
        "inclusion_method"
      ],
      "title": "ProductCategoriesFilter",
      "type": "object",
      "x-struct": "Elixir.TalariaWeb.Schemas.V1.Company.Filters.Installs.ProductCategoriesFilter",
      "x-validate": null
    },
    "ProductFilter": {
      "description": "Filter based on the associated products for an install record, with optional FAI, install age, and intensity sub-filters.",
      "properties": {
        "fai": {
          "description": "Functional Area Intelligence filter — at least one of departments or roles required",
          "minProperties": 1,
          "properties": {
            "departments": {
              "$ref": "#/$defs/IdInclusionFilter"
            },
            "roles": {
              "$ref": "#/$defs/IdInclusionFilter"
            }
          },
          "type": "object",
          "x-struct": null,
          "x-validate": null
        },
        "ids": {
          "description": "Product IDs",
          "items": {
            "type": "integer",
            "x-struct": null,
            "x-validate": null
          },
          "minItems": 1,
          "type": "array",
          "x-struct": null,
          "x-validate": null
        },
        "inclusion_method": {
          "$ref": "#/$defs/InclusionMethod"
        },
        "install_age": {
          "$ref": "#/$defs/RangeFilter"
        },
        "install_age_months": {
          "$ref": "#/$defs/RangeFilter"
        },
        "intensity": {
          "$ref": "#/$defs/RangeFilter"
        }
      },
      "required": [
        "ids",
        "inclusion_method"
      ],
      "title": "ProductFilter",
      "type": "object",
      "x-struct": "Elixir.TalariaWeb.Schemas.V1.Company.Filters.Installs.ProductFilter",
      "x-validate": null
    },
    "RangeFilter": {
      "oneOf": [
        {
          "$ref": "#/$defs/MinFilter"
        },
        {
          "$ref": "#/$defs/MaxFilter"
        },
        {
          "$ref": "#/$defs/MinMaxFilter"
        }
      ],
      "title": "RangeFilter",
      "type": "object",
      "x-struct": "Elixir.TalariaWeb.Schemas.V1.Filters.RangeFilter",
      "x-validate": null
    },
    "VendorFilter": {
      "description": "Filter based on the associated vendor for an install record, with optional FAI, install age, and product count sub-filters.",
      "properties": {
        "fai": {
          "description": "Functional Area Intelligence filter — at least one of departments or roles required",
          "minProperties": 1,
          "properties": {
            "departments": {
              "$ref": "#/$defs/IdInclusionFilter"
            },
            "roles": {
              "$ref": "#/$defs/IdInclusionFilter"
            }
          },
          "type": "object",
          "x-struct": null,
          "x-validate": null
        },
        "ids": {
          "description": "Vendor IDs",
          "items": {
            "type": "integer",
            "x-struct": null,
            "x-validate": null
          },
          "minItems": 1,
          "type": "array",
          "x-struct": null,
          "x-validate": null
        },
        "inclusion_method": {
          "$ref": "#/$defs/InclusionMethod"
        },
        "install_age": {
          "$ref": "#/$defs/RangeFilter"
        },
        "install_age_months": {
          "$ref": "#/$defs/RangeFilter"
        },
        "product_count": {
          "$ref": "#/$defs/RangeFilter"
        }
      },
      "required": [
        "ids",
        "inclusion_method"
      ],
      "title": "VendorFilter",
      "type": "object",
      "x-struct": "Elixir.TalariaWeb.Schemas.V1.Company.Filters.Installs.VendorFilter",
      "x-validate": null
    }
  }
}