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

The kind of data this API exposes, based on its documentation. We could not call the endpoint to confirm the exact field names.

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

Example Response

Illustrative shape only — we were not able to call this endpoint (it requires credentials or exposes no public sample URL), so the fields below show the kind of data this API returns rather than a recorded response.

JSON Response · Illustrative
{
  "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

Calls a real endpoint of this API. Replace any placeholder credentials with your own key.

Request
const url = "https://foodish-api.com/api/";
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

Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.

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.

Metadata Score Breakdown

Estimated from metadata — endpoint not independently tested

This score is estimated from observable metadata — HTTPS support, authentication model, declared CORS, and documentation reachability — because the API requires authentication or exposes no publicly testable endpoint. The five-signal breakdown is only shown for live-tested APIs.

Metadata estimate · endpoint not independently tested

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS YES
Category Food & Drink
Difficulty Beginner
Listing details not endpoint-verified

Related Tags

Similar APIs

View All →