# searchDrugAdverseEvents

**Identifier:** `openfda_searchDrugAdverseEvents`

**Provider:** [OpenFDA](https://kirha.com/providers/openfda.md)

Search U.S. FDA Adverse Event Reporting System (FAERS) for drug safety reports. Returns adverse events associated with drugs including reactions, patient demographics, and seriousness.

## Run it with the CLI

```bash
kirha tools run openfda_searchDrugAdverseEvents \
  --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": "openfda_searchDrugAdverseEvents",
  "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": {
    "drugName": {
      "description": "Brand or generic name",
      "type": "string"
    },
    "endDate": {
      "description": "YYYY-MM-DD",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      "type": "string"
    },
    "limit": {
      "default": 10,
      "maximum": 20,
      "minimum": 1,
      "type": "integer"
    },
    "reaction": {
      "description": "e.g., nausea, headache",
      "type": "string"
    },
    "serious": {
      "type": "boolean"
    },
    "startDate": {
      "description": "YYYY-MM-DD",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      "type": "string"
    }
  },
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "context": {
      "type": "string"
    },
    "events": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "drugCount": {
            "description": "Total drugs in the report",
            "type": "number"
          },
          "drugs": {
            "description": "first 30 drugs of the report",
            "items": {
              "additionalProperties": false,
              "properties": {
                "indication": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "route": {
                  "type": "string"
                },
                "rxcui": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                }
              },
              "required": [
                "name"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "patientAge": {
            "type": "number"
          },
          "patientSex": {
            "type": "string"
          },
          "reactionCount": {
            "description": "Total reactions in the report",
            "type": "number"
          },
          "reactions": {
            "description": "first 50 reactions of the report",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "receiveDate": {
            "type": "string"
          },
          "safetyReportId": {
            "type": "string"
          },
          "serious": {
            "type": "boolean"
          },
          "seriousnessDeath": {
            "type": "boolean"
          }
        },
        "required": [
          "safetyReportId",
          "serious",
          "drugs",
          "drugCount",
          "reactions",
          "reactionCount"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "rxcuis": {
      "description": "Join key to rxnorm-mcp",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "safetyReportIds": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "total": {
      "type": "number"
    }
  },
  "required": [
    "context",
    "total",
    "events",
    "safetyReportIds",
    "rxcuis"
  ],
  "type": "object"
}
```

## Related tools

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

- [`getDrugAdverseEventCounts`](https://kirha.com/providers/openfda/getDrugAdverseEventCounts.md)

-----

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