Spoonacular API

Food & Drink / API Key Intermediate HTTPS
Varies by plan (check documentation)

Overview

Spoonacular is a comprehensive food and recipe API that provides recipe search, ingredient data, nutritional analysis, and meal planning features. A free tier API key is available after signing up on the Spoonacular website. It is one of the most feature-rich food APIs available, making it suitable for building everything from simple recipe finders to full meal-planning applications.

💡

Beginner Tip

The free tier gives you 150 points per day — each endpoint call costs a different number of points, so check the quota dashboard at spoonacular.com regularly to avoid unexpected 402 errors.

Available Data

recipe name and ingredients
nutritional values
calorie count
serving size
preparation time

Example Response

JSON Response
{
  "recipe": "Chicken Stir Fry",
  "calories": 380,
  "protein_g": 32,
  "carbs_g": 28,
  "fat_g": 14,
  "ingredients": [
    "chicken breast",
    "bell pepper",
    "soy sauce",
    "garlic"
  ],
  "prep_time_minutes": 20
}

Field Reference

id Unique Spoonacular recipe identifier.
title Name of the recipe.
image URL of the recipe thumbnail image.
readyInMinutes Estimated total preparation and cooking time in minutes.
servings Number of servings the recipe yields.
sourceUrl URL of the original recipe source page.

Implementation Example

const url = "https://spoonacular.com/food-api";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "X-API-Key": "YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

402 Payment Required Your daily API quota (points) has been exhausted on the free tier.
Check your usage at spoonacular.com/food-api/console. Wait for the daily reset (midnight UTC) or upgrade your plan. Cache responses to avoid re-fetching the same recipes.
401 Unauthorized The apiKey parameter is missing or incorrect.
Append &apiKey=YOUR_API_KEY to every request URL or pass it as the x-api-key header.
Empty results array The search query is too specific or uses ingredient names not in the Spoonacular database.
Simplify the query (e.g., "pasta" instead of "gluten-free organic pasta") and avoid special characters in the query string.

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 5/20
🔒 Security 15/15
🛠 Developer XP 12/20
✓ Reliability 10/15

Partially tested on Apr 5, 2026

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS UNKNOWN
Category Food & Drink
Difficulty Intermediate
Verified: 2026-04-04

Similar APIs

View All →