Food, Health & Nature
Nutrition API
Calories and full macronutrient breakdowns for thousands of everyday foods in one query.
Request Headers
| Name | Required | Description |
|---|---|---|
X-RapidAPI-Key | required | Your RapidAPI key. Get one free. |
X-RapidAPI-Host | required | nutrition.p.rapidapi.com |
Endpoints
GET
/v1/nutrition Nutrition facts for foods matching a name
Parameters
| Name | Type | Required | Default | Constraints |
|---|---|---|---|---|
food | string | required | — | matches \S |
limit | integer | optional | — | — |
offset | integer | optional | — | — |
Code Examples
curl --request GET \
--url 'https://nutrition.p.rapidapi.com/v1/nutrition?food=example' \
--header 'x-rapidapi-key: YOUR_API_KEY' \
--header 'x-rapidapi-host: nutrition.p.rapidapi.com' const url = "https://nutrition.p.rapidapi.com/v1/nutrition?food=example";
const options = {
method: "GET",
headers: {
"x-rapidapi-key": "YOUR_API_KEY",
"x-rapidapi-host": "nutrition.p.rapidapi.com"
}
};
const response = await fetch(url, options);
const data = await response.json();
console.log(data); import requests
url = "https://nutrition.p.rapidapi.com/v1/nutrition"
querystring = {"food": "example"}
headers = {
"x-rapidapi-key": "YOUR_API_KEY",
"x-rapidapi-host": "nutrition.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
print(response.json()) Interactive Example
$ GET /v1/nutrition?food=banana
{"data":[{"name":"Banana, raw","calories":89.0,"protein_g":1.1,"fat_g":0.3,"carbs_g":22.8,"fiber_g":2.6,"sugar_g":12.2,"sodium_mg":1.0,"serving_size_g":100.0}],"meta":{"total":1,"limit":10,"offset":0}} Subscribe & License
Access this API with commercial-ready tiers on RapidAPI. Flexible plans designed for side-projects, startups, and high-volume production architectures.
Developer Support
Need help integrating or have a custom endpoint request? Our engineering team is here to assist with authentication, payload schemas, and high-frequency rate limit increases.
System Performance
Monitored 24/7 with a 99.9% uptime SLA. Built atop cloud-native microservices with globally distributed edge caching to ensure ultra-low latency response times.
All Systems Operational