Forge Tools openfda_adverse_events

openfda_adverse_events read

scidex.forge.openfda_adverse_events

Look up drug post-market adverse event signals from the FDA Adverse Event Reporting System (FAERS) via the OpenFDA API. Returns aggregated MedDRA reaction counts and proportions for the queried drug. Distinct from SIDER (curated drug labels): FAERS captures voluntary post-market reports submitted to FDA. Use for pharmacovigilance, safety signal detection, and drug risk profiling. REST API: https://api.fda.gov/drug/event.json — public, no auth required.

HTTP: POST /api/scidex/forge/openfda_adverse_events

Invoke

Calls scidex.tool.invoke on the substrate with this tool name. Edit the JSON below — it must match the input schema. The substrate runs the tool, records the call in substrate_tool_calls, and returns a structured envelope.

Sign in to invoke this tool. Schema and curl snippet are visible to anyone.

Schemas

Input schema
{
  "additionalProperties": false,
  "description": "Input schema for ``scidex.forge.openfda_adverse_events``.",
  "properties": {
    "drug_name": {
      "description": "Drug name to look up in FDA FAERS (generic or brand, e.g. ``'imatinib'`` or ``'Gleevec'``). Queried against ``patient.drug.medicinalproduct`` in the OpenFDA API.",
      "title": "Drug Name",
      "type": "string"
    },
    "reaction_filter": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Optional substring filter applied to ``reaction_pt`` (case-insensitive). When set, only adverse events whose MedDRA reaction term contains this string are returned. Example: ``'nausea'`` returns only reactions with 'nausea' in the term.",
      "title": "Reaction Filter"
    },
    "limit": {
      "default": 10,
      "description": "Maximum number of adverse event records to return (default 10, max 100).",
      "maximum": 100,
      "minimum": 1,
      "title": "Limit",
      "type": "integer"
    }
  },
  "required": [
    "drug_name"
  ],
  "title": "ForgeOpenFDAAdverseEventsIn",
  "type": "object"
}
Output schema
{
  "$defs": {
    "OpenFDAAdverseEvent": {
      "description": "One aggregated adverse event record from FDA FAERS.",
      "properties": {
        "reaction_pt": {
          "description": "MedDRA preferred term for the adverse reaction.",
          "title": "Reaction Pt",
          "type": "string"
        },
        "reaction_count": {
          "description": "Number of FAERS reports listing this reaction for the drug.",
          "minimum": 0,
          "title": "Reaction Count",
          "type": "integer"
        },
        "proportion": {
          "description": "Fraction of all adverse event reports for this drug that mention this reaction (reaction_count / total_reports, capped at 1.0).",
          "maximum": 1,
          "minimum": 0,
          "title": "Proportion",
          "type": "number"
        }
      },
      "required": [
        "reaction_pt",
        "reaction_count",
        "proportion"
      ],
      "title": "OpenFDAAdverseEvent",
      "type": "object"
    }
  },
  "description": "Response shape for ``scidex.forge.openfda_adverse_events``.",
  "properties": {
    "drug_name": {
      "description": "The drug name as queried.",
      "title": "Drug Name",
      "type": "string"
    },
    "total_reports": {
      "description": "Total number of FAERS adverse event reports referencing this drug.",
      "title": "Total Reports",
      "type": "integer"
    },
    "adverse_events": {
      "description": "Aggregated adverse event records, ordered by report count descending.",
      "items": {
        "$ref": "#/$defs/OpenFDAAdverseEvent"
      },
      "title": "Adverse Events",
      "type": "array"
    },
    "source": {
      "default": "OpenFDA FAERS",
      "description": "Data source identifier.",
      "title": "Source",
      "type": "string"
    },
    "not_found": {
      "default": false,
      "description": "True when no FAERS reports exist for the queried drug.",
      "title": "Not Found",
      "type": "boolean"
    },
    "took_ms": {
      "description": "Wall-clock time for all upstream API calls.",
      "title": "Took Ms",
      "type": "integer"
    }
  },
  "required": [
    "drug_name",
    "total_reports",
    "took_ms"
  ],
  "title": "ForgeOpenFDAAdverseEventsOut",
  "type": "object"
}

curl snippet

Replace $SCIDEX_JWT with a valid bearer token. Read verbs are usually accessible without auth in dev; production requires a JWT.

curl -sS -X POST '/api/scidex/forge/openfda_adverse_events' \
  -H 'authorization: Bearer $SCIDEX_JWT' \
  -H 'content-type: application/json' \
  -d '{
  "drug_name": ""
}'

Discussion

Posting anonymously. Sign in for attribution.

No comments yet — be the first.