Skip to main content
POST
Foods by nutrient

Request contract

  • Method and path: POST /apis/v1/afcd-foodstandards-gov-au/foods/foods-by-nutrient
  • Availability: enabled
  • Request URL template: https://api.aisa.one/apis/v1/afcd-foodstandards-gov-au/foods/foods-by-nutrient
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
nutrient_id
string
required

AFCD nutrient code from list_nutrients (e.g. FE, NA, PROT, ENERGY-04, 'ENERGY - AHS'); case-insensitive.

food_group_id
number

Restrict to one AFCD food group (see list_food_groups); joins the food catalogue.

Provider reference: minimum 1.

include_food_groups
boolean

Fill the food group fields of every row by joining the food catalogue even without a group filter (one extra request).

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.

sort
string
default:value_desc

Row order: value_desc (default), value_asc or name (AFCD alphabetical).

Provider reference: allowed values ["value_desc", "value_asc", "name"]; default "value_desc".

sub_food_group_id
number

Restrict to one AFCD sub food group (see list_food_groups); joins the food catalogue.

Provider reference: minimum 1.

Response

Every AFCD food's amount of one nutrient (GET https://www.foodstandards.gov.au/science-data/food-nutrient-databases/afcd/search/api/nutrients/{nutrient_id}): the nutrient's metadata and 1,588 rows of pfk, name, inclusions and value per 100 g, which the program sorts (by value descending by default), optionally narrows with a name query and/or a food group / sub food group (joining the food catalogue, GET /foods/alphabetical, which also fills the group fields of each row) and pages. Rows carry the public food page URL. An unknown nutrient code is not_found (use list_nutrients); a filter nothing matches is an empty list.

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.