Forkbit

Guides

Filtering

Search and list endpoints accept optional filters as query parameters. Filters narrow the result set before ranking is applied.

Category filter

Restrict /v1/foods/search to a single category with ?category=. Forkbit uses its own fixed set of 18 category slugs, not raw USDA groupings. See Food Search for the full list. Common ones include vegetables, fruits, dairy_eggs, poultry.

curl
curl "https://api.forkbit.io/v1/foods/search?q=cheddar&category=dairy_eggs" \
    -H "X-API-Key: fkb_live_xxxxxxxxxxxx"

Pagination

Pass page and limitto paginate. The response envelope's meta.hasMore tells you whether another page exists.

Roadmap

Diet and allergen filters (vegan, vegetarian, gluten-free, dairy-free, etc.) are on the post-V1 roadmap. They are not part of the current API.