Skip to main content

Fetch a restaurant list

Goal: Prove connectivity and render a first UI from live data.
Prep time: ~2 minutes

What you’ll use

  • GET /flynet/v1/restaurants with X-API-Key

Code

const res = await fetch(
  "https://api.staging.blackbird.xyz/flynet/v1/restaurants?page=0&page_size=20",
  { headers: { "X-API-Key": process.env.API_KEY! } },
);
const data = await res.json();
console.log(data.restaurants?.length, data.pagination);
curl -sS "https://api.staging.blackbird.xyz/flynet/v1/restaurants?page=0&page_size=20" \
  -H "X-API-Key: $API_KEY"
/restaurants is a Discovery route (server-to-server, no member context), so it takes the API key, not an OAuth bearer. Sending Authorization: Bearer … returns 401 MISSING_API_KEY. See API keys.
Chef’s warning: cohort and cuisine query filters are accepted but not implemented yet. Sending them silently has no effect; filter client-side until they ship.
Next: Restaurant explorer: chain in locations and weekly hours.