Recipe search
Searches BBC Good Food's recipes with its filters: cuisine, diet (vegetarian, vegan, gluten-free, healthy...), difficulty, meal type, total time or a maximum time in minutes, calories, servings, rating or a minimum star rating, and author; sort by relevance, newest, rating or quickest. Each recipe: id, title, link, author, rating and count, total time, difficulty, labels, image, video. facets lists every filter value with counts. With site=allrecipes, searches Allrecipes instead (24 per page: id, title, link, star rating, rating count, category tag, image; the BBC filters do not apply). Pass next_page back as page; null on the last page.
Every response includes credits_used: the credits this call cost.
Parameters
| name | type | description |
|---|---|---|
qrequired | string | Dish, ingredient or keywords. Example: lasagne |
site | string | bbcgoodfood (default) or allrecipes. |
cuisine | string | e.g. italian, indian, mexican (values in facets). |
diet | string | e.g. vegetarian, vegan, gluten-free, healthy, low-calorie, high-protein. |
difficulty | string | easy, more-effort or a-challenge. |
meal_type | string | e.g. dinner, lunch, breakfast, dessert, snack. |
total_time | string | lt-900 (15 min), lt-1800, lt-2700, lt-3600, gte-3600. |
max_time | integer | Total time at most this many minutes (1-1440), instead of total_time. |
calories | string | lt-250, lt-500, lt-750, lt-1000... |
servings | string | gte-1 ... gte-8. |
rating | string | gte-1 ... gte-5 stars. |
rating_min | integer | Minimum star rating 1-5, instead of rating. |
sort | relevant | published | rating | quickest | relevant (default), published, rating, quickest. |
limit | integer | Per page (default 24, max 60). |
page | integer | Page (default 1). |
Every endpoint also takes fresh, raw, fields (see lean responses and caching).
Example
curl "https://api.api.sh/recipes/v1/search?q=lasagne" \
-H "x-api-key: $APISH_KEY" import os, requests
res = requests.get(
"https://api.api.sh/recipes/v1/search",
params={"q": "lasagne"},
headers={"x-api-key": os.environ["APISH_KEY"]},
timeout=120,
)
res.raise_for_status()
data = res.json() const url = new URL("https://api.api.sh/recipes/v1/search");
url.searchParams.set("q", "lasagne");
const res = await fetch(url, { headers: { "x-api-key": process.env.APISH_KEY } });
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const data = await res.json(); Response
A JSON object with the fields described above, plus raw (the source's own data), cached, fetched_at and credits_used. Errors return {"success": false, "error": "…"} with the HTTP status (see errors). A lookup that ran but found nothing (404) costs the price above; refused calls and errors on our side are free (what's charged).