# Estimate credit cost for Contract Search

Returns the estimated credit cost for a contract search request without consuming any
credits or returning data. Use the same filter parameters as the `/search` endpoint.

Endpoint: POST /data-api/v2/contracts/search/estimate
Security: authorization

## Security:

  - `authorization` (unknown)
    http bearer API_KEY

## Request body:

  - `application/json` (unknown)
    Estimate Request

## Request fields (application/json):

  - `filters` (object, required)
    Filters for contract search.

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

  - `filters.active_status` (string)
    Filter by active status (e.g., 'Active', 'Expired')

  - `filters.announcement_date` (object)
    Date range filter with optional min and max bounds.

  - `filters.announcement_date.max` (string)
    Maximum date (inclusive, ISO 8601)

  - `filters.announcement_date.min` (string)
    Minimum date (inclusive, ISO 8601)

  - `filters.category_names` (array)
    Filter by category names (max 10)

  - `filters.company_ids` (array)
    List of HG company IDs (1–1000). Use a single-element list to search one company.

  - `filters.deal_value_range` (object)
    Deal value range filter with optional min and max bounds.

  - `filters.deal_value_range.max` (integer)
    Maximum deal value (inclusive)

  - `filters.deal_value_range.min` (integer)
    Minimum deal value (inclusive)

  - `filters.signing_country_names` (array)
    Filter by signing country names (max 10)

  - `filters.vendor_hg_ids` (array)
    Filter by vendor HG IDs

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

## Response 200:

  - `200` (unknown)
    Estimate Response

## Response 200 fields (application/json):

  - `available_credits` (integer, required)
    Credits currently available to the organization

  - `credits_estimate` (number, required)
    Estimated credits required to fulfill the request

  - `sufficient_credits` (boolean, required)
    Whether available credits cover the estimate

## Response 401:

  - `401` (unknown)
    Unauthorized

## 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:

  - `422` (unknown)
    Unprocessable Entity

## 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:

  - `503` (unknown)
    Service Unavailable

## 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

