# Medicare API: Search hospitals

> Finds U.S. hospitals by name, city and state, or ZIP code, with Medicare overall and patient survey star ratings, contact details, and Care Compare links. Ratings may be unavailable for some hospitals.

Unofficial. Not affiliated with or endorsed by Medicare.

- Page: https://fous.com/methods/medicare.gov/search-hospitals
- Method: `medicare.gov/search_hospitals`, version 1
- Website: medicare.gov
- Returns: hospital name, overall and patient survey star ratings, type, ownership, emergency services, address, phone, Care Compare link
- Effect: read (it gets data and changes nothing)
- Sign-in: none needed
- Cost: 1 credit per completed run (1¢ with pay as you go); failed runs are free
- Verified: Nov 2, 2026

## Inputs

| Field | Type | Required | In the run below | Description |
|---|---|---|---|---|
| `state` | string | no |  | Optional state name or two-letter code to narrow a name search, such as California or CA. |
| `search` | string | yes | `"Phoenix, AZ"` | Hospital name, city and state, or ZIP code, such as Cedars-Sinai, Phoenix, AZ, or 90048. |
| `max_results` | integer | no | `5` | Maximum number of hospitals to return, such as 20 (up to 100). Default 20. |

## Output

From a run on Oct 31, 2026, shortened. Its input:

```json
{
  "search": "Phoenix, AZ",
  "max_results": 5
}
```

Its output:

```json
{
  "hospitals": [
    {
      "city": "PHOENIX",
      "phone": "(602) 839-2000",
      "state": "AZ",
      "address": "1111 EAST MCDOWELL ROAD",
      "zip_code": "85006",
      "ownership": "Voluntary non-profit - Other",
      "hospital_name": "BANNER - UNIVERSITY MEDICAL CENTER PHOENIX",
      "hospital_type": "Acute Care Hospitals",
      "care_compare_link": "https://www.medicare.gov/care-compare/details/hospital/030002/view-all/",
      "emergency_services": "Yes",
      "overall_star_rating": 3,
      "cms_certification_number": "030002",
      "patient_survey_star_rating": 2
    },
    {
      "city": "PHOENIX",
      "phone": "(602) 943-2381",
      "state": "AZ",
      "address": "250 EAST DUNLAP AVENUE",
      "zip_code": "85020",
      "ownership": "Voluntary non-profit - Private",
      "hospital_name": "HONOR HEALTH JOHN C. LINCOLN MEDICAL CENTER",
      "hospital_type": "Acute Care Hospitals",
      "care_compare_link": "https://www.medicare.gov/care-compare/details/hospital/030014/view-all/",
      "emergency_services": "Yes",
      "overall_star_rating": 3,
      "cms_certification_number": "030014",
      "patient_survey_star_rating": 3
    },
    {
      "city": "PHOENIX",
      "phone": "(602) 344-5011",
      "state": "AZ",
      "address": "2601 EAST ROOSEVELT STREET",
      "zip_code": "85008",
      "ownership": "Government - Local",
      "hospital_name": "VALLEYWISE HEALTH MEDICAL CENTER",
      "hospital_type": "Acute Care Hospitals",
      "care_compare_link": "https://www.medicare.gov/care-compare/details/hospital/030022/view-all/",
      "emergency_services": "No",
      "overall_star_rating": 1,
      "cms_certification_number": "030022",
      "patient_survey_star_rating": 3
    }
  ]
}
```

## Run it

From code, with a Fous API key in `FOUS_API_KEY`; the answer's `data` holds the output:

```bash
curl https://api.fous.com/v1/runs \
  -H "Authorization: Bearer $FOUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"method":"medicare.gov/search_hospitals","input":{"search":"Phoenix, AZ","max_results":5}}'
```

From an AI agent connected to the Fous MCP server: its `run` with the same method and input. To connect one, give it `set up https://fous.com/SKILL.md`.

## Ask your agent

- What are the Medicare star ratings for hospitals near ZIP code 60614? Show me the top 10.
- Find Mayo Clinic hospitals in Minnesota and give me their overall and patient survey star ratings plus phone numbers.
- List hospitals in Boise, ID with emergency services, ownership type, and addresses.
- On medicare.gov, look up Johns Hopkins Hospital and tell me its patient survey rating and Care Compare link.
- Pull up to 50 hospitals in Houston, TX from Medicare's Care Compare with their overall star ratings so I can compare them.

## Input schema

```json
{
  "type": "object",
  "required": [
    "search"
  ],
  "properties": {
    "state": {
      "type": "string",
      "description": "Optional state name or two-letter code to narrow a name search, such as California or CA."
    },
    "search": {
      "type": "string",
      "minLength": 1,
      "description": "Hospital name, city and state, or ZIP code, such as Cedars-Sinai, Phoenix, AZ, or 90048."
    },
    "max_results": {
      "type": "integer",
      "default": 20,
      "maximum": 100,
      "minimum": 1,
      "description": "Maximum number of hospitals to return, such as 20 (up to 100)."
    }
  }
}
```

## Output schema

```json
{
  "type": "object",
  "required": [
    "hospitals"
  ],
  "properties": {
    "hospitals": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "hospital_name",
          "overall_star_rating",
          "patient_survey_star_rating",
          "hospital_type",
          "ownership",
          "emergency_services",
          "address",
          "city",
          "state",
          "zip_code",
          "phone",
          "care_compare_link",
          "cms_certification_number"
        ],
        "properties": {
          "city": {
            "type": [
              "string",
              "null"
            ],
            "description": "City."
          },
          "phone": {
            "type": [
              "string",
              "null"
            ],
            "description": "Telephone number."
          },
          "state": {
            "type": [
              "string",
              "null"
            ],
            "description": "Two-letter state code."
          },
          "address": {
            "type": [
              "string",
              "null"
            ],
            "description": "Street address."
          },
          "zip_code": {
            "type": [
              "string",
              "null"
            ],
            "description": "ZIP code."
          },
          "ownership": {
            "type": [
              "string",
              "null"
            ],
            "description": "Hospital ownership."
          },
          "hospital_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Hospital name"
          },
          "hospital_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "Type of hospital."
          },
          "care_compare_link": {
            "type": [
              "string",
              "null"
            ],
            "description": "Hospital page on Medicare Care Compare."
          },
          "emergency_services": {
            "type": [
              "string",
              "null"
            ],
            "description": "Whether the hospital has emergency services, Yes or No."
          },
          "overall_star_rating": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Medicare overall star rating from 1 to 5, or null if not rated."
          },
          "cms_certification_number": {
            "type": [
              "string",
              "null"
            ],
            "description": "CMS certification number for the hospital.",
            "x-fous-developer": true
          },
          "patient_survey_star_rating": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Summary patient survey star rating from 1 to 5, or null if not rated."
          }
        },
        "additionalProperties": false
      },
      "description": "Hospitals ranked by name match for name searches."
    }
  },
  "additionalProperties": false
}
```

## See more

- [Medicare API: Search nursing homes](https://fous.com/methods/medicare.gov/search-nursing-homes.md): Finds U.S. nursing homes on Medicare Care Compare by name, city and state, or ZIP code. Results include star ratings, ownership, fines from the last three years, and Care Compare links.
- [HHS API: Search healthcare providers](https://fous.com/methods/npiregistry.cms.hhs.gov/search-providers.md): Finds US healthcare providers by name, place, specialty and provider type in the NPI Registry, with practice contact details and primary taxonomy. Results may include providers with similar names.
- [HHS API: Get provider by NPI](https://fous.com/methods/npiregistry.cms.hhs.gov/get-provider.md): Looks up a provider in the NPI Registry by 10-digit NPI number and returns the public name, specialties, addresses, contact details and registry dates.
- [NHS API: Search nearby services](https://fous.com/methods/nhs.uk/search-nearby-services.md): Find nearby NHS service listings from a UK postcode or town, nearest first. NHS service search covers England; urgent_care returns A&E listings. Hours, patient availability and websites are null when not shown.
- [Google API: Search Google Hotels](https://fous.com/methods/google.com/search-hotels.md): Finds places to stay in a city or area for given dates on Google Hotels, with nightly and total prices, hotel class, guest ratings, amenities, address and cheapest booking site. Optional filters for price, stars and rating; vacation rentals are left out. Prices and availability can change.
- [ClinicalTrials.gov API: Search clinical trials](https://fous.com/methods/clinicaltrials.gov/search-trials.md): Finds ClinicalTrials.gov studies for a condition or medicine. You can filter by location, distance, recruitment status and phase. With a location, results are ordered by distance to the closest eligible site.
- [Google API: Get hotel reviews from Google Hotels](https://fous.com/methods/google.com/get-hotel-reviews.md): Finds a hotel on Google Hotels by name and city and returns its guest reviews in the chosen order, its Google rating and review count, and topic ratings averaged from the returned reviews that rate each topic.
- [ProPublica API: Search nonprofits by name](https://fous.com/methods/projects.propublica.org/search-nonprofits.md): Finds U.S. nonprofits by organization name, optionally filtered by state and city, with the latest reported revenue and assets.
- [All Medicare methods](https://fous.com/methods/medicare.gov.md)
