# searchResearchPayments

**Identifier:** `openpayments_searchResearchPayments`

**Provider:** [OpenPayments](https://kirha.com/providers/openpayments.md)

Search CMS Open Payments research payments for one program year by sponsor company, product, ClinicalTrials.gov NCT ID, study name or principal investigator NPI. Results are aggregated per study, paid institution and principal investigator, with NCT IDs (when reported) to join with ClinicalTrials.gov. Many research rows have no NCT ID.

## Run it with the CLI

```bash
kirha tools run openpayments_searchResearchPayments \
  --input '{}'
```

`--input` takes a JSON object that matches the input schema. Pass `--input -` to read it from stdin.

## Call it over HTTP

```bash
curl https://api.kirha.com/tools/v1/execute \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: **********' \
  --data '{
  "tool_name": "openpayments_searchResearchPayments",
  "input": {}
}'
```

Replace the stars with an API key from https://app.kirha.com/api-keys.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "companyId": {
      "description": "From searchOpenPaymentsCompanies",
      "pattern": "^\\d+$",
      "type": "string"
    },
    "limit": {
      "default": 20,
      "maximum": 50,
      "minimum": 1,
      "type": "integer"
    },
    "nctId": {
      "pattern": "^NCT\\d{8}$",
      "type": "string"
    },
    "principalInvestigatorNpi": {
      "pattern": "^\\d{10}$",
      "type": "string"
    },
    "productName": {
      "description": "Exact product name as reported, e.g. Keytruda",
      "minLength": 2,
      "type": "string"
    },
    "programYear": {
      "description": "Program year. Defaults to the latest published year (CMS publishes each June).",
      "maximum": 2100,
      "minimum": 2013,
      "type": "integer"
    },
    "studyName": {
      "description": "Substring of the study name, e.g. KEYNOTE",
      "minLength": 3,
      "type": "string"
    }
  },
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "context": {
      "type": "string"
    },
    "currency": {
      "const": "usd",
      "type": "string"
    },
    "nctIds": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "npis": {
      "description": "Principal investigator and recipient NPIs",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "programYear": {
      "type": "number"
    },
    "studies": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "amount": {
            "type": "number"
          },
          "companyId": {
            "type": "string"
          },
          "companyName": {
            "type": "string"
          },
          "nctIds": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "payments": {
            "type": "number"
          },
          "principalInvestigatorName": {
            "type": "string"
          },
          "principalInvestigatorNpi": {
            "type": "string"
          },
          "principalInvestigatorSpecialty": {
            "type": "string"
          },
          "productName": {
            "type": "string"
          },
          "recipientCity": {
            "type": "string"
          },
          "recipientName": {
            "description": "Paid teaching hospital, institution or clinician",
            "type": "string"
          },
          "recipientNpi": {
            "type": "string"
          },
          "recipientState": {
            "type": "string"
          },
          "studyName": {
            "type": "string"
          }
        },
        "required": [
          "companyId",
          "companyName",
          "amount",
          "payments"
        ],
        "type": "object"
      },
      "type": "array"
    }
  },
  "required": [
    "context",
    "programYear",
    "currency",
    "studies",
    "nctIds",
    "npis"
  ],
  "type": "object"
}
```

## Related tools

Other OpenPayments tools that this tool refers to, or that refer to it.

- [`searchOpenPaymentsCompanies`](https://kirha.com/providers/openpayments/searchOpenPaymentsCompanies.md)

-----

[All OpenPayments tools](https://kirha.com/providers/openpayments.md) · [< Back to tools list](https://kirha.com/tools.md)