# Estimate credit cost for company enrichment

Returns the estimated credit cost for a company enrichment request without consuming any credits
or returning data. Use the same parameters as the enrich endpoint.

Endpoint: POST /data-api/v2/companies/enrich/estimate
Security: authorization

## Request fields (application/json):

  - `companies` (object, required)
    Filter companies by IDs or domains (mutually exclusive)
    Example: {"ids":["E48EDEB162A5FBFDAF2DCF707079F8F","1698C53EBC888758570396E0334965C1"]}

  - `companies.domains` (array)
    Array of company domains (e.g., example.com)

  - `companies.ids` (array)
    Array of hex-encoded company IDs

  - `contracts` (object)
    Configuration for contracts data in enrich request

  - `contracts.filters` (object)
    Filters for contracts data

  - `contracts.filters.active_only` (boolean)
    When true, return only active contracts

  - `contracts.filters.vendor_names` (array)
    Filter by vendor names (max 10)

  - `contracts.limit` (integer)
    Maximum number of contracts per company

  - `contracts.offset` (integer)
    Number of contracts to skip

  - `fields` (array, required)
    Which data categories to include in the response

  - `filters` (object)
    Filters for enrich request

  - `filters.ai_spend` (object)
    Filters for AI spend data
    Example: {"categories":{"ids":["32144E4D868532F1D3A1264DE832ED2F"],"names":["AI Hardware"]}}

  - `filters.ai_spend.categories` (object)
    Filter by hex-encoded IDs and/or names (assumes ANY_PRESENT inclusion method)

  - `filters.ai_spend.categories.ids` (array)
    Array of hex-encoded IDs

  - `filters.ai_spend.categories.names` (array)
    Array of entity names for substring matching (case-insensitive)

  - `filters.mentions` (object)
    Filters for mentions data
    Example: {"granularity":"global","mention_categories":{"ids":["SW036"]},"mentions":{"ids":[24290]}}

  - `filters.mentions.country` (object)
    Filter by country

  - `filters.mentions.country.codes` (array)
    Array of ISO 3166-1 alpha-2 country codes (e.g., US, GB, DE)

  - `filters.mentions.granularity` (string)
    Controls the shape of returned mentions. "country" returns one row per mention per country. "global" returns deduplicated rows per mention with country_code null.
    Enum: "global", "country"

  - `filters.mentions.localized` (boolean)
    DEPRECATED: use `granularity` instead. When `granularity` is provided, it takes precedence.

  - `filters.mentions.mention_attributes` (object)
    Filter by numeric IDs and/or names (assumes ANY_PRESENT inclusion method)

  - `filters.mentions.mention_attributes.ids` (array)
    Array of numeric IDs

  - `filters.mentions.mention_attributes.names` (array)
    Array of entity names for substring matching (case-insensitive)

  - `filters.mentions.mention_categories` (object)
    Filter by string IDs and/or names (assumes ANY_PRESENT inclusion method)

  - `filters.mentions.mention_categories.ids` (array)
    Array of string IDs

  - `filters.mentions.mention_categories.names` (array)
    Array of entity names for substring matching (case-insensitive)

  - `filters.mentions.mention_last_verified_date` (object)
    Filter by product last verified date range (inclusive)

  - `filters.mentions.mention_last_verified_date.max` (string)
    Maximum last verified date (inclusive), e.g. 2024-12-31

  - `filters.mentions.mention_last_verified_date.min` (string)
    Minimum last verified date (inclusive), e.g. 2024-01-01

  - `filters.spend` (object)
    Filters for spend data
    Example: {"categories":{"ids":["32144E4D868532F1D3A1264DE832ED2F"],"names":["Cloud"]}}

  - `filters.technographics` (object)
    Filters for technographics data
    Example: {"country":{"codes":["US"]},"installs":{"granularity":"country"},"product_attributes":{"ids":[222]},"product_categories":{"ids":["319D067B229178F03BCFA1DA4AC4DEDE"],"names":["CRM"]},"product_last_veri…

  - `filters.technographics.installs` (object)
    Install-level filter options

  - `filters.technographics.installs.granularity` (string)
    Controls the shape of returned installs. "country" returns one row per product per country with `country_code` populated (across all countries the company has installs in, unless restricted by the country code filter). "global" returns deduplicated rows per product with `country_code` null. When omitted, behavior falls back to `localized`. Takes precedence over `localized` when provided.
    Enum: "global", "country"

  - `filters.technographics.installs.localized` (boolean)
    DEPRECATED: use `granularity` instead. Only match records where installs are within the same country as the company. Overridden by country code filter when provided. When `granularity` is provided, it takes precedence over this field.

  - `filters.technographics.product_attributes` (object)
    Filter by product attribute IDs (assumes ANY_PRESENT inclusion method)

  - `filters.technographics.product_attributes.ids` (array, required)
    Array of product attribute IDs

  - `pagination` (object)
    Pagination parameters for companies and nested data

  - `pagination.ai_spend` (object)
    Pagination parameters for spend data. Set paginate to false to return all categories without pagination (limit and offset are ignored).

  - `pagination.ai_spend.limit` (integer)
    The number of records to return in the request.

  - `pagination.ai_spend.offset` (integer)
    Used for paginating records.

  - `pagination.ai_spend.paginate` (boolean)
    When false, returns all spend categories without pagination. The limit and offset parameters are ignored.

  - `pagination.mentions` (object)
    Pagination parameters for mentions data

  - `pagination.mentions.limit` (integer)
    The number of technographics records to return in the request.

  - `pagination.mentions.sort` (string)
    How to order mentions results. `intensity`: highest-intensity mentions first (default). `last_seen`: most recently verified mentions first.
    Enum: "intensity", "last_seen"

  - `pagination.technographics` (object)
    Pagination parameters for technographics data

  - `pagination.technographics.sort` (string)
    How to order technographics results. `intensity`: highest-intensity products first (default). `last_seen`: most recently verified products first, i.e. sorted by the `product_last_verified_date` response field.
    Enum: "intensity", "last_seen"

## Response 200 fields (application/json):

  - `available_credits` (integer, required)
    Remaining credits in cycle

  - `credits_estimate` (number, required)
    Max credits that will be consumed

  - `details` (object, required)
    Per-data-type breakdown (only includes requested field groups)

  - `details.ai_maturity` (object)

  - `details.ai_maturity.credits` (number)
    Credits for this data type

  - `sufficient_credits` (boolean, required)
    Whether org has enough credits

## Response 401 fields (application/json):

  - `errors` (array)

  - `errors.detail` (string, required)
    Example: The api key provided is not valid

  - `errors.source` (string)

  - `errors.title` (string, required)
    Example: Unauthorized

## Response 422 fields (application/json):

  - `errors` (array, required)

  - `errors.detail` (string, required)
    Example: null value where string expected

  - `errors.source` (object, required)

  - `errors.source.pointer` (string, required)
    Example: /data/attributes/petName

  - `errors.title` (string, required)
    Example: Invalid value

## Response 503 fields (application/json):

  - `errors` (array)

  - `errors.detail` (string, required)
    Example: Unable to verify credit availability. Please try again later. If the error persists, contact customersupport@hginsights.com.

  - `errors.source` (string)

  - `errors.title` (string, required)
    Example: Service unavailable

