Skip to content

OpenFDA Drug Product Label

Queries the OpenFDA Drug Label endpoint to retrieve product labeling data (e.g., warnings, adverse reactions, interactions) based on a selected field and search value. Supports both search and count actions, optional exact matching, and a configurable result limit. Returns JSON-formatted strings for both results and API metadata.
Preview

Usage

Use this node when you need structured information from FDA drug labeling, such as warnings, precautions, adverse reactions, or instructions for use. Specify the field you want to query, provide a search term, choose whether to search or count, and set the result limit. Integrate it early in workflows that need authoritative drug label text for downstream analysis, summarization, or compliance checks.

Inputs

FieldRequiredTypeDescriptionExample
field_valueTrueSTRINGThe value to match against the selected field. This is the user-provided query string used in the OpenFDA search.aspirin
fieldTrueCHOICEThe label section or attribute to search in. Determines which OpenFDA field is queried.adverse reactions
actionTrueCHOICEThe operation to perform. 'search' returns matching documents; 'count' returns aggregation counts for the chosen field.search
exact_matchTrueBOOLEANIf true, performs an exact match query on the field using the '.exact' subfield.false
limitTrueINTMaximum number of results to return. Must be 1 or greater.3

Outputs

FieldTypeDescriptionExample
resultsSTRINGJSON string of the OpenFDA API 'results' array. For 'search', this is a list of matching label documents; for 'count', this is a list of count buckets.[{...}, {...}]
metadataSTRINGJSON string of the OpenFDA API 'meta' object, including paging and query information.{"disclaimer": "...", "results": {"limit": 3, "skip": 0, "total": 1234}}

Important Notes

  • Search Fields: Available choices include 'abuse', 'adverse reactions', 'components', 'drug interactions', 'effective time', 'general_precautions', 'instructions for use', 'nursing_mothers', 'overdosage', 'precautions', and 'warnings'.
  • Exact Match: When exact_match is true, the node queries the '.exact' variant of the selected field for precise matches.
  • Actions: 'search' returns documents; 'count' returns aggregated counts for the selected field value.
  • Output Format: Both outputs are JSON strings. Downstream nodes may need to parse them before further processing.
  • Limits and Quotas: OpenFDA enforces rate limits; large limits or frequent calls may hit throttling.
  • Endpoint Used: Queries https://api.fda.gov/drug/label.json with the constructed parameters.

Troubleshooting

  • Empty results: Try broadening 'field_value', switch off exact_match, or increase 'limit'. Verify the chosen field is appropriate for the data you expect.
  • Invalid field errors: Ensure 'field' is selected from the provided choices. Custom values are not supported.
  • Network error: Intermittent connectivity or API downtime will return an error JSON string. Retry later or check network settings.
  • JSON decode error: The API response may be malformed or truncated. Retry the request; if persistent, reduce the 'limit' and check rate limits.
  • Unexpected 'count' output: When action is 'count', 'results' is an array of buckets rather than documents. Ensure downstream parsing matches the chosen action.