Provider Tables API¶
Complete API reference for querying CMS Provider Specific File (IPSF and OPSF) data programmatically.
Overview¶
The Provider Tables API provides read-only access to CMS Inpatient Provider Specific File (IPSF) and Outpatient Provider Specific File (OPSF) data. These files contain provider-specific data used for Medicare payment calculations.
Base Path: /api/v1/provider-tables
Authentication: Required for all endpoints (Bearer token)
Table Types¶
The following table types are available:
| Type | Name | Description |
|---|---|---|
ipsf |
Inpatient Provider Specific File | Data for Inpatient Prospective Payment System (IPPS) |
opsf |
Outpatient Provider Specific File | Data for Outpatient Prospective Payment System (OPPS) |
Endpoints¶
Search Provider Tables¶
Search and filter provider records with pagination.
Endpoint: GET /provider-tables/
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
table |
string | No | Table to read: ipsf (default) or opsf |
skip |
integer | No | Number of records to skip (default: 0) |
limit |
integer | No | Maximum records to return (default: 25, max: 200) |
provider_ccn |
string | No | Filter by Provider CCN |
national_provider_identifier |
string | No | Filter by NPI |
state |
string | No | Filter by state abbreviation |
active_only |
boolean | No | Only include active providers (default: false) |
search |
string | No | Keyword search across CCN, NPI, and provider type |
sort_by |
string | No | Sort column: effective_date (default), provider_ccn, termination_date, last_updated |
sort_direction |
string | No | Sort direction: desc (default) or asc |
Response:
{
"data": [
{
"id": 1,
"provider_ccn": "010001",
"national_provider_identifier": "1234567890",
"effective_date": "2024-01-01",
"termination_date": "2024-12-31",
"table_name": "ipsf",
"record_status": "active",
"provider_type": "Hospital"
}
],
"count": 100
}
Example Requests:
# Search IPSF for active providers in NY
curl -H "Authorization: API_KEY..." \
"https://api.example.com/api/v1/provider-tables/?table=ipsf&state=NY&active_only=true"
# Search by CCN
curl -H "Authorization: API_KEY..." \
"https://api.example.com/api/v1/provider-tables/?provider_ccn=010001"
Get Filter Options¶
Retrieve available filter options for a specific table.
Endpoint: GET /provider-tables/filters/options
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
table |
string | No | Table to read: ipsf (default) or opsf |
Response:
Get Suggestions¶
Get autocomplete suggestions for providers.
Endpoint: GET /provider-tables/suggestions
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
query |
string | Yes | Substring to search (min length 3) |
identifier_field |
string | No | Field to match: npi (default) or provider_ccn |
contract_id |
string | No | Contract identifier for custom provider suggestions |
limit |
integer | No | Max suggestions (default: 5, max: 25) |
include_base_tables |
boolean | No | Include CMS IPSF/OPSF suggestions (default: true) |
include_custom_providers |
boolean | No | Include custom providers (default: true) |
Response:
{
"suggestions": [
{
"value": "1234567890",
"label": "1234567890 - GENERAL HOSPITAL",
"type": "base"
}
]
}
Lookup Provider¶
Lookup provider records by NPI, CCN, or custom ID.
Endpoint: GET /provider-tables/lookup
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
npi |
string | No | Exact or partial NPI |
provider_ccn |
string | No | Exact or partial CCN |
provider_id |
string | No | Custom provider identifier |
contract_id |
string | No | Contract identifier (required for custom provider lookup) |
Response:
Get Table Metadata¶
Retrieve field metadata for a specific table.
Endpoint: GET /provider-tables/{table}/metadata
Path Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
table |
string | Yes | ipsf or opsf |
Response:
Get Single Record¶
Retrieve a specific provider record by ID.
Endpoint: GET /provider-tables/{table}/{record_id}
Path Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
table |
string | Yes | ipsf or opsf |
record_id |
integer | Yes | Unique record ID |
Response:
Returns the full IPSF or OPSF record object.
Get Provider Versions¶
Retrieve all versions of a provider's record.
Endpoint: GET /provider-tables/{table}/providers/versions
Path Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
table |
string | Yes | ipsf or opsf |
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
provider_ccn |
string | No | Provider CCN |
national_provider_identifier |
string | No | NPI |
Note: Either provider_ccn or national_provider_identifier must be provided.
Response:
List of provider record versions.
Error Handling¶
| Status Code | Description |
|---|---|
| 200 | Success |
| 400 | Invalid parameters (e.g., invalid table name, missing identifiers) |
| 401 | Unauthorized |
| 404 | Record or metadata not found |
| 500 | Server error |