# Search providers

URL: https://docs.healthcare.dev/reference/providers/search-providers

```http
GET https://api.healthcare.dev/v1/providers
```

Fuzzy name search and filters on the practice location and taxonomy. Pass `q`, a filter, or both. Without `q`, results are in NPI order with `match_score: 1`. Radius (`near=`) search comes with geocoding.

Requires an API key: `Authorization: Bearer hdev_live_...`. See [Authentication](/authentication).

## Query parameters

| Name | Type | Required | Description | Example |
| --- | --- | --- | --- | --- |
| `q` | string | no | Name or organization (fuzzy), or an NPI prefix | `mayo clinic` |
| `state` | string | no | Practice location state, e.g. `MN` | `MN` |
| `city` | string | no | Practice location city (exact, case-insensitive) | `Rochester` |
| `postal_code` | string | no | Practice location ZIP (matched on 5 digits) | `55905` |
| `taxonomy` | string | no | Any of the provider's taxonomy codes | `207Q00000X` |
| `entity_type` | "individual" \| "organization" | no | Only individuals (NPI type 1) or organizations (type 2) | `individual` |
| `include_deactivated` | "true" \| "false" | no | Include deactivated NPIs (default false) | `true` |
| `limit` | integer | no | Page size (max 100) | `25` |
| `cursor` | string | no | Opaque cursor from `links.next` |  |
| `view` | "compact" \| "full" | no | `compact` returns only the fields an agent usually needs (fewer tokens); `full` (default) returns every field | `compact` |
| `fields` | string | no | Comma-separated record fields to return, e.g. `code,display,billable` | `code,display,billable` |

## Examples

**curl**

```sh
curl "https://api.healthcare.dev/v1/providers?q=mayo+clinic&limit=25" \
  -H "Authorization: Bearer $HDEV_API_KEY"
```

**TypeScript**

```ts
const res = await fetch("https://api.healthcare.dev/v1/providers?q=mayo+clinic&limit=25", {
  headers: { Authorization: `Bearer ${process.env.HDEV_API_KEY}` },
});
const { data, meta } = await res.json();
```

**Python**

```python
import os
import requests

res = requests.get("https://api.healthcare.dev/v1/providers?q=mayo+clinic&limit=25", headers={"Authorization": f"Bearer {os.environ['HDEV_API_KEY']}"})
body = res.json()
```

## Response

Matches

```json
{
  "data": [
    {
      "npi": "string",
      "entity_type": "individual",
      "name": {
        "display": "string",
        "first": "string",
        "middle": "string",
        "last": "string",
        "prefix": "string",
        "suffix": "string",
        "credential": "string",
        "organization": "string"
      },
      "status": "active",
      "enumeration_date": "2026-10-01",
      "last_updated": "2026-10-01",
      "deactivation_date": "2026-10-01",
      "reactivation_date": "2026-10-01",
      "addresses": [
        {
          "purpose": null,
          "line1": null,
          "line2": null,
          "city": null,
          "state": null,
          "postal_code": null,
          "country": null,
          "phone": null,
          "fax": null,
          "geo": null
        }
      ],
      "taxonomies": [
        {
          "code": null,
          "display": null,
          "primary": null,
          "license": null,
          "license_state": null
        }
      ],
      "match_score": 0
    }
  ],
  "meta": {
    "source": "cms-icd10",
    "data_version": "2026.1",
    "retrieved_at": "2026-10-24T12:00:00Z",
    "license": "Public domain (CMS). Reference data, not medical advice."
  },
  "links": {
    "self": "/v1/providers?q=mayo+clinic&limit=25",
    "next": "/v1/providers?q=mayo+clinic&limit=25&cursor=eyJrIjoiRTExLjkifQ"
  }
}
```

### Fields

| Field | Type | Always present | Description |
| --- | --- | --- | --- |
| `npi` | string | yes |  |
| `entity_type` | "individual" \| "organization" \| null | yes | null for deactivated NPIs: CMS publishes only the NPI and its dates |
| `name` | object | yes |  |
| `status` | "active" \| "deactivated" | yes |  |
| `enumeration_date` | string \| null (date) | yes |  |
| `last_updated` | string \| null (date) | yes |  |
| `deactivation_date` | string \| null (date) | yes |  |
| `reactivation_date` | string \| null (date) | yes |  |
| `addresses` | Address[] | yes |  |
| `taxonomies` | ProviderTaxonomy[] | yes |  |
| `match_score` | number | yes | How well this result matches the query: 1 exact code or id, 0.9 code prefix, 0.5 to 0.9 every query word in the text (higher is closer), under 0.5 a fuzzy (typo-tolerant) match. Below 0.5, check the result before relying on it. |

## Errors

Errors are `application/problem+json` ([RFC 9457](https://www.rfc-editor.org/rfc/rfc9457)). Branch on `type`, not on `title`. See [Errors](/errors).

| Status | `type` | When |
| --- | --- | --- |
| 400 | `invalid-request` | A parameter or the body failed validation; `errors` lists each field. |
| 401 | `unauthorized` | Missing, malformed or revoked API key. |
| 404 | `not-found` | No record with that id (retired records are still returned). |
| 429 | `rate-limited / quota-exceeded` | Too many requests per second (retry after `Retry-After`), or the monthly quota is used up. |
| 503 | `dataset-unavailable / unavailable` | The dataset has no published version yet, or the service is degraded. |
