ingredients
ingredients
Browse 200 ingredients records. Explore sample records and fetch JSON over a free REST API for prototypes, tests, and learning.
Overview
Cards
Compact
Detailed
All-Purpose Flour
Bread Flour
Whole Wheat Flour
Cornstarch
Baking Powder
Baking Soda
Showing first 6 of 24 on this page.
Request
curl example
curl -sS \ "https://example-data.com/api/v1/ingredients?limit=25"
JavaScript example
const res = await fetch(
"https://example-data.com/api/v1/ingredients?limit=25"
);
const { data, meta } = await res.json(); TypeScript example
// Download once: mkdir -p types && curl -o types/ingredients.d.ts https://example-data.com/types/ingredients.d.ts
import type { Ingredient, ListEnvelope } from "./types/ingredients";
const res = await fetch(
"https://example-data.com/api/v1/ingredients?limit=25"
);
const { data, meta } = (await res.json()) as ListEnvelope<Ingredient>; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/ingredients",
params={"limit": 25},
)
data = res.json() Response
{
"data": [
{
"id": 1,
"name": "All-Purpose Flour",
"slug": "all-purpose-flour-1",
"foodCategoryId": 15,
"unit": "g",
"defaultPricePerUnit": 11.39,
"currency": "USD"
},
{
"id": 2,
"name": "Bread Flour",
"slug": "bread-flour-2",
"foodCategoryId": 24,
"unit": "g",
"defaultPricePerUnit": 2.34,
"currency": "USD"
},
{
"id": 3,
"name": "Whole Wheat Flour",
"slug": "whole-wheat-flour-3",
"foodCategoryId": 26,
"unit": "g",
"defaultPricePerUnit": 13.73,
"currency": "USD"
}
],
"meta": {
"page": 1,
"limit": 25,
"total": 200,
"totalPages": 8
},
"links": {
"self": "/api/v1/ingredients?page=1",
"first": "/api/v1/ingredients?page=1",
"last": "/api/v1/ingredients?page=8",
"next": "/api/v1/ingredients?page=2",
"prev": null
}
}