Australian Food Classification Register with Discretionary Flags
A register of 3,743 food items from the 2023 national nutrition and physical activity survey classification. Each row gives a food code, its place in a three-level food group hierarchy, a text description and a flag showing whether the food is discretionary. Callers can search by text, filter by group or flag, and fetch a row by key.
Endpoints
Australian Food Classification Register with Discretionary Flags: search
/v1/records/australian-food-classification-discretionary-flags/search10¢ per callServed by /v1/records/{slug}/search, which documents every parameter, the response shape and errors, and has a live playground.
| Query parameter | Description |
|---|---|
q | Words to find (prefix match, all must appear) in: description, discretionary flag. |
where | Exact-match filter `field:value`, repeatable, on: `discretionary_flag_a`. |
fields | Comma-separated field slugs (below). Omit for all. |
limit | Records per page, 1 to 50 (default 25). |
offset | Items to skip, for the next page (`next_offset`). |
curl -X GET 'https://api.microburbs.com.au/v1/records/australian-food-classification-discretionary-flags/search?q=Not%20further%20classified' \
-H 'Authorization: Bearer test'test is the public sandbox key: it works only for the sandbox's allowlisted suburbs and addresses. Use your own key for anything else.
Australian Food Classification Register with Discretionary Flags: one record
/v1/records/australian-food-classification-discretionary-flags/{record_key}5¢ per callServed by /v1/records/{slug}/{record_key}, which documents every parameter, the response shape and errors, and has a live playground.
| Query parameter | Description |
|---|---|
record_key | The record's record id. |
fields | Comma-separated field slugs (below). Omit for all. |
curl -X GET 'https://api.microburbs.com.au/v1/records/australian-food-classification-discretionary-flags/1' \
-H 'Authorization: Bearer test'test is the public sandbox key: it works only for the sandbox's allowlisted suburbs and addresses. Use your own key for anything else.
About this dataset
National classification tied to the 2023 survey, with 3,743 rows. Major food group codes run from 0 to 34, sub-major codes from 0 to 344, minor codes up to 34401 and food codes up to 34401002. There is no geographic or time breakdown. Current to 2026-11-19; refreshed One-off. It changes only if a new version of the classification is released..
What it is
A lookup list of individual foods and drinks, each with a numeric food code and a description such as a savoury pie, a hard lolly or a fruit drink made from powder. Every food sits within a major, sub-major and minor food group. Each is also marked as discretionary or non-discretionary.
What it shows
It shows how foods are classified into groups and which are treated as discretionary, meaning not needed for a healthy diet. It does not show intake, nutrient content, prices or how often people eat each food.
Why use it
Analysts can use it to code food records to a standard classification, group foods for dietary analysis, or separate discretionary from core foods. Developers can use it to build food search, tagging or nutrition tools that match the national classification.
How it is built
We load the classification table as rows, one per food, and key each row by a record ID. The group codes are nested: sub-major codes begin with the major code, and minor codes begin with the sub-major code. Some rows hold 0 in the code fields, and the flag column contains at least one non-food value ("Back to contents"), so some rows are table furniture rather than real foods.
Shortcomings
- Some rows have 0 in the group and food code fields and a flag such as 'Back to contents'. These are not foods and should be filtered out.
- Group fields hold codes only. The names of the major, sub-major and minor groups are not included.
- The discretionary flag is a classification label, not a measure of how healthy a food is.
- The data is a classification list only. It has no intake, nutrient, price, location or time data.
Fields
| Field | Unit | Description |
|---|---|---|
record_idRecord ID | Unique key for the row in this register, stored as text. | |
major_food_groupMajor Food Group | Code for the broadest food group (0 to 34), where 0 appears on non-food rows. | |
sub_major_food_groupSub-Major Food Group | Code for the middle-level food group (0 to 344), nested within the major group. | |
minor_food_groupMinor Food Group | Code for the most detailed food group (up to 34401), nested within the sub-major group. | |
food_codeFood Code | Numeric code identifying the individual food item (up to 34401002), with 0 on non-food rows. | |
descriptionDescription | Plain-text name of the food or drink, for example 'Lolly, hard varieties'. | |
discretionary_flag_aDiscretionary Flag | Label showing whether the food is Discretionary or Non-Discretionary, and sometimes a non-food value such as 'Back to contents'. |
Data source: ABS
