To help get you started, we have provided some 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
This query searches for all finished products, and asks for a single one.
See the searchable fields for more about finished
.
Search for all products which have finished
set to true.
Limit to 1 record.
Example query
This query searches all lotion products, and returns a single product.
Double quotation marks " "
surround phrases that must match exactly.
Search for all products which have dosage_form
equal to 'LOTION'.
Limit to 1 record.
Example query
This query searches the endpoint for all products, and tells the API to count how many included each pharm_class
.
The suffix .exact is required by openFDA to count the unique full phrases in the field voluntary_mandated. Without it, the API will count each word in that field individually.
Count the field pharm_class
.