> ## Documentation Index
> Fetch the complete documentation index at: https://aisa.one/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> - Base URLs: models `https://api.aisa.one/v1` (Gemini GenerateContent: `https://api.aisa.one/v1beta`); data APIs `https://api.aisa.one/apis/v1`. The `servers` of each operation in https://aisa.one/openapi.yaml is authoritative.
> - Auth: `Authorization: Bearer $AISA_API_KEY`. Never print, log, or commit the key.
> - MCP (preferred for agents): `https://mcp.aisa.one/mcp`, signed in with OAuth, so there is no key to paste.
> - Agent Skill: `npx skills add AIsa-team/agent-skills --skill aisa`. Fallback with the AIsa CLI: `aisa skills install aisa`.
> - Spending: docs, https://aisa.one/models, https://aisa.one/api, `/v1/models`, and MCP `search`, `list_categories`, `get_details`, `batch_quote`, and the `account` operation are free. Quote the exact calls before running them (MCP `batch_quote`, CLI `aisa quote --json`). If the quote reports `auto_execute_eligible: true`, run it unless the user set a tighter limit or asked only for a quote. Otherwise, tell the user in one message the planned calls, the quoted price, and a total USD budget for the task, then wait for approval. Direct HTTP calls follow the stricter rule at https://aisa.one/docs/get-started/cli.md#direct-http-fallback. Do not make paid calls to test availability. Full rule: https://aisa.one/llms.txt

# Search foods

> To find the AFCD Public Food Key of a food by name (e.g. 'vegemite', 'weet-bix', 'lamb chop'), to list all foods in a group, or to browse foods starting with a letter. Follow with get_food for the nutrient profile.

## 请求规范

* **方法与路径:** 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 定义](https://aisa.one/docs/openapi/zh/afcd-foodstandards-gov-au.json)

有效请求声明（包括认证和引用的 schema）：

```json theme={null}
{
  "operationId": "afcd-foodstandards-gov-au.foods.search-foods",
  "method": "POST",
  "path": "/apis/v1/afcd-foodstandards-gov-au/foods/search-foods",
  "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": "vegemite"
            }
          }
        },
        "schema": {
          "additionalProperties": true,
          "properties": {
            "food_group_id": {
              "description": "Restrict to one AFCD food group (see list_food_groups).\n\nProvider reference: minimum 1.",
              "type": "number",
              "x-alexandria-option-metadata": {
                "in": "body",
                "min": 1
              }
            },
            "letter": {
              "description": "Browse foods whose name starts with this letter (A-Z); switches to the per-letter endpoint. Pattern: ^[A-Za-z]$.",
              "type": "string",
              "x-alexandria-option-metadata": {
                "in": "body"
              }
            },
            "page": {
              "default": 1,
              "description": "1-based page of the client-side paginated result (the API returns the whole list).\n\nProvider reference: minimum 1; default 1.",
              "type": "number",
              "x-alexandria-option-metadata": {
                "in": "body",
                "min": 1
              }
            },
            "page_size": {
              "default": 50,
              "description": "Rows per page (1-200).\n\nProvider reference: minimum 1; maximum 200; default 50.",
              "type": "number",
              "x-alexandria-option-metadata": {
                "in": "body",
                "max": 200,
                "min": 1
              }
            },
            "query": {
              "description": "Case-insensitive substring matched against the food name and inclusions (e.g. 'vegemite', 'breakfast cereal'). Optional when a group or letter is given.",
              "type": "string",
              "x-alexandria-option-metadata": {
                "in": "body"
              }
            },
            "sub_food_group_id": {
              "description": "Restrict to one AFCD sub food group (see list_food_groups).\n\nProvider reference: minimum 1.",
              "type": "number",
              "x-alexandria-option-metadata": {
                "in": "body",
                "min": 1
              }
            }
          },
          "type": "object"
        }
      }
    },
    "required": false
  },
  "x-aisa-status": "enabled",
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  }
}
```

## 费用与请求规则

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


## OpenAPI

````yaml openapi/zh/afcd-foodstandards-gov-au.json POST /apis/v1/afcd-foodstandards-gov-au/foods/search-foods
openapi: 3.1.0
info:
  description: ''
  title: Australian Food Composition Database (AFCD, FSANZ)
  version: '1'
  x-aisa-capabilities:
    idempotency: Idempotency-Key
    max_price: X-AISA-Max-Price-USD
    quote:
      header: X-AISA-Cost-Mode
      value: quote
  x-aisa-catalogs:
    afcd-foodstandards-gov-au:
      description: ''
      title: Australian Food Composition Database (AFCD, FSANZ)
      x-aisa-capabilities:
        idempotency: Idempotency-Key
        max_price: X-AISA-Max-Price-USD
        quote:
          header: X-AISA-Cost-Mode
          value: quote
      x-aisa-document:
        facts_hash: bc9bb21122412b19b885ad9b857126d6cc6551524ea33bbfe22f843af24d65ee
        generator_version: '3'
        protocol_version: '1'
        schema_version: '1'
      x-aisa-plans:
        builder: 1
        display_plan: payg
        payg: 1
        similarweb_payg: 1
        team: 1
        version: e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb
  x-aisa-configured-paths:
    - /apis/v1/afcd-foodstandards-gov-au/foods/foods-by-nutrient
    - /apis/v1/afcd-foodstandards-gov-au/foods/get-food
    - /apis/v1/afcd-foodstandards-gov-au/foods/list-food-groups
    - /apis/v1/afcd-foodstandards-gov-au/foods/list-foods-in-group
    - /apis/v1/afcd-foodstandards-gov-au/foods/list-nutrients
    - /apis/v1/afcd-foodstandards-gov-au/foods/search-foods
  x-aisa-document:
    composer_version: '31'
    document_hash: sha256:52b752bdb2c9aa0163b9211576e97373b443b25606cf0e038786f9da48fcacf4
    facts_hash: bc9bb21122412b19b885ad9b857126d6cc6551524ea33bbfe22f843af24d65ee
    generator_version: '3'
    protocol_version: '1'
    response_pending: []
    schema_version: '1'
  x-aisa-plans:
    builder: 1
    display_plan: payg
    payg: 1
    similarweb_payg: 1
    team: 1
    version: e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb
  x-aisa-provider: afcd-foodstandards-gov-au
servers:
  - url: https://api.aisa.one
security:
  - bearerAuth: []
paths:
  /apis/v1/afcd-foodstandards-gov-au/foods/search-foods:
    post:
      tags:
        - Australian Food Composition Database (AFCD, FSANZ)
      summary: Search foods
      description: >-
        To find the AFCD Public Food Key of a food by name (e.g. 'vegemite',
        'weet-bix', 'lamb chop'), to list all foods in a group, or to browse
        foods starting with a letter. Follow with get_food for the nutrient
        profile.
      operationId: afcd-foodstandards-gov-au.foods.search-foods
      requestBody:
        content:
          application/json:
            examples:
              provider:
                summary: >-
                  Official provider example; checked against AIsa request
                  constraints
                value:
                  query: vegemite
            schema:
              additionalProperties: true
              properties:
                food_group_id:
                  description: |-
                    Restrict to one AFCD food group (see list_food_groups).

                    Provider reference: minimum 1.
                  type: number
                  x-alexandria-option-metadata:
                    in: body
                    min: 1
                letter:
                  description: >-
                    Browse foods whose name starts with this letter (A-Z);
                    switches to the per-letter endpoint. Pattern: ^[A-Za-z]$.
                  type: string
                  x-alexandria-option-metadata:
                    in: body
                page:
                  default: 1
                  description: >-
                    1-based page of the client-side paginated result (the API
                    returns the whole list).


                    Provider reference: minimum 1; default 1.
                  type: number
                  x-alexandria-option-metadata:
                    in: body
                    min: 1
                page_size:
                  default: 50
                  description: |-
                    Rows per page (1-200).

                    Provider reference: minimum 1; maximum 200; default 50.
                  type: number
                  x-alexandria-option-metadata:
                    in: body
                    max: 200
                    min: 1
                query:
                  description: >-
                    Case-insensitive substring matched against the food name and
                    inclusions (e.g. 'vegemite', 'breakfast cereal'). Optional
                    when a group or letter is given.
                  type: string
                  x-alexandria-option-metadata:
                    in: body
                sub_food_group_id:
                  description: |-
                    Restrict to one AFCD sub food group (see list_food_groups).

                    Provider reference: minimum 1.
                  type: number
                  x-alexandria-option-metadata:
                    in: body
                    min: 1
              type: object
        required: false
      responses:
        '200':
          content:
            application/json:
              examples:
                provider:
                  description: Published by the provider on 2026-10-14.
                  summary: Official provider example
                  value:
                    catalogue_size: 1588
                    food_group_id: null
                    foods:
                      - classification_id: 31102
                        derivation: Analysed
                        food_group: Miscellaneous
                        food_group_id: 2
                        inclusions: null
                        name: Spread, yeast, vegemite
                        pfk: F008785
                        sub_food_group: Yeast, and yeast vegetable or meat extracts
                        sub_food_group_id: 11
                        url: >-
                          https://www.foodstandards.gov.au/science-data/food-nutrient-databases/afcd/search/food/F008785
                    letter: null
                    observed_at_ms: 1791942979360
                    page: 1
                    page_size: 50
                    query: vegemite
                    source_url: >-
                      https://www.foodstandards.gov.au/science-data/food-nutrient-databases/afcd/search/api/foods/alphabetical
                    sub_food_group_id: null
                    total_matches: 1
                    total_pages: 1
              schema:
                not:
                  type: 'null'
                x-aisa-schema-completeness: documented-fields-only
          description: >-
            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.


            | Documented field | Provider type | Description |

            | --- | --- | --- |

            | `catalogue_size` | number | Foods in the AFCD list the filter ran
            over (the whole database, or the letter's foods). |

            | `food_group_id` | number | The food group filter applied; null
            when none. |

            | `foods` | object[] | The page of matching foods in AFCD's
            alphabetical order. |

            | `letter` | string | The letter browsed (upper case); null when
            none. |

            | `observed_at_ms` | number | Unix milliseconds when this program
            read the AFCD API. |

            | `page` | number |  |

            | `page_size` | number |  |

            | `query` | string | The query applied, trimmed; null when none. |

            | `source_url` | string | The AFCD API URL this answer was read
            from. |

            | `sub_food_group_id` | number | The sub food group filter applied;
            null when none. |

            | `total_matches` | number | Foods matching query and filters across
            all pages. |

            | `total_pages` | number |  |



            These are the provider's documented fields. Field requiredness,
            nullability and nested object structures are specified only where
            the descriptions explicitly say so.
        default:
          content:
            application/json:
              schema: {}
          description: >-
            Error response; upstream passthrough responses may use provider
            formats
components:
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.