> ## Documentation Index
> Fetch the complete documentation index at: https://docs.webrouter.net/llms.txt
> Use this file to discover all available pages before exploring further.

# CMS Open Payments

> US Open Payments data from CMS: payments and transfers of value from drug and device makers to physicians and teaching hospitals queried through the site's DKAN catalog and datastore API.

![](https://mintcdn.com/webrouter/Wx0iBZkUGX_VAFTN/logo/data-apis/cms-open-payments.webp?fit=max\&auto=format\&n=Wx0iBZkUGX_VAFTN\&q=85\&s=db1bee25f2eba97387199a6a67fe246d)

[Web Catalog · Health](https://docs.webrouter.net/data-apis.md?category=health)

No key needed

Endpoints

6

Auth

None

[Vendor docs](https://openpaymentsdata.cms.gov/about/api)

## Notes

* Free and keyless.
* New endpoints appear with each data publication: list the current datasets with datasets.list (pass show-reference-ids to get the distribution ids the datastore calls take), then query a dataset by its id and distribution index.
* Page datastore.query with limit and offset. datastore.sql caps a request at 500 records: page it with \[LIMIT 500 OFFSET n].
* Responses are JSON by default; CSV is available with format=csv. Under high load queries may get 503 with Retry-After: drop conditions, sorts and offsets, or wait.

## Endpoints

GET

List datasets

Metadata of every dataset.

[Open](#cms-open-payments-datasets-list)

GET

Get a dataset

One dataset's metadata.

[Open](#cms-open-payments-datasets-get)

GET

Search datasets

Full-text search over the dataset catalog, with facets for theme, keyword and publisher.

[Open](#cms-open-payments-datasets-search)

POST

Query a dataset's records

Records of one dataset distribution, with conditions, sorts, selected properties and paging, as JSON or CSV.

[Open](#cms-open-payments-datastore-query)

GET

Query the datastore with SQL

A bracketed SQL-like SELECT over one distribution, e.g. \[SELECT a,b FROM \<distribution-id>]\[WHERE c = "X"]\[LIMIT 500 OFFSET 0].

[Open](#cms-open-payments-datastore-sql)

GET

Get datastore statistics

Row and column counts and the column headers of one datastore resource.

[Open](#cms-open-payments-datastore-stats)

### List datasets

GET

`/api/1/metastore/schemas/dataset/items`

`cms-open-payments.datasets.list`

Metadata of every dataset.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `show_reference_ids`
      </td>

      <td>
        boolean
      </td>

      <td>
        query
      </td>

      <td>
        Include the identifiers of referenced objects, such as distribution ids the datastore endpoints need.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://openpaymentsdata.cms.gov/about/api) · Same job: [ArcGIS Online](https://docs.webrouter.net/data-apis/arcgis.md#arcgis-groups-search), [Attio](https://docs.webrouter.net/data-apis/attio.md#attio-objects-list), [Bank of Canada](https://docs.webrouter.net/data-apis/bankofcanada.md#bankofcanada-lists), [US Bureau of Economic Analysis](https://docs.webrouter.net/data-apis/bea.md#bea-datasets-list), [Bright Data](https://docs.webrouter.net/data-apis/brightdata.md#brightdata-datasets-list), [Clay](https://docs.webrouter.net/data-apis/clay.md#clay-tables-query)

```python Python theme={null}
router.call_data_api("cms-open-payments.datasets.list")
```

```text MCP theme={null}
call_data_api(endpoint="cms-open-payments.datasets.list")
```

### Get a dataset

GET

`/api/1/metastore/schemas/dataset/items/{identifier}`

`cms-open-payments.datasets.get`

One dataset's metadata.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `identifier`

        required
      </td>

      <td>
        string
      </td>

      <td>
        path
      </td>

      <td>
        The dataset id.
      </td>
    </tr>

    <tr>
      <td>
        `show_reference_ids`
      </td>

      <td>
        boolean
      </td>

      <td>
        query
      </td>

      <td>
        Include the identifiers of referenced objects.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://openpaymentsdata.cms.gov/about/api) · Same job: [Affinity](https://docs.webrouter.net/data-apis/affinity.md#affinity-companies-fields), [ArcGIS Online](https://docs.webrouter.net/data-apis/arcgis.md#arcgis-items-get), [Attio](https://docs.webrouter.net/data-apis/attio.md#attio-attributes-list), [Bank of Canada](https://docs.webrouter.net/data-apis/bankofcanada.md#bankofcanada-series-get), [US Bureau of Economic Analysis](https://docs.webrouter.net/data-apis/bea.md#bea-parameters-list), [Bright Data](https://docs.webrouter.net/data-apis/brightdata.md#brightdata-datasets-metadata)

### Search datasets

GET

`/api/1/search`

`cms-open-payments.datasets.search`

Full-text search over the dataset catalog, with facets for theme, keyword and publisher.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`fulltext`</td><td>string</td><td>query</td><td>Full-text search over indexed metadata fields. Example `research payments`</td></tr>

    <tr>
      <td>
        `theme`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Filter on the theme facet.
      </td>
    </tr>

    <tr><td>`keyword`</td><td>string</td><td>query</td><td>Filter on the keyword facet. Example `all years`</td></tr>

    <tr>
      <td>
        `sort`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Property to sort on: description, keyword, modified, publisher\_\_name, temporal, theme, title, search\_api\_relevance.
      </td>
    </tr>

    <tr><td>`sort_order`</td><td>string</td><td>query</td><td>Sort direction. One of `asc`, `desc`</td></tr>

    <tr>
      <td>
        `page`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Page, from 1.
      </td>
    </tr>

    <tr>
      <td>
        `page_size`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Results per page; 10 by default.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://openpaymentsdata.cms.gov/about/api) · Same job: [ArcGIS Online](https://docs.webrouter.net/data-apis/arcgis.md#arcgis-groups-search), [Attio](https://docs.webrouter.net/data-apis/attio.md#attio-objects-list), [Bank of Canada](https://docs.webrouter.net/data-apis/bankofcanada.md#bankofcanada-lists), [US Bureau of Economic Analysis](https://docs.webrouter.net/data-apis/bea.md#bea-datasets-list), [Bright Data](https://docs.webrouter.net/data-apis/brightdata.md#brightdata-datasets-list), [Clay](https://docs.webrouter.net/data-apis/clay.md#clay-tables-query)

```python Python theme={null}
router.call_data_api("cms-open-payments.datasets.search", {'fulltext': 'research payments', 'keyword': 'all years'})
```

```text MCP theme={null}
call_data_api(endpoint="cms-open-payments.datasets.search", params={"fulltext": "research payments", "keyword": "all years"})
```

### Query a dataset's records

POST

`/api/1/datastore/query/{dataset_id}/{index}`

`cms-open-payments.datastore.query`

Records of one dataset distribution, with conditions, sorts, selected properties and paging, as JSON or CSV.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `dataset_id`

        required
      </td>

      <td>
        string
      </td>

      <td>
        path
      </td>

      <td>
        The dataset id.
      </td>
    </tr>

    <tr><td>`index` required</td><td>integer</td><td>path</td><td>Index of the distribution in the dataset's distribution array; 0 for the first. Example `0`</td></tr>
    <tr><td>`conditions`</td><td>array</td><td>body</td><td>Conditions, ANDed: objects with property, value and operator (=, \<>, \<, \<=, >, >=, like, between, in, not in, contains, starts with, match; = by default), or groups \{groupOperator: and|or, conditions: \[...]}. Example `[{"property": "record_number", "value": 1, "operator": ">"}]`</td></tr>

    <tr>
      <td>
        `properties`
      </td>

      <td>
        array
      </td>

      <td>
        body
      </td>

      <td>
        Columns to return.
      </td>
    </tr>

    <tr>
      <td>
        `sorts`
      </td>

      <td>
        array
      </td>

      <td>
        body
      </td>

      <td>
        Sort directives: objects with property and order (asc or desc).
      </td>
    </tr>

    <tr><td>`limit`</td><td>integer</td><td>body</td><td>Maximum records to return, at least 1. Example `100`</td></tr>

    <tr>
      <td>
        `offset`
      </td>

      <td>
        integer
      </td>

      <td>
        body
      </td>

      <td>
        Records to skip; 0 by default.
      </td>
    </tr>

    <tr>
      <td>
        `count`
      </td>

      <td>
        boolean
      </td>

      <td>
        body
      </td>

      <td>
        Return the total matching count, ignoring limit and offset; true by default.
      </td>
    </tr>

    <tr>
      <td>
        `results`
      </td>

      <td>
        boolean
      </td>

      <td>
        body
      </td>

      <td>
        Return the records; set false with count true for a count only.
      </td>
    </tr>

    <tr>
      <td>
        `schema`
      </td>

      <td>
        boolean
      </td>

      <td>
        body
      </td>

      <td>
        Return the column schema; true by default.
      </td>
    </tr>

    <tr>
      <td>
        `keys`
      </td>

      <td>
        boolean
      </td>

      <td>
        body
      </td>

      <td>
        Return records as keyed objects (true, default) or arrays of values.
      </td>
    </tr>

    <tr><td>`format`</td><td>string</td><td>body</td><td>Response format; json by default. One of `json`, `csv`</td></tr>
  </tbody>
</table>

[Vendor docs](https://openpaymentsdata.cms.gov/about/api) · Same job: [CMS Data (data.cms.gov)](https://docs.webrouter.net/data-apis/data-cms.md#data-cms-dataset-rows), [data.gov.au](https://docs.webrouter.net/data-apis/data-gov-au.md#data-gov-au-rows-search), [Latvian Open Data Portal (data.gov.lv)](https://docs.webrouter.net/data-apis/data-gov-lv.md#data-gov-lv-rows-search), [data.gov.ua](https://docs.webrouter.net/data-apis/data-gov-ua.md#data-gov-ua-rows-search), [Dune](https://docs.webrouter.net/data-apis/dune.md#dune-query-latest-result), [FINRA API Platform](https://docs.webrouter.net/data-apis/finra.md#finra-datasets-query)

> [!NOTE]
>
> * A read over POST: the body is a query, nothing is changed.

### Query the datastore with SQL

GET

`/api/1/datastore/sql`

`cms-open-payments.datastore.sql`

A bracketed SQL-like SELECT over one distribution, e.g. \[SELECT a,b FROM \<distribution-id>]\[WHERE c = "X"]\[LIMIT 500 OFFSET 0].

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`query` required</td><td>string</td><td>query</td><td>The query; SELECT, WHERE and LIMIT ... OFFSET each in their own brackets, no spaces between selected columns. Example `[SELECT * FROM 004e1f11-aa67-5b16-943d-1fe1044b3512][LIMIT 2]`</td></tr>

    <tr>
      <td>
        `show_db_columns`
      </td>

      <td>
        boolean
      </td>

      <td>
        query
      </td>

      <td>
        Return the database column names (no spaces, possibly truncated), which WHERE and SELECT need.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://openpaymentsdata.cms.gov/about/api) · Same job: [CMS Data (data.cms.gov)](https://docs.webrouter.net/data-apis/data-cms.md#data-cms-dataset-rows), [data.gov.au](https://docs.webrouter.net/data-apis/data-gov-au.md#data-gov-au-rows-search), [Latvian Open Data Portal (data.gov.lv)](https://docs.webrouter.net/data-apis/data-gov-lv.md#data-gov-lv-rows-search), [data.gov.ua](https://docs.webrouter.net/data-apis/data-gov-ua.md#data-gov-ua-rows-search), [Dune](https://docs.webrouter.net/data-apis/dune.md#dune-query-latest-result), [FINRA API Platform](https://docs.webrouter.net/data-apis/finra.md#finra-datasets-query)

```python Python theme={null}
router.call_data_api("cms-open-payments.datastore.sql", {'query': '[SELECT * FROM 004e1f11-aa67-5b16-943d-1fe1044b3512][LIMIT 2]'})
```

```text MCP theme={null}
call_data_api(endpoint="cms-open-payments.datastore.sql", params={"query": "[SELECT * FROM 004e1f11-aa67-5b16-943d-1fe1044b3512][LIMIT 2]"})
```

> [!NOTE]
>
> * FROM takes a distribution id, not a dataset id: get it from datasets.list with show-reference-ids.

### Get datastore statistics

GET

`/api/1/datastore/imports/{identifier}`

`cms-open-payments.datastore.stats`

Row and column counts and the column headers of one datastore resource.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `identifier`

        required
      </td>

      <td>
        string
      </td>

      <td>
        path
      </td>

      <td>
        A datastore (distribution) id.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://openpaymentsdata.cms.gov/about/api) · Same job: [Affinity](https://docs.webrouter.net/data-apis/affinity.md#affinity-companies-fields), [ArcGIS Online](https://docs.webrouter.net/data-apis/arcgis.md#arcgis-items-get), [Attio](https://docs.webrouter.net/data-apis/attio.md#attio-attributes-list), [Bank of Canada](https://docs.webrouter.net/data-apis/bankofcanada.md#bankofcanada-series-get), [US Bureau of Economic Analysis](https://docs.webrouter.net/data-apis/bea.md#bea-parameters-list), [Bright Data](https://docs.webrouter.net/data-apis/brightdata.md#brightdata-datasets-metadata)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.