TheMealDB is a free, open meal and recipe database. The v1 API requires no API key or authentication, making it well-suited for learning projects and demos.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Miguelcds/Recipe-Hub/llms.txt
Use this file to discover all available pages before exploring further.
The v1 API (
/api/json/v1/1/) is free and has no documented rate limits. Do not use it in production applications with high traffic — switch to a v2 key or a self-hosted mirror for anything beyond demos.Search by name
Find meals matching a name query.
Lookup by ID
Fetch full detail for a single meal.
Random meal
Retrieve a random meal from the database.
Search by name
Parameters
The meal name to search for. Partial matches are supported (e.g.,
chicken returns all meals containing “chicken”).Example request
example request
Raw API response shape
The API returns ameals array. Each object contains the full meal record:
example response
TheMealDB always returns exactly 20 ingredient fields (
strIngredient1–strIngredient20) and 20 measure fields (strMeasure1–strMeasure20) per meal. Unused slots are empty strings or null. The app loops over all 20 and filters out the empty ones before returning them to the UI.What the app returns
The service layer maps the raw response to a leaner shape before passing it to the UI:TheMealDB meal ID (
idMeal).Meal name (
strMeal).URL to the meal thumbnail image (
strMealThumb).Meal category, e.g. “Chicken”, “Dessert” (
strCategory).Lookup by ID
Parameters
The TheMealDB meal ID. Obtain this from a search or random result (
idMeal).Example request
example request
Raw API response shape
The response structure is identical to the search endpoint — ameals array with one item:
example response
What the app returns
The lookup response is mapped to an extended shape that includes the full recipe detail:TheMealDB meal ID (
idMeal).Meal name (
strMeal).URL to the meal thumbnail image (
strMealThumb).Meal category (
strCategory).Step-by-step cooking instructions (
strInstructions).YouTube video URL for the recipe (
strYoutube). May be empty.Parsed ingredient list. Each item is an object:
Random meal
Parameters
This endpoint takes no parameters.Example request
example request
How the app uses this endpoint
To populate the home page grid, Recipe Hub fires 9 parallel requests usingPromise.all:
parallel random fetch
What the app returns
Each random meal is mapped to the same lean shape used by the search endpoint:TheMealDB meal ID.
Meal name.
URL to the meal thumbnail image.
Meal category.