Data source: CMS Provider Data Catalog (data.cms.gov)
https://context.gnist.ai/rest/cms/
AuthenticationAll requests require a Gnist-API-Key header (or api_key query parameter).
Free tier: 100 calls/day. Get your API key.
Tools (5)
search_hospitalsSearch US hospitals by name, city, or state using CMS General Information data.
Returns hospital name, address, type, ownership, emergency services availability,
and overall CMS star rating. Data is sourced from the CMS Provider Data Catalog
and is updated quarterly.
Args:
query: Free-text search matched against hospital name and city.
state: Two-letter US state code to filter results.
limit: Maximum hospitals to return (1-50, default 10).
Returns:
List of hospitals with name, location, type, ownership, and star rating.
| Parameter | Type | Required | Description |
|---|---|---|---|
query | any | optional | Free-text search string matched against hospital name and city (e.g. "Mayo Clinic", "Houston"). |
state | any | optional | Two-letter US state code to filter results (e.g. "CA", "NY", "TX"). |
limit | integer | optional | Maximum number of hospitals to return (1-50, default 10). (default: 10) |
{
"query": "example"
}get_hospital_qualityGet quality measures for a specific hospital by its CMS facility ID.
Returns clinical quality scores, patient safety measures, patient experience
ratings, and how each measure compares to national benchmarks. Includes
measure start/end dates and any applicable footnotes.
Args:
facility_id: 6-digit CMS facility ID (e.g. "050324").
Returns:
Quality measures with scores, national comparison, and date ranges.
| Parameter | Type | Required | Description |
|---|---|---|---|
facility_id | string | required | 6-digit CMS facility ID for the hospital (e.g. "050324"). Use search_hospitals to find IDs. |
{
"facility_id": "example"
}search_providersSearch doctors and clinicians in the NPPES NPI Registry.
Returns provider name, credentials, NPI number, primary specialty, practice
address, and phone number. At least name or specialty must be provided;
state alone is not sufficient.
Args:
name: Provider last name.
state: Two-letter US state code.
specialty: Medical specialty (e.g. "Internal Medicine", "Cardiology").
limit: Maximum providers to return (1-50, default 10).
Returns:
Provider list with NPI, name, specialty, credentials, and location.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | any | optional | Provider last name or organization name to search (e.g. "Smith", "Cleveland Clinic"). |
state | any | optional | Two-letter US state code (e.g. "OH", "FL"). |
specialty | any | optional | Medical specialty to filter by (e.g. "Internal Medicine", "Cardiology"). |
limit | integer | optional | Maximum number of providers to return (1-50, default 10). (default: 10) |
{
"query": "example"
}get_spendingGet Medicare spending per beneficiary for a hospital.
Returns average Medicare spending per patient episode for the facility
compared to the national average. This metric reflects total payments
across the care episode — hospital, post-acute, and other services.
Args:
facility_id: 6-digit CMS facility ID (e.g. "050324").
Returns:
Spending per beneficiary, national average, and measurement period.
| Parameter | Type | Required | Description |
|---|---|---|---|
facility_id | string | required | 6-digit CMS facility ID for the hospital (e.g. "050324"). Use search_hospitals to find IDs. |
{
"facility_id": "example"
}report_feedbackReport a bug, feature request, or general feedback for this data source.
Use this when something doesn't work as expected, when you'd like
a new feature, or when you have suggestions for improvement.
Args:
feedback: Describe the issue or suggestion.
feedback_type: One of 'bug', 'feature_request', or 'general'.
| Parameter | Type | Required | Description |
|---|---|---|---|
feedback | string | required | |
feedback_type | string | optional | (default: "general") |
{
"feedback": "example"
}Quick Start
curl -X POST "https://context.gnist.ai/rest/cms/get_hospital_quality" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"facility_id": "example"}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/rest/cms/get_hospital_quality",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={
"facility_id": "example"
},
)
print(resp.json())