HG Insights Contracts API

The Contracts API from HG Insights, for contracts.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 2

POST /data-api/v2/contracts/search Search Contracts #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/hg-insights:hg-insights-contracts-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

hg-insights-contracts-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  license:
    name: HG Insights terms of service
    url: https://hginsights.com/contact-hg/terms-of-service
  title: HG Insights Contracts API
  version: ''
servers:
- url: https://api.hginsights.com
  variables: {}
security:
- authorization: []
tags:
- name: Contracts
paths:
  /data-api/v2/contracts/search:
    post:
      callbacks: {}
      description: Search and filter contracts. Returns a paginated list of contracts matching the filter criteria.
      operationId: search_contracts
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContractSearchRequest'
        description: Search Request
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractSearchResponse'
          description: Search Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
          description: Unauthorized
        '402':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentRequiredResponse'
          description: Payment Required
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonErrorResponse'
          description: Unprocessable Entity
      summary: Search Contracts
      tags:
      - Contracts
  /data-api/v2/contracts/search/estimate:
    post:
      callbacks: {}
      description: '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.'
      operationId: estimate_contract_search
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContractSearchEstimateRequest'
        description: Estimate Request
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractSearchEstimateResponse'
          description: Estimate Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
          description: Unauthorized
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonErrorResponse'
          description: Unprocessable Entity
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceUnavailableResponse'
          description: Service Unavailable
      summary: Estimate credit cost for Contract Search
      tags:
      - Contracts
components:
  schemas:
    ContractSearchV2DateRange:
      additionalProperties: false
      description: Date range filter with optional min and max bounds.
      properties:
        max:
          description: Maximum date (inclusive, ISO 8601)
          format: date
          type: string
          x-struct: null
          x-validate: null
        min:
          description: Minimum date (inclusive, ISO 8601)
          format: date
          type: string
          x-struct: null
          x-validate: null
      title: ContractSearchV2DateRange
      type: object
      x-struct: Elixir.TalariaWeb.Schemas.V2.Contracts.Search.DateRange
      x-validate: null
    ContractSearchEstimateRequest:
      additionalProperties: false
      description: Estimate credit cost for a contract search. Only filters are required.
      example:
        filters:
          company_ids:
          - 1698C53EBC888758570396E0334965C1
      properties:
        filters:
          $ref: '#/components/schemas/ContractSearchV2Filters'
      required:
      - filters
      title: ContractSearchEstimateRequest
      type: object
      x-struct: Elixir.TalariaWeb.Schemas.V2.Contracts.Search.EstimateRequest
      x-validate: null
    ContractSearchRequest:
      additionalProperties: false
      description: Search and filter contracts. Returns paginated matching contracts.
      example:
        filters:
          company_ids:
          - 1698C53EBC888758570396E0334965C1
        limit: 10
        offset: 0
        sorts:
        - direction: DESC
          field: end_date
      properties:
        filters:
          $ref: '#/components/schemas/ContractSearchV2Filters'
        global_settings:
          $ref: '#/components/schemas/GlobalSettings'
        limit:
          default: 10
          description: Maximum number of contracts to return
          maximum: 100
          minimum: 1
          type: integer
          x-struct: null
          x-validate: null
        offset:
          default: 0
          description: Number of contracts to skip
          minimum: 0
          type: integer
          x-struct: null
          x-validate: null
        sorts:
          $ref: '#/components/schemas/ContractSearchV2Sorts'
        tracking_context:
          description: Tracking context for analytics and auditing
          type: object
          x-struct: null
          x-validate: null
      required:
      - filters
      title: ContractSearchRequest
      type: object
      x-struct: Elixir.TalariaWeb.Schemas.V2.Contracts.Search.Request
      x-validate: null
    HexId:
      description: Hexadecimal identifier (unsigned 128-bit base 16 integer)
      example: 1698C53EBC888758570396E0334965C1
      title: HexId
      type: string
      x-struct: Elixir.TalariaWeb.Schemas.V2.Id
      x-validate: Elixir.TalariaWeb.Schemas.V2.Id
    ServiceUnavailableResponse:
      properties:
        errors:
          items:
            properties:
              detail:
                example: Unable to verify credit availability. Please try again later. If the error persists, contact customersupport@hginsights.com.
                type: string
                x-struct: null
                x-validate: null
              source:
                type:
                - string
                - 'null'
                x-struct: null
                x-validate: null
              title:
                example: Service unavailable
                type: string
                x-struct: null
                x-validate: null
            required:
            - title
            - detail
            type: object
            x-struct: null
            x-validate: null
          type: array
          x-struct: null
          x-validate: null
      title: ServiceUnavailableResponse
      type: object
      x-struct: Elixir.TalariaWeb.Schemas.V2.Error.ServiceUnavailableResponse
      x-validate: null
    ContractSearchV2Sorts:
      default: []
      description: List of sort objects
      items:
        $ref: '#/components/schemas/ContractSearchV2Sort'
      title: ContractSearchV2Sorts
      type: array
      x-struct: Elixir.TalariaWeb.Schemas.V2.Contracts.Search.Sorts
      x-validate: null
    ContractSearchV2Filters:
      additionalProperties: false
      description: Filters for contract search.
      properties:
        active_only:
          description: When true, return only active contracts
          type: boolean
          x-struct: null
          x-validate: null
        active_status:
          description: Filter by active status (e.g., 'Active', 'Expired')
          type: string
          x-struct: null
          x-validate: null
        announcement_date:
          $ref: '#/components/schemas/ContractSearchV2DateRange'
        category_names:
          description: Filter by category names (max 10)
          items:
            type: string
            x-struct: null
            x-validate: null
          maxItems: 10
          type: array
          x-struct: null
          x-validate: null
        company_ids:
          description: List of HG company IDs (1–1000). Use a single-element list to search one company.
          items:
            $ref: '#/components/schemas/HexId'
          maxItems: 1000
          minItems: 1
          type: array
          x-struct: null
          x-validate: null
        deal_value_range:
          $ref: '#/components/schemas/ContractSearchV2DealValueRange'
        end_date:
          $ref: '#/components/schemas/ContractSearchV2DateRange'
        signing_country_names:
          description: Filter by signing country names (max 10)
          items:
            type: string
            x-struct: null
            x-validate: null
          maxItems: 10
          type: array
          x-struct: null
          x-validate: null
        start_date:
          $ref: '#/components/schemas/ContractSearchV2DateRange'
        vendor_hg_ids:
          description: Filter by vendor HG IDs
          items:
            $ref: '#/components/schemas/HexId'
          type: array
          x-struct: null
          x-validate: null
        vendor_names:
          description: Filter by vendor names (max 10)
          items:
            type: string
            x-struct: null
            x-validate: null
          maxItems: 10
          type: array
          x-struct: null
          x-validate: null
      title: ContractSearchV2Filters
      type: object
      x-struct: Elixir.TalariaWeb.Schemas.V2.Contracts.Search.Filters
      x-validate: null
    ContractSearchV2SortDirection:
      default: ASC
      description: Sort direction
      enum:
      - ASC
      - DESC
      title: ContractSearchV2SortDirection
      type: string
      x-struct: Elixir.TalariaWeb.Schemas.V2.Contracts.Search.SortDirection
      x-validate: null
    JsonErrorResponse:
      properties:
        errors:
          items:
            properties:
              detail:
                example: null value where string expected
                type: string
                x-struct: null
                x-validate: null
              source:
                properties:
                  pointer:
                    example: /data/attributes/petName
                    type: string
                    x-struct: null
                    x-validate: null
                required:
                - pointer
                type: object
                x-struct: null
                x-validate: null
              title:
                example: Invalid value
                type: string
                x-struct: null
                x-validate: null
            required:
            - title
            - source
            - detail
            type: object
            x-struct: null
            x-validate: null
          type: array
          x-struct: null
          x-validate: null
      required:
      - errors
      title: JsonErrorResponse
      type: object
      x-struct: Elixir.OpenApiSpex.JsonErrorResponse
      x-validate: null
    ContractSearchV2Sort:
      additionalProperties: false
      description: A sort object for contract search results
      example:
        direction: DESC
        field: end_date
      properties:
        direction:
          $ref: '#/components/schemas/ContractSearchV2SortDirection'
        field:
          enum:
          - deal_value
          - end_date
          - start_date
          - announcement_date
          type: string
          x-struct: null
          x-validate: null
      required:
      - field
      - direction
      title: ContractSearchV2Sort
      type: object
      x-struct: Elixir.TalariaWeb.Schemas.V2.Contracts.Search.Sort
      x-validate: null
    PaymentRequiredResponse:
      properties:
        errors:
          items:
            properties:
              detail:
                example: Your organization has exhausted its available credits. Contact customersupport@hginsights.com.
                type: string
                x-struct: null
                x-validate: null
              source:
                type:
                - string
                - 'null'
                x-struct: null
                x-validate: null
              title:
                example: Credits exhausted
                type: string
                x-struct: null
                x-validate: null
            required:
            - title
            - detail
            type: object
            x-struct: null
            x-validate: null
          type: array
          x-struct: null
          x-validate: null
      title: PaymentRequiredResponse
      type: object
      x-struct: Elixir.TalariaWeb.Schemas.V2.Error.PaymentRequiredResponse
      x-validate: null
    ContractSearchV2DealValueRange:
      additionalProperties: false
      description: Deal value range filter with optional min and max bounds.
      properties:
        max:
          description: Maximum deal value (inclusive)
          type: integer
          x-struct: null
          x-validate: null
        min:
          description: Minimum deal value (inclusive)
          type: integer
          x-struct: null
          x-validate: null
      title: ContractSearchV2DealValueRange
      type: object
      x-struct: Elixir.TalariaWeb.Schemas.V2.Contracts.Search.DealValueRange
      x-validate: null
    UnauthorizedResponse:
      properties:
        errors:
          items:
            properties:
              detail:
                example: The api key provided is not valid
                type: string
                x-struct: null
                x-validate: null
              source:
                type:
                - string
                - 'null'
                x-struct: null
                x-validate: null
              title:
                example: Unauthorized
                type: string
                x-struct: null
                x-validate: null
            required:
            - title
            - detail
            type: object
            x-struct: null
            x-validate: null
          type: array
          x-struct: null
          x-validate: null
      title: UnauthorizedResponse
      type: object
      x-struct: Elixir.TalariaWeb.Schemas.V2.Error.UnauthorizedResponse
      x-validate: null
    GlobalSettings:
      additionalProperties: false
      default:
        hex_encode_ids: true
        install_recency: 36
        localize_installs: true
      description: GlobalSettings object
      example:
        hex_encode_ids: true
        install_recency: 12
        localize_installs: false
      properties:
        hex_encode_ids:
          default: true
          description: Whether to hex encode IDs in the request body
          type: boolean
          x-struct: null
          x-validate: null
        install_recency:
          default: 36
          description: Months of product install lookback
          type: integer
          x-struct: null
          x-validate: null
        localize_installs:
          default: true
          description: Only match records where installs are within the same country as the company
          type: boolean
          x-struct: null
          x-validate: null
        org_id:
          description: Organization ID
          type:
          - string
          - 'null'
          x-struct: null
          x-validate: null
      title: GlobalSettings
      type: object
      x-struct: Elixir.TalariaWeb.Schemas.V2.GlobalSettings
      x-validate: null
    ContractSearchEstimateResponse:
      description: Estimated credit cost for a contract search request.
      example:
        available_credits: 1000
        credits_estimate: 25
        sufficient_credits: true
      properties:
        available_credits:
          description: Credits currently available to the organization
          type: integer
          x-struct: null
          x-validate: null
        credits_estimate:
          description: Estimated credits required to fulfill the request
          format: double
          type: number
          x-struct: null
          x-validate: null
        sufficient_credits:
          description: Whether available credits cover the estimate
          type: boolean
          x-struct: null
          x-validate: null
      required:
      - credits_estimate
      - available_credits
      - sufficient_credits
      title: ContractSearchEstimateResponse
      type: object
      x-struct: Elixir.TalariaWeb.Schemas.V2.Contracts.Search.EstimateResponse
      x-validate: null
    ContractSearchResponse:
      description: Paginated list of contracts matching the search criteria.
      example:
        count: 1
        records:
        - announcement_date: '2025-04-23'
          bid_process: Competitive
          contract_event: New
          contract_structure: Single Vendor
          customer_drivers: Business Continuity (Run the Business)
          customer_name: LATVENERGO AS
          deal_value: 2554421
          end_date: '2030-04-17'
          id: 2F730FBEB8C74FBB753736C5CF74F5B8
          larger_contract: false
          performance_criteria: Consistent Quality
          pricing_structure: Incentive Contracts
          primary_vendor:
            name: Inavitas
          service_lines:
          - delivery: On Premise
            geographic_scope: Latvia
            service_types: Application Management
          signing_country: Latvia
          start_date: '2025-04-17'
          summary: Inavitas Enerji has been selected by Latvenergo of Latvia for provision of renewable electric energy resource management system implementation and five-year support. The contract was awarded on April 17, 2025 which is worth EUR2.2m ($2.5m).
          term: 60
          title: Inavitas Enerji secured an IT service contract from Latvenergo of Latvia
      properties:
        count:
          description: Total number of contracts matching the filters (before pagination)
          type: integer
          x-struct: null
          x-validate: null
        records:
          description: List of contract records matching the search criteria
          items:
            type: object
            x-struct: null
            x-validate: null
          type: array
          x-struct: null
          x-validate: null
      required:
      - count
      - records
      title: ContractSearchResponse
      type: object
      x-struct: Elixir.TalariaWeb.Schemas.V2.Contracts.Search.Response
      x-validate: null
  securitySchemes:
    authorization:
      bearerFormat: API_KEY
      scheme: bearer
      type: http