VerityVerity API
API Reference

Get Medicaid spending by code

Returns aggregate Medicaid provider spending statistics per HCPCS code, including totals and year-over-year breakdowns from CMS claims data.

GET
/spending/by-code

Authorization

bearerAuth
AuthorizationBearer <token>

API key in format: vrt_live_xxxxx or vrt_test_xxxxx

In: header

Query Parameters

code?string

Single HCPCS code to look up

Length1 <= length <= 10
codes?string

Comma-separated list of HCPCS codes (max 10). Alternative to 'code' parameter.

Lengthlength <= 100
year?integer

Filter to a specific year

Range2000 <= value <= 2100

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://verity.backworkai.com/api/v1/spending/by-code"
{
  "success": true,
  "data": {
    "property1": {
      "total_paid": "string",
      "total_claims": 0,
      "unique_beneficiaries": 0,
      "unique_providers": 0,
      "date_range": {
        "min": "2019-08-24",
        "max": "2019-08-24"
      },
      "by_year": [
        {
          "year": 0,
          "total_paid": "string",
          "total_claims": 0,
          "unique_beneficiaries": 0
        }
      ]
    },
    "property2": {
      "total_paid": "string",
      "total_claims": 0,
      "unique_beneficiaries": 0,
      "unique_providers": 0,
      "date_range": {
        "min": "2019-08-24",
        "max": "2019-08-24"
      },
      "by_year": [
        {
          "year": 0,
          "total_paid": "string",
          "total_claims": 0,
          "unique_beneficiaries": 0
        }
      ]
    }
  },
  "meta": {
    "request_id": "string",
    "timestamp": "2019-08-24T14:15:22Z",
    "codes_requested": 0,
    "year_filter": 0
  }
}
{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Request validation failed",
    "details": {
      "q": [
        "Search query is required"
      ]
    },
    "docUrl": "https://docs.verity.io/errors#validation-error"
  },
  "meta": {
    "request_id": "req_abc123",
    "timestamp": "2024-01-15T10:30:00Z"
  }
}
{
  "success": false,
  "error": {
    "code": "AUTH_KEY_NOT_FOUND",
    "message": "API key not found",
    "hint": "Check that your API key is correct",
    "docUrl": "https://docs.verity.io/errors#auth-key-not-found"
  },
  "meta": {
    "request_id": "req_abc123",
    "timestamp": "2024-01-15T10:30:00Z"
  }
}
{
  "success": false,
  "error": {
    "code": "RATE_LIMIT_EXCEEDED",
    "message": "Rate limit exceeded",
    "hint": "Upgrade to pay-as-you-go for higher limits",
    "docUrl": "https://docs.verity.io/errors#rate-limit-exceeded"
  },
  "meta": {
    "request_id": "req_abc123",
    "timestamp": "2024-01-15T10:30:00Z"
  }
}