Skip to main content

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 a dataset’s metadata

Query a dataset’s rows

  • A read over POST: the query travels as the JSON body.

Query rows with SQL-like syntax

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