CMS Open Payments Datastore SQL API

SQL query over a datastore resource.

Operations 1

GET /datastore/sql Run a SQL query #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/open-payments-datastore-sql-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

open-payments-datastore-sql-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: CMS Open Payments Datastore SQL API
  description: The CMS Open Payments public data API serves the federal transparency program that publishes payments and transfers of value from drug and medical device manufacturers and group purchasing organizations (GPOs) to physicians, non-physician practitioners, and teaching hospitals.
  version: '1.0'
  contact:
    name: CMS Open Payments
    url: https://openpaymentsdata.cms.gov/about/api
  license:
    name: U.S. Government Work / Public Domain
    url: https://www.usa.gov/government-works
servers:
- url: https://openpaymentsdata.cms.gov/api/1
  description: CMS Open Payments public data API (DKAN)
tags:
- name: Datastore SQL
  description: SQL query over a datastore resource.
paths:
  /datastore/sql:
    get:
      operationId: queryDatastoreSql
      tags:
      - Datastore SQL
      summary: Run a SQL query
      description: Run a SQL-style query against a datastore resource. The query references a datastore table by its resource id (for example [SELECT * FROM resource-id][WHERE ...][LIMIT 10];). No authentication required. Returns HTTP 400 when the query parameter is missing.
      parameters:
      - name: query
        in: query
        required: true
        schema:
          type: string
        description: The SQL query string over a datastore resource.
      - name: show_db_columns
        in: query
        required: false
        schema:
          type: boolean
        description: Include the internal datastore column names in the response.
      responses:
        '200':
          description: An array of result rows.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
        '400':
          description: Missing or invalid query parameter.