Skip to main content

Random Food & Dish API

MOCK DATA

Fake dishes from 12 cuisines with coherent ingredient lists, calories and spice levels — a real vegetarian filter that bans every meat ingredient.

Generated test data for fixtures and development

Base URL
/api/foods
Capabilities
1 route Seedable
Last updated
July 29, 2026

GET /api/foods

Live requestRuns against the public API
No key required
GET/api/foods?cuisine=japanese&count=5

Request parameters

Only generate dishes of this cuisine — the dish name comes from the cuisine's own pools and the cuisine field matches. Omit for a mix of all 12.

true ⇒ only vegetarian dishes (no meat word in the name, zero meat-pool ingredients); false ⇒ only meat dishes (≥1 meat ingredient). Omit for a mix.

Advanced response options7 options

How many records to generate (1–100).

Deterministic output: the same seed always returns the same records. Omit for random (the used seed is echoed in meta.seed).

Return only these fields (comma-separated). Mutually exclusive with 'exclude'.

Return all fields except these (comma-separated).

Response format: json envelope, ndjson (one record per line) or csv.

Pretty-print the JSON response.

Drop the envelope: return the raw array/object without data/meta wrapper.

Response

Example parameters are ready. Send the request to inspect the live response.

Route reference

Code samples Ready-to-copy requests in 4 languages
Choose a code sample language
curl "https://randomapi.dev/api/foods?cuisine=japanese&count=5"
const res = await fetch("https://randomapi.dev/api/foods?cuisine=japanese&count=5");
const { data, meta } = await res.json();
import requests

data = requests.get("https://randomapi.dev/api/foods?cuisine=japanese&count=5").json()["data"]
$json = json_decode(file_get_contents(
  "https://randomapi.dev/api/foods?cuisine=japanese&count=5"
), true);
$data = $json["data"];
Parameters Route-specific request inputs 2
cuisine enum

Only generate dishes of this cuisine — the dish name comes from the cuisine's own pools and the cuisine field matches. Omit for a mix of all 12.

allowed: italian | japanese | mexican | indian | thai | chinese | french | greek | american | middle-eastern | korean | vietnamese
example: cuisine=japanese
vegetarian boolean

true ⇒ only vegetarian dishes (no meat word in the name, zero meat-pool ingredients); false ⇒ only meat dishes (≥1 meat ingredient). Omit for a mix.

example: vegetarian=true
Universal parameters Shared response and formatting options 7
count int

How many records to generate (1–100).

default: 10
allowed: 1 – 100
example: count=3
seed int

Deterministic output: the same seed always returns the same records. Omit for random (the used seed is echoed in meta.seed).

example: seed=42
fields list

Return only these fields (comma-separated). Mutually exclusive with 'exclude'.

example: fields=dish,cuisine
exclude list

Return all fields except these (comma-separated).

example: exclude=spiceLevel
format enum

Response format: json envelope, ndjson (one record per line) or csv.

default: json
allowed: json | ndjson | csv
example: format=csv
pretty boolean

Pretty-print the JSON response.

default: false
example: pretty=true
unwrap boolean

Drop the envelope: return the raw array/object without data/meta wrapper.

default: false
example: unwrap=true
Response schema Fields returned in each record 6
dish string

Dish name, verbatim from the cuisine's own pool (vegetarian or meat list).

example: Kitsune Udon

cuisine string

One of the 12 cuisines; always matches the pool the dish came from.

example: japanese

ingredients string[]

3–8 distinct ingredients. Vegetarian records draw only from the vegetarian pool; meat records include 1–2 meat-pool items.

example: ["tofu","soy sauce","scallions","ginger","rice noodles"]

calories integer

Estimated calories per serving, 150–1400 (generated, not nutrition data).

example: 640

vegetarian boolean

True ⇔ the dish is vegetarian: no meat word in the name, zero meat ingredients.

example: true

spiceLevel integer

Heat from 0 (none) to 3 (hot). Indian and thai dishes lean hot; the rest lean mild.

example: 2

Documented examples

Build-generated requests and complete responses
3
Five Japanese dishes
GET /api/foods?cuisine=japanese&count=5
{
  "data": [
    {
      "dish": "Beef Sukiyaki",
      "cuisine": "japanese",
      "ingredients": [
        "tofu",
        "scallions",
        "tuna",
        "chickpeas",
        "egg",
        "mushroom"
      ],
      "calories": 692,
      "vegetarian": false,
      "spiceLevel": 0
    },
    {
      "dish": "Vegetable Tempura",
      "cuisine": "japanese",
      "ingredients": [
        "soy sauce",
        "zucchini",
        "olive oil",
        "egg",
        "sesame oil"
      ],
      "calories": 659,
      "vegetarian": true,
      "spiceLevel": 0
    },
    {
      "dish": "Chicken Katsu Curry",
      "cuisine": "japanese",
      "ingredients": [
        "rice noodles",
        "anchovies",
        "tomato",
        "eggplant",
        "scallions""generatedAt": "2026-07-29T08:13:22.000Z"
  }
}
A vegetarian Indian menu
GET /api/foods?cuisine=indian&vegetarian=true&count=8&seed=7
{
  "data": [
    {
      "dish": "Vegetable Biryani",
      "cuisine": "indian",
      "ingredients": [
        "eggplant",
        "cumin",
        "ginger",
        "zucchini",
        "chickpeas",
        "cabbage",
        "coconut milk",
        "lentils"
      ],
      "calories": 192,
      "vegetarian": true,
      "spiceLevel": 3
    },
    {
      "dish": "Aloo Gobi",
      "cuisine": "indian",
      "ingredients": [
        "basil",
        "cabbage",
        "cumin",
        "olive oil",
        "mushroom",
        "eggplant"
      ],
      "calories": 656,
      "vegetarian": true,
      "spiceLevel": 2
    },
    {
      "dish": "Aloo Gobi",
      "cuisine": "indian",
      "ingredients": [
        "chickpeas",
        "egg",
    …
    "generatedAt": "2026-07-29T08:13:22.000Z"
  }
}
Reproducible mixed menu
GET /api/foods?count=12&seed=42
{
  "data": [
    {
      "dish": "Beef and Broccoli",
      "cuisine": "chinese",
      "ingredients": [
        "cabbage",
        "prosciutto",
        "salmon fillet",
        "chickpeas"
      ],
      "calories": 604,
      "vegetarian": false,
      "spiceLevel": 2
    },
    {
      "dish": "Caprese Salad",
      "cuisine": "italian",
      "ingredients": [
        "potato",
        "carrot",
        "lentils",
        "cabbage",
        "spinach",
        "lemon"
      ],
      "calories": 160,
      "vegetarian": true,
      "spiceLevel": 2
    },
    {
      "dish": "Vegetable Japchae",
      "cuisine": "korean",
      "ingredients": [
        "tofu",
        "tomato",
        "eggplant",
        "scallions",
        "rice noodles"
      ],
    …
    "generatedAt": "2026-07-29T08:13:22.000Z"
  }
}

About this API

Coverage & behavior

Generates plausible dish records for restaurant demos, delivery-app mockups and menu fixtures. Every dish name comes verbatim from per-cuisine pools?cuisine=japanese really returns things like Kitsune Udon or Tonkotsu Ramen, never a taco — and the cuisine field always matches the pool the dish came from. Omit cuisine for a mix across all 12.

The vegetarian flag is enforced, not cosmetic. The ingredient pools are disjoint: with ?vegetarian=true the dish name contains no meat word and the ingredients array contains zero items from the meat pool; with ?vegetarian=false every record is a meat dish with at least one meat ingredient. Omit the param for a mix — each record's vegetarian field still tells the truth about its own ingredients. (Vegetarian is lacto-ovo: dairy and egg are allowed.)

ingredients always holds 3–8 distinct items, calories falls between 150 and 1400, and spiceLevel runs 0–3 with indian and thai leaning hot (2–3 far more likely) while the rest lean mild. All dishes are generated demo data — not recipes or nutrition advice. With a seed the same request returns byte-identical menus forever.

Use it for

  • Fill a restaurant menu, delivery-app or recipe-UI demo with cuisine-consistent dishes
  • Test dietary filters against a vegetarian flag that provably excludes meat ingredients
  • Reproducible menu fixtures via seed — the same dishes in every CI run

Frequently asked questions

Is the vegetarian filter trustworthy?

Yes — vegetarian=true only returns dishes whose ingredient lists are genuinely meat- and fish-free. It's an honest filter, not a label.

Do the ingredients match the dish?

Each dish carries a coherent ingredient list, calorie estimate and spice level for its cuisine — believable menus for restaurant demos.

Can I request one cuisine?

Yes — cuisine restricts output to dishes that actually belong to that cuisine.