curl --request POST \
--url https://api.aisa.one/apis/v1/afcd-foodstandards-gov-au/foods/list-nutrients \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "iron"
}
'import requests
url = "https://api.aisa.one/apis/v1/afcd-foodstandards-gov-au/foods/list-nutrients"
payload = { "query": "iron" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({query: 'iron'})
};
fetch('https://api.aisa.one/apis/v1/afcd-foodstandards-gov-au/foods/list-nutrients', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/afcd-foodstandards-gov-au/foods/list-nutrients",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'query' => 'iron'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/afcd-foodstandards-gov-au/foods/list-nutrients"
payload := strings.NewReader("{\n \"query\": \"iron\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/afcd-foodstandards-gov-au/foods/list-nutrients")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"iron\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/afcd-foodstandards-gov-au/foods/list-nutrients")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"iron\"\n}"
response = http.request(request)
puts response.read_body{
"categories": [
{
"category": "Proximates",
"category_id": "PRO",
"description": "Proximates are nutrients that contribute energy to a food or beverage.",
"nutrient_count": 37,
"order_by": 1
},
{
"category": "Organic acids",
"category_id": "OA",
"description": "Group of organic compounds containing the carboxylic group -C(O)OH, formed by the oxidation of aldehydes. Generally analysed by chromotography.",
"nutrient_count": 11,
"order_by": 2
},
{
"category": "Minerals",
"category_id": "MNS",
"description": "Minerals are inorganic substances needed in the diet in small amounts to help regulate body function. From around the mid 1990's onwards, most mineral levels have been determined using inductively coupled plasma mass spectrometry (ICP-MS) or inductively coupled plasma optical emission spectroscopy (ICP-OES). Before that time, atomic absorption spectroscopy was used for most mineral determination unless noted otherwise. The more recent techniques are more sensitive and therefore likely to be more reliable for minerals present in low levels.",
"nutrient_count": 25,
"order_by": 3
},
{
"category": "Vitamins",
"category_id": "VIT",
"description": "Vitamins are organic compounds that are needed in the diet in small amounts.",
"nutrient_count": 37,
"order_by": 4
},
{
"category": "Fatty acids",
"category_id": "FA",
"description": "Fatty acids are classified as saturated, polyunsaturated or monounsaturated depending on the presence or absence of double bonds on the carbon molecules. Saturated fatty acids contain no double bond, monounsaturated fatty acids contain one double bond per molecule, and polyunsaturated fatty acids contain more than one double bond per molecule. Polyunsaturated fatty acids can be further subdivided into those that are omega - 6 fatty acids and those that are omega - 3 fatty acids. Although all fatty acid values reported have been generated using chromatographic methods the more recent data are considered more reliable as newer techniques are better able to separate closely related fatty acids, particularly where these occur in very low levels. Fatty acids have been measured as a percentage of all extracted fatty acids and this has been converted to a mass of fatty acids using the measured fat content of the food and a conversion factor (Greenfield and Southgate, 2003: Mooney et al., 2002: Nichols, Virtue et al., 1998: Nichols, Mooney et al., 1998: Nichols et al., 2002)",
"nutrient_count": 118,
"order_by": 5
},
{
"category": "Amino acids",
"category_id": "AA",
"description": "Dietary amino acids are classified as essential or non-essential. Essential amino acids cannot be manufactured by the body and must be supplied in the diet. The non-essential amino acids are also essential for health, but can be synthesized in the body from the essential amino acids. Tryptophan, an essential amino acid was determined using a separate HPLC procedure or a colorimetric procedure.",
"nutrient_count": 36,
"order_by": 6
},
{
"category": "Other",
"category_id": "OTHER",
"description": "",
"nutrient_count": 2,
"order_by": 7
}
],
"category_id": null,
"count": 1,
"nutrients": [
{
"category": "Minerals",
"category_id": "MNS",
"decimal_places": 2,
"definition": "Determined largely by using inductively coupled plasma mass spectrometry (ICP-MS).",
"name": "Iron (Fe)",
"nutrient_id": "FE",
"order_by": 60,
"units": "mg"
}
],
"observed_at_ms": 1791942997208,
"query": "iron",
"source_url": "https://www.foodstandards.gov.au/science-data/food-nutrient-databases/afcd/search/api/nutrients",
"total": 266
}List nutrients
To find the nutrient code for foods_by_nutrient (e.g. ‘iron’ -> FE, ‘sodium’ -> NA, ‘energy’ -> ENERGY-04) or to read how AFCD defines a nutrient.
curl --request POST \
--url https://api.aisa.one/apis/v1/afcd-foodstandards-gov-au/foods/list-nutrients \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "iron"
}
'import requests
url = "https://api.aisa.one/apis/v1/afcd-foodstandards-gov-au/foods/list-nutrients"
payload = { "query": "iron" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({query: 'iron'})
};
fetch('https://api.aisa.one/apis/v1/afcd-foodstandards-gov-au/foods/list-nutrients', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/afcd-foodstandards-gov-au/foods/list-nutrients",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'query' => 'iron'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/afcd-foodstandards-gov-au/foods/list-nutrients"
payload := strings.NewReader("{\n \"query\": \"iron\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/afcd-foodstandards-gov-au/foods/list-nutrients")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"iron\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/afcd-foodstandards-gov-au/foods/list-nutrients")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"iron\"\n}"
response = http.request(request)
puts response.read_body{
"categories": [
{
"category": "Proximates",
"category_id": "PRO",
"description": "Proximates are nutrients that contribute energy to a food or beverage.",
"nutrient_count": 37,
"order_by": 1
},
{
"category": "Organic acids",
"category_id": "OA",
"description": "Group of organic compounds containing the carboxylic group -C(O)OH, formed by the oxidation of aldehydes. Generally analysed by chromotography.",
"nutrient_count": 11,
"order_by": 2
},
{
"category": "Minerals",
"category_id": "MNS",
"description": "Minerals are inorganic substances needed in the diet in small amounts to help regulate body function. From around the mid 1990's onwards, most mineral levels have been determined using inductively coupled plasma mass spectrometry (ICP-MS) or inductively coupled plasma optical emission spectroscopy (ICP-OES). Before that time, atomic absorption spectroscopy was used for most mineral determination unless noted otherwise. The more recent techniques are more sensitive and therefore likely to be more reliable for minerals present in low levels.",
"nutrient_count": 25,
"order_by": 3
},
{
"category": "Vitamins",
"category_id": "VIT",
"description": "Vitamins are organic compounds that are needed in the diet in small amounts.",
"nutrient_count": 37,
"order_by": 4
},
{
"category": "Fatty acids",
"category_id": "FA",
"description": "Fatty acids are classified as saturated, polyunsaturated or monounsaturated depending on the presence or absence of double bonds on the carbon molecules. Saturated fatty acids contain no double bond, monounsaturated fatty acids contain one double bond per molecule, and polyunsaturated fatty acids contain more than one double bond per molecule. Polyunsaturated fatty acids can be further subdivided into those that are omega - 6 fatty acids and those that are omega - 3 fatty acids. Although all fatty acid values reported have been generated using chromatographic methods the more recent data are considered more reliable as newer techniques are better able to separate closely related fatty acids, particularly where these occur in very low levels. Fatty acids have been measured as a percentage of all extracted fatty acids and this has been converted to a mass of fatty acids using the measured fat content of the food and a conversion factor (Greenfield and Southgate, 2003: Mooney et al., 2002: Nichols, Virtue et al., 1998: Nichols, Mooney et al., 1998: Nichols et al., 2002)",
"nutrient_count": 118,
"order_by": 5
},
{
"category": "Amino acids",
"category_id": "AA",
"description": "Dietary amino acids are classified as essential or non-essential. Essential amino acids cannot be manufactured by the body and must be supplied in the diet. The non-essential amino acids are also essential for health, but can be synthesized in the body from the essential amino acids. Tryptophan, an essential amino acid was determined using a separate HPLC procedure or a colorimetric procedure.",
"nutrient_count": 36,
"order_by": 6
},
{
"category": "Other",
"category_id": "OTHER",
"description": "",
"nutrient_count": 2,
"order_by": 7
}
],
"category_id": null,
"count": 1,
"nutrients": [
{
"category": "Minerals",
"category_id": "MNS",
"decimal_places": 2,
"definition": "Determined largely by using inductively coupled plasma mass spectrometry (ICP-MS).",
"name": "Iron (Fe)",
"nutrient_id": "FE",
"order_by": 60,
"units": "mg"
}
],
"observed_at_ms": 1791942997208,
"query": "iron",
"source_url": "https://www.foodstandards.gov.au/science-data/food-nutrient-databases/afcd/search/api/nutrients",
"total": 266
}Request contract
- Method and path: POST /apis/v1/afcd-foodstandards-gov-au/foods/list-nutrients
- Availability: enabled
- Request URL template:
https://api.aisa.one/apis/v1/afcd-foodstandards-gov-au/foods/list-nutrients
{
"operationId": "afcd-foodstandards-gov-au.foods.list-nutrients",
"method": "POST",
"path": "/apis/v1/afcd-foodstandards-gov-au/foods/list-nutrients",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [],
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"content": {
"application/json": {
"examples": {
"provider": {
"summary": "Official provider example; checked against AIsa request constraints",
"value": {
"query": "iron"
}
}
},
"schema": {
"additionalProperties": true,
"properties": {
"category_id": {
"description": "Restrict to one category: PRO (Proximates), OA (Organic acids), MNS (Minerals), VIT (Vitamins), FA (Fatty acids), AA (Amino acids) or OTHER.",
"type": "string",
"x-alexandria-option-metadata": {
"in": "body"
}
},
"query": {
"description": "Case-insensitive substring matched against nutrient code and name (e.g. 'iron', 'FE', 'vitamin').",
"type": "string",
"x-alexandria-option-metadata": {
"in": "body"
}
}
},
"type": "object"
}
}
},
"required": false
},
"x-aisa-status": "enabled",
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
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
Body
Response
The AFCD nutrient catalogue (GET https://www.foodstandards.gov.au/science-data/food-nutrient-databases/afcd/search/api/nutrients): 7 categories and 266 nutrients with code, name, definition / method note, unit, display decimals and order. query filters by code or name (case-insensitive substring) and category_id by category; both are applied by the program. The codes are the nutrient_id of foods_by_nutrient and of the rows get_food returns. An empty filter result is an empty list; an unknown category_id is not_found.
The response contains the tool result directly.
| Documented field | Provider type | Description |
|---|---|---|
categories | object[] | All AFCD nutrient categories, regardless of the filter. |
category_id | string | The category filter applied; null when none. |
count | number | Nutrients returned after filtering. |
nutrients | object[] | The matching nutrients in AFCD category and display order. |
observed_at_ms | number | Unix milliseconds when this program read the AFCD API. |
query | string | The query applied, trimmed; null when none. |
source_url | string | The AFCD API URL this answer was read from. |
total | number | Nutrients in the AFCD catalogue. |
These are the provider's documented fields. Field requiredness, nullability and nested object structures are specified only where the descriptions explicitly say so.