跳转到主要内容
POST
Foods by nutrient

请求规范

  • 方法与路径: POST /apis/v1/afcd-foodstandards-gov-au/foods/foods-by-nutrient
  • 可用状态: enabled
  • 请求 URL 模板: https://api.aisa.one/apis/v1/afcd-foodstandards-gov-au/foods/foods-by-nutrient
完整 OpenAPI 定义 有效请求声明(包括认证和引用的 schema):

费用与请求规则

按实际用量收费。 默认请求预估费用:$0.0005 USD。 最终费用以实际用量为准。 账户适用价格可能不同;支持报价的接口可按实际请求获取报价。

授权

Authorization
string
header
必填

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

请求体

application/json
nutrient_id
string
必填

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
默认值: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
默认值: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
默认值: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.

响应

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.