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.
This query searches for all records and asks for a single one.
Search for all records and display one.
limit to 1 record.
This query searches for all records in a certain date range.
See the header fields reference for more about date_submitted. Brackets
[ ] are used to specify a range for date, number, or string fields.
search for all records with date_submitted between Jan 01, 2018 and July 23, 2020.
The suffix .exact is required by openFDA to count the unique full phrases in the field product_type. Without it, the API will count each word in that field individually—Firm Initiated would be counted as separate values, Firm and Initiated.
search the tobacco products selected by the reporter