NationGraph Contracts API

The Contracts API from NationGraph — 2 operation(s) for contracts.

Operations 2

GET /api/internal/contracts/{id} Get Contract #
POST /api/internal/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/nationgraph-contracts-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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. See our Privacy Policy and Terms.

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

OpenAPI Specification

nationgraph-contracts-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Nationgraph Accounts Contracts API
  version: 0.2.36
servers:
- url: https://api.nationgraph.com
  description: Base URL declared by the provider in apis.yml (roadmap#122).
tags:
- name: Contracts
paths:
  /api/internal/contracts/{id}:
    get:
      tags:
      - Contracts
      summary: Get Contract
      operationId: get_contract_api_internal_contracts__id__get
      security:
      - HTTPBearer: []
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          title: Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/internal/contracts/search:
    post:
      tags:
      - Contracts
      summary: Search Contracts
      description: 'Search contracts (retool.contract_data).


        Three orthogonal text inputs, AND''d together:


        - ``vendors``: array of vendor terms (weight A in text_search_strict)

        - ``products``: array of product terms (weight B in text_search_strict)

        - ``query``: free-text over raw_text (text_search_prose, english config)


        See ContractSearchFilters docstring for the full syntax. All filters are

        optional — the table is small enough (~7K rows) to allow unbounded scans.'
      operationId: search_contracts_api_internal_contracts_search_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContractSearchFilters'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_ContractResponse_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ContractSearchFilters:
      properties:
        query:
          anyOf:
          - type: string
            maxLength: 2000
          - type: 'null'
          title: Query
          description: 'Free-text search over the contract body (raw_text, english config, stemming on). Supports websearch syntax: quoted phrases, OR, leading ''-'' to exclude.'
        contract_start_after:
          anyOf:
          - type: string
            format: date
          - type: 'null'
          title: Contract Start After
        contract_start_before:
          anyOf:
          - type: string
            format: date
          - type: 'null'
          title: Contract Start Before
        contract_end_after:
          anyOf:
          - type: string
            format: date
          - type: 'null'
          title: Contract End After
        contract_end_before:
          anyOf:
          - type: string
            format: date
          - type: 'null'
          title: Contract End Before
        min_total_acv:
          anyOf:
          - type: number
          - type: 'null'
          title: Min Total Acv
        max_total_acv:
          anyOf:
          - type: number
          - type: 'null'
          title: Max Total Acv
        min_annual_acv:
          anyOf:
          - type: number
          - type: 'null'
          title: Min Annual Acv
        max_annual_acv:
          anyOf:
          - type: number
          - type: 'null'
          title: Max Annual Acv
        institution_ids:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Institution Ids
        states:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: States
        source_tables:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Source Tables
        sort:
          type: string
          enum:
          - relevance
          - contract_start_date_desc
          - contract_start_date_asc
          - contract_end_date_asc
          - contract_end_date_desc
          - total_acv_desc
          - annual_acv_desc
          - created_at_desc
          title: Sort
          default: created_at_desc
        offset:
          type: integer
          title: Offset
          default: 0
        limit:
          type: integer
          title: Limit
          default: 100
      type: object
      title: ContractSearchFilters
      description: "Search filters for contracts (retool.contract_data).\n\nThe vendor + product columns have been removed from contract_data —\nthey now live in sibling tables (``retool.vendors``,\n``retool.vendor_products``). The endpoint currently searches **only**\nthe prose column (``text_search_prose``) over ``raw_text``.\n\nQuery syntax (websearch_to_tsquery, english config — stemming on):\n\n    bare words:    \"granicus laserfiche\"        implicit AND\n    quoted phrase: '\"early termination\"'         exact phrase\n    OR:            \"granicus OR tyler\"           literal OR keyword\n    exclude:       \"granicus -laserfiche\"        prefix - to exclude\n\nAll filters are optional. ~7K rows is small enough to permit unbounded\nscans, but supplying at least a query or institution scope is\nrecommended.\n\nVendor / product search will be re-added when the new ``retool.vendors``\nand ``retool.vendor_products`` tables are integrated into the endpoint."
    ContractResponse:
      properties:
        id:
          type: string
          title: Id
        institution_id:
          type: string
          title: Institution Id
        institution_name:
          anyOf:
          - type: string
          - type: 'null'
          title: Institution Name
        institution_state:
          anyOf:
          - type: string
          - type: 'null'
          title: Institution State
        institution_type:
          anyOf:
          - type: string
          - type: 'null'
          title: Institution Type
        annual_acv:
          anyOf:
          - type: number
          - type: 'null'
          title: Annual Acv
        total_acv:
          anyOf:
          - type: number
          - type: 'null'
          title: Total Acv
        contract_start_date:
          anyOf:
          - type: string
            format: date
          - type: 'null'
          title: Contract Start Date
        contract_end_date:
          anyOf:
          - type: string
            format: date
          - type: 'null'
          title: Contract End Date
        signees:
          anyOf:
          - {}
          - type: 'null'
          title: Signees
        file_path:
          type: string
          title: File Path
        created_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Created At
        relevance:
          anyOf:
          - type: number
          - type: 'null'
          title: Relevance
      type: object
      required:
      - id
      - institution_id
      - file_path
      title: ContractResponse
    PaginatedResponse_ContractResponse_:
      properties:
        results:
          items:
            $ref: '#/components/schemas/ContractResponse'
          type: array
          title: Results
        total:
          type: integer
          title: Total
        offset:
          type: integer
          title: Offset
        limit:
          type: integer
          title: Limit
      type: object
      required:
      - results
      - total
      - offset
      - limit
      title: PaginatedResponse[ContractResponse]
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer