USDA FoodData Central API
by fdc.nal.usda.gov
Food and drink
Added on December 1st, 2026
Visit fdc.nal.usda.gov →
What it does
The FoodData Central API from the US Department of Agriculture gives nutrient data for basic foods, survey foods and branded products, for example to count the calories in a recipe or look up a packaged food. Search foods by keyword or fetch them by FDC ID and get JSON. Free with a free data.gov API key, with a default limit of 1,000 requests per hour per IP address. The data is public domain (CC0 1.0), and the USDA asks to be named as the source.
At a glance
- API key
- Needed, free · More APIs with a free key
- Pricing
- Free with a free data.gov API key, with a default limit of 1,000 requests per hour per IP address.
- Commercial use
- Allowed on the free plan
- From the browser
- Yes (CORS)
- Formats
- JSON
- Interface
- REST, HTTP-GET
- Provider
- fdc.nal.usda.gov
More information: https://fdc.nal.usda.gov/api-guide/
Is this your service? Show that it is listed
Put this badge on your website or in your README; it links to this page. About the badge
Example request
curl
curl 'https://api.nal.usda.gov/fdc/v1/foods/search?query=apple&pageSize=1&api_key=YOUR_API_KEY'
JavaScript
const response = await fetch("https://api.nal.usda.gov/fdc/v1/foods/search?query=apple&pageSize=1&api_key=YOUR_API_KEY");
const data = await response.json();
console.log(data);
Python
import requests
response = requests.get(
"https://api.nal.usda.gov/fdc/v1/foods/search?query=apple&pageSize=1&api_key=YOUR_API_KEY",
timeout=30,
)
print(response.json())
Replace YOUR_API_KEY with your own key. The JavaScript works in a web page as well as in Node.js 18 or newer.