跳转到主要内容
POST
Search foods

请求规范

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

费用与请求规则

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

授权

Authorization
string
header
必填

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

请求体

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

响应

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.