How to use the API

Getting started with and learning how to use the API is relatively straightforward. Here are some recommended steps:

Then, when you are ready, obtain an API Key. While you don’t need an API Key to try or use the API, we recommend you get one if you are planning to use the API on a regular basis. For more information on API Keys, see the Authentication documentation.

Making a simple API Call

You can call the API from a web browser. Simply type a valid API query in your browser’s address bar and press the Enter key.

In the example below, we are searching the records in the 510k endpoint for matches with cv in the advisory_committee field. We are requesting to see the first 5 records that match."
base endpoint

Some key pointers

  • An openFDA API query always begins with the base endpoint, which in this case is:
  • Searches have a special syntax: search=field:term
  • Unless otherwise specified, the API will return only one matching record for a search. You can specify the number of records to be returned by using the limit parameter. The maximum limit allowed is 1000 for any single API call. If no limit is set, the API will return one matching record.

It is possible to construct very complex queries using the openFDA API. Review the Construct the query documentation to learn more about all the available query parameters, how to handle quotations, spaces, phrase matches, and groupings, how to search on dates and ranges, and more.