Recipe API - TheMealDB, AllRecipes Scraper & Spoonacular
Pricing
from $0.01 / 1,000 results
Recipe API - TheMealDB, AllRecipes Scraper & Spoonacular
Search and retrieve recipes from multiple sources: TheMealDB (free API), AllRecipes (scraper), and Spoonacular (BYOK). Get ingredients, instructions, nutrition info, meal planning, and more.
Pricing
from $0.01 / 1,000 results
Rating
0.0
(0)
Developer
The Howlers
Maintained by CommunityActor stats
0
Bookmarked
6
Total users
0
Monthly active users
4 days ago
Last modified
Categories
Security
Limited permissionsShare
Search and retrieve recipes from multiple sources: TheMealDB (free API), AllRecipes (scraper), and Spoonacular (BYOK). Get ingredients, instructions, nutrition info, meal planning, and more.
BYOK (Bring Your Own Key): Spoonacular features use your own Spoonacular API key.
Before You Start
TheMealDB and AllRecipes need no key. Spoonacular features (Spoonacular search, details, random recipes, ingredient search on Spoonacular, and meal plans) need your own Spoonacular API key. Get one at https://spoonacular.com/food-api
Demo Mode is off by default, so runs fetch real data. Set demoMode to true to get free sample data that shows the output format, no key needed.
Quick Start
Test with Demo Mode (no API key needed)
{"demoMode": true,"query": "chicken"}
Run with real data (no key needed)
{"demoMode": false,"task": "search_recipes","source": "themealdb","query": "chicken","maxResults": 10}
Full recipe from an AllRecipes page
{"demoMode": false,"task": "get_recipe_details","recipeId": "https://www.allrecipes.com/recipe/23600/worlds-best-lasagna/"}
Meal plan with your Spoonacular key
{"demoMode": false,"task": "meal_plan","spoonacularApiKey": "YOUR_API_KEY_HERE","mealPlanDays": 7,"targetCalories": 2000,"diet": ""}
Input Parameters
| Parameter | Type | Default | Required | Description |
|---|---|---|---|---|
task | string | "search_recipes" | No | What would you like to do? |
source | string | "themealdb" | No | Which recipe source to use |
query | string | - | No | Recipe name, ingredient, or keyword to search for |
recipeId | string | - | No | Specific recipe ID (TheMealDB/Spoonacular) or AllRecipes URL |
category | string | - | No | Recipe category (e.g., Beef, Chicken, Dessert, Pasta, Seafood, Vegetarian) |
cuisine | string | - | No | Cuisine type (e.g., Italian, Mexican, Chinese, Indian, American) |
maxResults | integer | 10 | No | Maximum number of recipes to return |
includeNutrition | boolean | false | No | Fetch nutrition data when available (Spoonacular only). Each recipe returned with nutrition is billed as one Nutrition Data event. |
spoonacularApiKey | string | - | No* | Your Spoonacular API key for enhanced features. Get one at https://spoonacular.com/food-api. Each Spoonacular request that returns data is billed as one Spoonacular API Call event. |
mealPlanDays | integer | 7 | No | Number of days for meal plan (Spoonacular only) |
targetCalories | integer | 2000 | No | Target calories per day for meal planning |
diet | string | "" | No | Dietary restriction for filtering |
demoMode | boolean | false | No | Run with sample data to test without making real API calls |
webhookUrl | string | - | No | Send results to this webhook URL (Zapier, Make, n8n, or custom). Each delivery your endpoint accepts is billed as one Webhook Delivery event (not in Demo Mode). |
webhookPlatform | string | "custom" | No | Which platform is receiving the webhook |
webhookHeaders | object | - | No | Optional custom headers for webhook requests |
*Needed only for Spoonacular features (Demo Mode off).
Pricing
This actor uses pay-per-event billing.
Every run, including a demo run, is charged Apify's Actor Start event ($0.10 per GB of memory, minimum one) and $0.00001 per result row saved to the dataset (each run saves one row). A real run (Demo Mode off) also charges one task event when the task returns results:
| Event | When it is charged | Price |
|---|---|---|
| Actor start | Once when the run starts, one event per GB of memory (minimum one). At the default 4 GB of memory a run starts at $0.40 | $0.10 per GB |
| Recipe Search | Search for recipes by keyword across all sources | $0.005 |
| List Categories | Get all available recipe categories | $0.002 |
| List Cuisines | Get all available cuisines/areas | $0.002 |
| Meal Plan Day | Generate one day of meal planning (breakfast, lunch, dinner) | $0.015 |
| AllRecipes Scrape | Scrape recipe from AllRecipes.com with full details | $0.01 |
| Spoonacular API Call | Make a request to Spoonacular API (BYOK) | $0.008 |
| Nutrition Data | Fetch detailed nutrition information for a recipe | $0.005 |
| Webhook Delivery | Send results to webhook (Zapier, Make, n8n, custom) | $0.002 |
| Recipe Details Fetch | Fetch full recipe details including ingredients, instructions, and nutrition | $0.008 |
| Random Recipe | Get a random recipe from TheMealDB or Spoonacular | $0.003 |
| Category Filter | Filter recipes by category (dessert, pasta, breakfast, etc.) | $0.005 |
| Cuisine Filter | Filter recipes by cuisine (Italian, Mexican, Thai, etc.) | $0.005 |
| Ingredient Search | Find recipes containing specific ingredients | $0.006 |
| Result | Each item written to the default dataset | $0.00001 |
A task that returns no results is not charged a task event.
Some work is billed as an add-on, only when it actually happens:
| Add-on | When it is charged | Price |
|---|---|---|
| Spoonacular API Call | Each Spoonacular request made with your key that returns data. A failed request (bad key, daily quota used up, unknown recipe) is not charged. | $0.008 per request |
| AllRecipes Scrape | Each AllRecipes recipe page scraped with full details (get_recipe_details with an AllRecipes URL). AllRecipes search results only have names and links and are covered by Recipe Search. | $0.01 per recipe page |
| Nutrition Data | Each returned recipe that includes Spoonacular nutrition (includeNutrition on). | $0.005 per recipe |
| Webhook Delivery | Each webhook your endpoint accepts (HTTP 2xx). A failed delivery is not charged. | $0.002 per delivery |
How many Spoonacular requests a task makes:
search_recipes,get_recipe_details,random_recipe: 1 request.ingredient_searchon Spoonacular: 1 request, plus 1 per recipe returned (to load its full details).meal_plan: 1 request, plus 1 per planned meal (3 per day). A 7-day plan makes up to 22 requests.
Demo mode charges no task or add-on events, including for a webhook. The Actor Start event and the per-row fee above still apply to a demo run.
Troubleshooting
"Spoonacular API key is required"
You asked for a Spoonacular-only task (such as meal_plan) without a key. Either:
- Turn Demo Mode on to test with sample data
- Add your Spoonacular API key in the input
"Spoonacular ... failed: HTTP 401" or "HTTP 402"
401 means Spoonacular rejected your key. 402 means your Spoonacular plan's daily quota is used up. The run log shows Spoonacular's own message. These failed requests are not charged.
"API error 429" or "Rate limit"
Too many requests. Wait a minute and try again, or reduce the number of items per run.
No results or empty dataset
Check the run log for error messages. Common causes:
- Invalid input format (check the examples above)
- API key without proper permissions
- The target data doesn't exist or is too small to track
How do I test without an API key?
Enable Demo Mode in the input. This returns realistic sample data so you can verify the output format works for your workflow.
Built by John Rippy | Actor Arsenal