DEV Community

Алексей Спинов
Алексей Спинов

Posted on

TheMealDB API — Free Recipe Data with Ingredients and Instructions

Building a food app? TheMealDB provides free recipe data with no API key.

Search Recipes

https://www.themealdb.com/api/json/v1/1/search.php?s=pasta
Enter fullscreen mode Exit fullscreen mode

Returns: name, category, cuisine, instructions, thumbnail, YouTube link, tags.

Browse by Category

https://www.themealdb.com/api/json/v1/1/filter.php?c=Seafood
Enter fullscreen mode Exit fullscreen mode

Browse by Cuisine

https://www.themealdb.com/api/json/v1/1/filter.php?a=Japanese
Enter fullscreen mode Exit fullscreen mode

Ingredients

Each recipe has up to 20 ingredients with measures. Parse with a loop:

for (let i = 1; i <= 20; i++) {
  const ing = meal[`strIngredient${i}`];
  if (ing?.trim()) ingredients.push(ing);
}
Enter fullscreen mode Exit fullscreen mode

Use Cases

  • Meal planning apps
  • Recipe recommendation engines
  • Cooking blogs with auto-content
  • Nutrition analysis tools

I built a Recipe Scraper on Apify — search knotless_cadence recipe.

Top comments (0)