example-data.com

ingredients

ingredients

Page 5 of 9.

curl -sS \
  "https://example-data.com/api/v1/ingredients?limit=25"
const res = await fetch(
  "https://example-data.com/api/v1/ingredients?limit=25"
);
const { data, meta } = await res.json();
import type { Ingredient, ListEnvelope } from "https://example-data.com/types/ingredients.d.ts";

const res = await fetch(
  "https://example-data.com/api/v1/ingredients?limit=25"
);
const { data, meta } = (await res.json()) as ListEnvelope<Ingredient>;
import requests

res = requests.get(
    "https://example-data.com/api/v1/ingredients",
    params={"limit": 25},
)
data = res.json()
{
  "data": [
    {
      "id": 97,
      "name": "Eggplant",
      "slug": "eggplant-97",
      "foodCategoryId": 13,
      "unit": "piece",
      "defaultPricePerUnit": 10.66,
      "currency": "USD"
    },
    {
      "id": 98,
      "name": "Spinach",
      "slug": "spinach-98",
      "foodCategoryId": 25,
      "unit": "g",
      "defaultPricePerUnit": 4.76,
      "currency": "USD"
    },
    {
      "id": 99,
      "name": "Kale",
      "slug": "kale-99",
      "foodCategoryId": 20,
      "unit": "g",
      "defaultPricePerUnit": 3.06,
      "currency": "USD"
    }
  ],
  "meta": {
    "page": 5,
    "limit": 24,
    "total": 200,
    "totalPages": 9
  },
  "links": {
    "self": "/api/v1/ingredients?page=5",
    "next": "/api/v1/ingredients?page=6",
    "prev": "/api/v1/ingredients?page=4"
  }
}
Draftbit