Frequently Asked Questions

From AI Assistant App
Note: Community members can edit this page.


How to set openFDA queries?
Queries to the openFDA APIs are made up of search parameters.

Each parameter follows this syntax: field:term. Note that there is a colon : between the field to search, and the term to search for.

Search parameters are combined with an AND criteria. Blank parameters are not used in the query.

Keyword search terms will match any field.

For phrase matches, use double quotation marks " " around the words. For example, "multiple+myeloma"

Use + for a space character in a term, For example, "multiple+myeloma"

Wildcard queries return data that contain terms matching a wildcard pattern.

For example, brand_name:child* will match records where the field brand_name contains child*, case-insensitive so "Child", "Children", "Childrens" among others will match.

To group several terms together, use parentheses ( ).

For example, patient.drug.medicinalproduct:(cetirizine+OR+loratadine+OR+diphenhydramine). To join terms as in a boolean AND, use the term +AND+. For example, (patient.drug.medicinalproduct:(cetirizine+OR+loratadine+OR+diphenhydramine))+AND+serious:2 requires that any of the drug names match and that the field serious also match.

How to define effective AI prompts for analysis?
Specify objectives clearly for targeted insights.

Use natural language for intuitive interactions.

Consider context for relevant prompts.

Offer guidance within prompts for effective queries.

Iterate prompts for continuous improvement.

Use ChatGPT or Gemini to optimize prompt structure.

How to search by range in date, numeric, or string fields?
The openFDA API supports searching by range in date, numeric, or string fields.

Specify an inclusive range by using square brackets [min+TO+max]. These include the values in the range.

For example, [1+TO+5] will match 1 through 5.

Dates are simple to search by via range.

For instance, [2004-01-01+TO+2005-01-01] will search for records between Jan 1, 2004 and Jan 1, 2005.

What are the searchable fields for the various openFDA databases?
Below is a list of documents outlining search fields for supported openFDA databases:

Media: Device Unique Device Identifier Searchable Fields.pdf

Media: Device Covid19 Serological Testing Evaluations Searchable Fields.pdf

Media: Device Registrations Searchable Fields.pdf

Media: Device Recalls Searchable Fields.pdf

Media: Device Premarket Approval Searchable Fields.pdf

Media: Device Adverse Events Searchable Fields.pdf

Media: Device Recall Enforcement Searchable Fields.pdf

Media: Device Classification Searchable Fields.pdf

Media: Device 510k Searchable Fields.pdf

Media: Drug Drugs at FDA Searchable Fields.pdf

Media: Drug Recall Enforcement Searchable Fields.pdf

Media: Drug NDC Directory Searchable Fields.pdf

Media: Drug Product Labeling Searchable Fields.pdf

Media: Drug Adverse Events Searchable Fields.pdf

Note: As of April 9, 2024, these documents are up to date. For any newer versions or other formats, please refer to the openFDA website: https://open.fda.gov/