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.
Endpoint: GET /api/v1/spending/by-code
Availability: Live in production.
Authentication: API key in Authorization: Bearer <key> with the read scope.
Returns aggregate Medicaid provider spending statistics per HCPCS code, including totals and year-over-year breakdowns from CMS claims data. Provide code or codes. Requested codes with no data return zeroed totals. Patient counts are publisher row-level sums, not deduplicated people.
Parameters
code(query): Single HCPCS code to look upcodes(query): Comma-separated list of HCPCS codes (max 10)year(query): Filter the yearly breakdown to a specific year
Example request
curl -X GET "https://backworkhealth.com/api/v1/spending/by-code?code=T1019&codes=T1019%2CT1020&year=2023" \
-H "Authorization: Bearer $BACKWORK_API_KEY"Example response (200)
{
"success": true,
"data": {},
"meta": {
"request_id": "string",
"timestamp": "2026-01-15T10:30:00Z",
"codes_requested": 0,
"patient_count_semantics": "sum_of_source_row_counts_not_distinct_people",
"patient_count_disclosure": "string",
"year_filter": 0
}
}Authorization
bearerAuth API key in format: bwk_live_xxxxx. Keys issued before the rename (vrt_live_) remain valid. bwk_test_ keys work only on the sandbox.
In: header
Query Parameters
Single HCPCS code to look up
1 <= length <= 10Comma-separated list of HCPCS codes (max 10)
length <= 100Filter the yearly breakdown to a specific year
2000 <= value <= 2100Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/spending/by-code"{ "success": true, "data": { "property1": { "total_paid": "1234567.89", "total_claims": 0, "reported_patient_count_sum": 0, "patient_count_semantics": "sum_of_source_row_counts_not_distinct_people", "unique_providers": 0, "date_range": { "min": "string", "max": "string" }, "by_year": [ { "year": 0, "total_paid": "string", "total_claims": 0, "reported_patient_count_sum": 0 } ] }, "property2": { "total_paid": "1234567.89", "total_claims": 0, "reported_patient_count_sum": 0, "patient_count_semantics": "sum_of_source_row_counts_not_distinct_people", "unique_providers": 0, "date_range": { "min": "string", "max": "string" }, "by_year": [ { "year": 0, "total_paid": "string", "total_claims": 0, "reported_patient_count_sum": 0 } ] } }, "meta": { "request_id": "string", "timestamp": "2019-08-24T14:15:22Z", "codes_requested": 0, "patient_count_semantics": "sum_of_source_row_counts_not_distinct_people", "patient_count_disclosure": "string", "year_filter": 0 }}Last updated on