Foodish API

⭐ Beginner's Pick Food & Drink / No Auth Required Beginner HTTPS CORS
Free to Use Varies (check documentation)

Overview

Foodish is a fun, free API that returns a random food dish image URL each time you call it. It requires no authentication, making it perfect for beginners who want to add food photos to a web page or app. Just make a GET request and you instantly receive a URL pointing to a randomly selected dish image.

💡

Beginner Tip

Foodish is great for practicing fetch() calls since there is no API key needed — just call the endpoint and display the returned image URL in an img tag.

Available Data

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

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

image Full URL of a randomly selected food dish image (JPEG).

Implementation Example

const url = "https://github.com/surhud004/Foodish";
const response = await fetch(url);
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

No image displayed The returned JSON contains an "image" field with the URL — you need to extract that property before setting it as an img src.
Parse the JSON and use response.image as the src: const data = await res.json(); img.src = data.image;
CORS error in browser Some older deployments of Foodish may not send CORS headers to all origins.
Run a quick test with curl first. If the API responds in curl but not in the browser, use a server-side proxy for development.
404 Not Found The base URL has changed; the current live endpoint is https://foodish-api.com/api/.
Make sure you are calling https://foodish-api.com/api/ (not the GitHub readme URL) and that the trailing slash is included.

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 20/20
🔒 Security 15/15
🛠 Developer XP 20/20
✓ Reliability 7/15
Response Time 46ms

Fully tested on Apr 5, 2026

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS YES
Category Food & Drink
Difficulty Beginner
Verified: 2026-04-04

Similar APIs

View All →