Skip to main content
POST
Search foods

Request contract

  • Method and path: POST /apis/v1/afcd-foodstandards-gov-au/foods/search-foods
  • Availability: enabled
  • Request URL template: https://api.aisa.one/apis/v1/afcd-foodstandards-gov-au/foods/search-foods
Complete OpenAPI definition Effective request declaration (including authentication and referenced schemas):

Cost and request rules

Usage-based pricing. Default request estimate: $0.0005 USD. The final charge depends on actual usage. Your account price may differ; use a request quote where supported.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
food_group_id
number

Restrict to one AFCD food group (see list_food_groups).

Provider reference: minimum 1.

letter
string

Browse foods whose name starts with this letter (A-Z); switches to the per-letter endpoint. Pattern: ^[A-Za-z]$.

page
number
default:1

1-based page of the client-side paginated result (the API returns the whole list).

Provider reference: minimum 1; default 1.

page_size
number
default:50

Rows per page (1-200).

Provider reference: minimum 1; maximum 200; default 50.

query
string

Case-insensitive substring matched against the food name and inclusions (e.g. 'vegemite', 'breakfast cereal'). Optional when a group or letter is given.

sub_food_group_id
number

Restrict to one AFCD sub food group (see list_food_groups).

Provider reference: minimum 1.

Response

Search the Australian Food Composition Database (AFCD Release 3.0, Food Standards Australia New Zealand) for foods by name (GET https://www.foodstandards.gov.au/science-data/food-nutrient-databases/afcd/search/api/foods/alphabetical, the complete catalogue of 1,588 foods, or /foods/alphabetical/{letter} when letter is given). AFCD has no server-side search: the program applies query as a case-insensitive substring match over the food name and its inclusions (alternative names), exactly as the AFCD site does, then filters by food group / sub food group and pages the result. Each row carries the Public Food Key (pfk) for get_food, the AUSNUT classification code, the food group pair and the public food page URL. Returns an empty foods list for a query nothing matches; not_found for a food_group_id / sub_food_group_id that does not exist in AFCD or a page past the last one.

The response contains the tool result directly.

These are the provider's documented fields. Field requiredness, nullability and nested object structures are specified only where the descriptions explicitly say so.