Example Device Adverse Event API queries

To help get you started, we have provided some API query examples below. Use the Run query button to call the API and get back results. You can experiment by editing the example queries in the black text box.

Example query

One adverse event report

This query searches for all records in a certain date range, and asks for a single one. See searchable fields for more about date_received. Brackets [ ] are used to specify a range for date, number, or string fields.

See searchable fields for more about date_received. Brackets [ ] are used to specify a range for date, number, or string fields.

  1. Search for all records with date_received between Jan 01, 2013 and Dec 31, 2014. limit to 1 record.

  2. See searchable fields for more about date_received. Brackets [ ] are used to specify a range for date, number, or string fields.

Example query

One report involving an x-ray device

This query searches for records matching a certain search term, and asks for a single one.

See searchable fields for more fields you can use to narrow searches for device adverse event reports.

  1. search for all records with device.generic_name (generic device name) contains x-ray

Example query

Count of top event types associated with x-ray devices

This query is similar to the prior one, but returns a count of the most frequently reported event types.

The suffix .exact is required by openFDA to count the unique full phrases in the field event_type. Without it, the API will count each word in that field individually—No answer provided would be counted as separate values, No and answer and provided.

See searchable fields for more fields you can use to count and understand the nature of device adverse event reports.

  1. search for all records with device.generic_name (generic device name) contains x-ray

  2. count the field event_type (outcomes associated with an adverse event report)