> ## 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.

# Medicaid open data (data.medicaid.gov)

> CMS Medicaid datasets, including State Drug Utilization Data (SDUD) and NADAC drug acquisition costs: find a dataset, then filter, sort and page its rows.

![](https://mintcdn.com/webrouter/Wx0iBZkUGX_VAFTN/logo/data-apis/_default.svg?fit=max\&auto=format\&n=Wx0iBZkUGX_VAFTN\&q=85\&s=951f11a0968af0d8747e234a1ec1f32c)

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

No key needed

Endpoints

4

Auth

None

[Vendor docs](https://data.medicaid.gov/api/1)

## Notes

* Keyless and read-only here; the write and harvest endpoints of the same API need site credentials and are left out.
* Two-step flow: find a dataset's identifier with datasets.search (e.g. fulltext 'NADAC 2026' or 'State Drug Utilization Data 2024'; SDUD and NADAC are one dataset per year), then query rows with rows.query using that identifier and distribution index 0.
* rows.query pages with limit and offset and reports the total match count in 'count'; set schema=false to drop the column schema from each response.
* Column names are machine names (e.g. ndc, ndc\_description, nadac\_per\_unit, effective\_date for NADAC); read one row first to learn them.

## Endpoints

GET

Search the dataset catalog

Datasets whose metadata match a full-text search, with identifiers, titles and descriptions.

[Open](#medicaid-datasets-search)

GET

Get a dataset's metadata

One dataset's title, description, update dates and distributions.

[Open](#medicaid-datasets-get)

POST

Query a dataset's rows

Rows of one dataset filtered by conditions, sorted and paged, as JSON.

[Open](#medicaid-rows-query)

GET

Query rows with SQL-like syntax

Rows from a datastore table selected with bracketed SELECT, WHERE and LIMIT/OFFSET clauses.

[Open](#medicaid-rows-sql)

### Search the dataset catalog

GET

`/api/1/search`

`medicaid.datasets.search`

Datasets whose metadata match a full-text search, with identifiers, titles and descriptions.

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 dataset metadata. Example `NADAC`</td></tr>

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

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Result page, from 1.
      </td>
    </tr>

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

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Results per page, 1-100; default 10.
      </td>
    </tr>

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

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Sort property: title, modified, description, keyword, publisher\_\_name, theme or search\_api\_relevance.
      </td>
    </tr>

    <tr>
      <td>
        `sort_order`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        &#x20;One of&#x20;

        `asc`

        ,&#x20;

        `desc`
      </td>
    </tr>

    <tr>
      <td>
        `facets`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Comma-separated facets to return; 0 for none; omit for all.
      </td>
    </tr>

    <tr>
      <td>
        `keyword`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

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

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

      <td>
        string
      </td>

      <td>
        query
      </td>

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

[Vendor docs](https://data.medicaid.gov/api/1) · 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("medicaid.datasets.search", {'fulltext': 'NADAC'})
```

```text MCP theme={null}
call_data_api(endpoint="medicaid.datasets.search", params={"fulltext": "NADAC"})
```

### Get a dataset's metadata

GET

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

`medicaid.datasets.get`

One dataset's title, description, update dates and distributions.

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>Dataset identifier. Example `fbb83258-11c7-47f5-8b18-5f8e79f7e704`</td></tr>

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

      <td>
        boolean
      </td>

      <td>
        query
      </td>

      <td>
        Include the distribution identifiers the datastore endpoints use.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://data.medicaid.gov/api/1) · 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)

```python Python theme={null}
router.call_data_api("medicaid.datasets.get", {'identifier': 'fbb83258-11c7-47f5-8b18-5f8e79f7e704'})
```

```text MCP theme={null}
call_data_api(endpoint="medicaid.datasets.get", params={"identifier": "fbb83258-11c7-47f5-8b18-5f8e79f7e704"})
```

### Query a dataset's rows

POST

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

`medicaid.rows.query`

Rows of one dataset filtered by conditions, sorted and paged, as JSON.

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>Dataset identifier. Example `fbb83258-11c7-47f5-8b18-5f8e79f7e704`</td></tr>
    <tr><td>`index` required</td><td>string</td><td>path</td><td>Position of the distribution in the dataset's distribution list; 0 for the first. Example `0`</td></tr>
    <tr><td>`conditions`</td><td>array</td><td>body</td><td>Filters ANDed together, each \{property, value, operator}; operator is one of =, \<>, \<, \<=, >, >=, like, between, in, not in, contains, starts with, match (default =). Example `[{"property": "ndc_description", "value": "%ATORVASTATIN%", "operator": "like"}]`</td></tr>

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

      <td>
        array
      </td>

      <td>
        body
      </td>

      <td>
        Columns to return; all when omitted.
      </td>
    </tr>

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

      <td>
        array
      </td>

      <td>
        body
      </td>

      <td>
        Sort directives, each \{property, order} with order asc or desc.
      </td>
    </tr>

    <tr><td>`limit`</td><td>integer</td><td>body</td><td>Most rows to return; at least 1. Example `100`</td></tr>

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

      <td>
        integer
      </td>

      <td>
        body
      </td>

      <td>
        Rows to skip; default 0.
      </td>
    </tr>

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

      <td>
        boolean
      </td>

      <td>
        body
      </td>

      <td>
        Return the total match count; default true.
      </td>
    </tr>

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

      <td>
        boolean
      </td>

      <td>
        body
      </td>

      <td>
        Return the rows; false with count true gives only the count.
      </td>
    </tr>

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

      <td>
        boolean
      </td>

      <td>
        body
      </td>

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

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

      <td>
        boolean
      </td>

      <td>
        body
      </td>

      <td>
        Rows as keyed objects (default true) or plain arrays.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://data.medicaid.gov/api/1) · Same job: [CMS Open Payments](https://docs.webrouter.net/data-apis/cms-open-payments.md#cms-open-payments-datastore-query), [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)

```python Python theme={null}
router.call_data_api("medicaid.rows.query", {'dataset_id': 'fbb83258-11c7-47f5-8b18-5f8e79f7e704', 'index': '0', 'conditions': [{'property': 'ndc_description', 'value': '%ATORVASTATIN%', 'operator': 'like'}], 'limit': 100})
```

```text MCP theme={null}
call_data_api(endpoint="medicaid.rows.query", params={"dataset_id": "fbb83258-11c7-47f5-8b18-5f8e79f7e704", "index": "0", "conditions": [{"property": "ndc_description", "value": "%ATORVASTATIN%", "operator": "like"}], "limit": 100})
```

> [!NOTE]
>
> * A read over POST: the query travels as the JSON body.

### Query rows with SQL-like syntax

GET

`/api/1/datastore/sql`

`medicaid.rows.sql`

Rows from a datastore table selected with bracketed SELECT, WHERE and LIMIT/OFFSET clauses.

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>
        Each clause in brackets, no spaces between selected columns, ending with a semicolon: \[SELECT a,b FROM DATASTORE\_UUID]\[WHERE c = "CCC"]\[LIMIT 500 OFFSET 0];
      </td>
    </tr>

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

      <td>
        boolean
      </td>

      <td>
        query
      </td>

      <td>
        Return machine column names (no spaces) instead of human headers.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://data.medicaid.gov/api/1) · Same job: [CMS Open Payments](https://docs.webrouter.net/data-apis/cms-open-payments.md#cms-open-payments-datastore-query), [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)

> [!NOTE]
>
> * FROM takes the distribution's datastore identifier (from datasets.get with show-reference-ids), not the dataset identifier.
> * At most 500 rows per query; page with LIMIT/OFFSET.


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