Food API Documentation
Access comprehensive food nutrition data with our powerful REST API. Search, retrieve, and analyze nutritional information for thousands of foods.
Quick Start
Get started in minutes with our comprehensive food database API. Create an account, choose a plan, get your API key, and start making requests.
Getting Started
Create Your Account
Sign up for a free account to access the Food API. No credit card required for the free tier.
Create AccountChoose Your Plan
Select a plan that fits your needs. Start with our free plan or upgrade for more requests and features.
Free
$0/month
- • 20 requests/day
- • 3 requests/minute
- • Basic endpoints
- • Community support
Basic
$29/month
- • 1,000 requests/day
- • 10 requests/minute
- • All endpoints
- • Email support
Core
$99/month
- • 5,000 requests/day
- • 30 requests/minute
- • All features
- • Priority support
Get Your API Key
After subscribing to a plan, generate your API key from the dashboard. This key authenticates your requests.
sk_live_1234567890abcdefMake Your First Request
Test your API key with a simple search request. Replace the API key with your actual key.
curl https://food-nutrition-database-cd7099c2be07.herokuapp.com/v1/search?q=apple \ -H "X-API-Key: your_api_key_here"
Food API Endpoints
Our API provides comprehensive access to food nutrition data through simple REST endpoints.
Search Foods
Search for foods by name, brand, or category. Returns a list of matching foods with basic nutrition information.
curl https://food-nutrition-database-cd7099c2be07.herokuapp.com/v1/search?q=apple \ -H "X-API-Key: your_api_key_here"
Query Parameters
qSearch query (required)limitResults per page (default: 20)skipSkip results (default: 0)brandFilter by brandResponse Example
{
"foods": [
{
"id": 12345,
"name": "Apple, raw",
"brand": "Generic",
"calories": 52,
"protein": 0.3,
"carbs": 13.8,
"fat": 0.2
}
],
"total": 1,
"page": 1
}Food Details
Get detailed nutritional information for a specific food item by its ID.
curl https://food-nutrition-database-cd7099c2be07.herokuapp.com/v1/foods/12345 \ -H "X-API-Key: your_api_key_here"
Nutrients
Access detailed nutrient information including vitamins, minerals, and macronutrients.
curl https://food-nutrition-database-cd7099c2be07.herokuapp.com/v1/nutrients/ \ -H "X-API-Key: your_api_key_here" \ -G -d "limit=50" -d "skip=0"
Brands
Retrieve brand information including company details, country of origin, and website links.
curl https://food-nutrition-database-cd7099c2be07.herokuapp.com/v1/brands/ \ -H "X-API-Key: your_api_key_here" \ -G -d "limit=100" -d "skip=0"
Categories
Access food categories and subcategories for better organization and filtering of food items.
curl https://food-nutrition-database-cd7099c2be07.herokuapp.com/v1/categories/ \ -H "X-API-Key: your_api_key_here" \ -G -d "limit=50" -d "skip=0"
Authentication
All API requests require authentication using your API key. Include it in the request headers.
Keep Your API Key Secure
Never expose your API key in client-side code or public repositories. Use environment variables or secure configuration management.
Rate Limits
Error Handling
400Bad Request401Unauthorized429Rate Limited500Server Error