GET provider-data/api/1/datastore/sql

cms.gov:cms-api

Summary: Query resources in datastore
Operation ID: datastore-sql
Auth: unknown
Description

Interact with resources in the datastore using an SQL-like syntax.

Parameters (2)

query (string, query, required)

A SQL-like query. A `SELECT` using the `show_db_columns` parameter will make it easier to build queries against the data as it returns columns without spaces and in some cases, truncated names where the human readable column header is very long. `/api/1/datastore/sql?query=[SELECT * FROM DATASTORE_UUID][LIMIT 1 OFFSET 0];&show_db_columns` You can then build the `SELECT` part of the query. Do not use spaces between its arguments. `/api/1/datastore/sql?query=[SELECT a,b,c, FROM DATASTORE_UUID]` `WHERE` can use any column in the data. `/api/1/datastore/sql?query=[SELECT a,b FROM DATASTORE_UUID][WHERE c = "CCC"];&show_db_columns` `LIMIT` and `OFFSET` allow you to get more than the 500 record limit, by using successive queries: `/api/1/datastore/sql?query=[SELECT a,b,c FROM DATASTORE_UUID][WHERE d = "CCC"][LIMIT 500 OFFSET 0];&show_db_columns` `/api/1/datastore/sql?query=[SELECT a,b,c FROM DATASTORE_UUID][WHERE d = "DDD"][LIMIT 500 OFFSET 500];&show_db_columns` Note: `SELECT`, `WHERE` and `LIMIT...OFFSET` clauses must each be included within brackets `[ ]`.

show_db_columns (boolean, query, optional)

Add `&show_db_columns` to return columns without spaces and in some cases, truncated names where the human readable column header is very long.

Examples (1)

TitleTypeURLAction
Query resources in datastore openapi-spec https://data.cms.gov/provider-data/api/1/datastore/sql?query=[SELECT * FROM a106bb7d-22a0-5be5-be84-af58b992c236][LIMIT 2]

Probe History

Latency

Status Codes

TimeStatusLatencySize
2026-03-23 10:52:13.579366 200 220ms