{
  "openapi": "3.0.1",
  "info": {
    "title": "HHS Open Payments Intelligence MCP — CMS Drug & Device $",
    "description": "Search the CMS Open Payments (Sunshine Act) database via a Model Context Protocol (MCP) server. Track financial relationships between pharmaceutical companies and physicians: speaking fees, consulting payments, royalties, research funding, and other transfers of value. This Ap...",
    "version": "0.1",
    "x-build-id": "cXh7rMQbHeYe6QM6k"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/andrew_avina~hhs-open-payments-mcp/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-andrew_avina-hhs-open-payments-mcp",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/andrew_avina~hhs-open-payments-mcp/runs": {
      "post": {
        "operationId": "runs-sync-andrew_avina-hhs-open-payments-mcp",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/andrew_avina~hhs-open-payments-mcp/run-sync": {
      "post": {
        "operationId": "run-sync-andrew_avina-hhs-open-payments-mcp",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "mode": {
            "title": "Query Mode",
            "enum": [
              "search",
              "company",
              "physician"
            ],
            "type": "string",
            "description": "Selects which query strategy to run in batch mode. 'search' = general search with all filters. 'company' = focused company payment lookup. 'physician' = focused physician payment lookup.",
            "default": "search"
          },
          "company": {
            "title": "Company Name",
            "type": "string",
            "description": "Pharmaceutical or medical device company name (full or partial). Examples: 'Pfizer', 'AstraZeneca', 'Merck', 'Johnson & Johnson', 'Boston Scientific', 'Medtronic', 'Novartis'. Used for both 'search' and 'company' modes.",
            "default": ""
          },
          "physicianName": {
            "title": "Physician Name",
            "type": "string",
            "description": "Physician first name, last name, or full name to search. Examples: 'Smith', 'John Smith', 'Mary Johnson'. Used for both 'search' and 'physician' modes.",
            "default": ""
          },
          "specialty": {
            "title": "Physician Specialty",
            "type": "string",
            "description": "Medical specialty of the recipient physician. Examples: 'Oncology', 'Cardiology', 'Neurology', 'Orthopedic Surgery', 'Internal Medicine', 'Psychiatry'.",
            "default": ""
          },
          "paymentType": {
            "title": "Payment Type / Nature",
            "enum": [
              "",
              "Food and Beverage",
              "Consulting Fee",
              "Speaking Fee",
              "Royalty or License",
              "Research",
              "Education",
              "Travel and Lodging",
              "Gift",
              "Charitable Contribution",
              "Entertainment",
              "Grant"
            ],
            "type": "string",
            "description": "Nature of payment or transfer of value. Examples: 'Food and Beverage', 'Consulting Fee', 'Speaking Fee', 'Royalty or License', 'Research', 'Education', 'Travel and Lodging', 'Gift'.",
            "default": ""
          },
          "minAmount": {
            "title": "Minimum Payment Amount (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Return only payments greater than or equal to this amount in USD. Example: 10000 for $10K+ payments. The CMS API applies this filter server-side when possible.",
            "default": 0
          },
          "year": {
            "title": "Program Year",
            "minimum": 2013,
            "maximum": 2022,
            "type": "integer",
            "description": "Open Payments program year to query. Data available from 2013–2022. Most recent complete year is 2022. Note: CMS publishes data with an 18-24 month lag.",
            "default": 2022
          },
          "limit": {
            "title": "Result Limit",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of payment records to return (max 1000). Results are sorted by payment amount descending.",
            "default": 25
          },
          "serveMcp": {
            "title": "MCP Server Mode",
            "type": "boolean",
            "description": "When enabled, starts an MCP-compatible HTTP server on port 4321 instead of returning a batch dataset. Use this to connect Claude Desktop, Cursor, or any MCP client to the CMS Open Payments database. The actor runs continuously until stopped.",
            "default": false
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}