[Integrations](https://spiral.ai/integrations) › [Muse Code](https://spiral.ai/integrations/muse-code) › [AFCD foods by nutrient](https://spiral.ai/integrations/muse-code/afcd-foods-by-nutrient)

# How to Use AFCD foods by nutrient in Muse Code

Returns foods with their values for one nutrient, expressed per 100 g. Use it to compare iron in breakfast cereals or sodium in cheeses before examining individual food profiles.

|  |  |
| --- | --- |
| Model | AFCD foods by nutrient |
| Available through | Alexandria |
| Category | Industry Data |
| Price | $0.00873 per call. |
| Returns | json |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with AFCD foods by nutrient in Muse Code

- Use AFCD foods by nutrient to look this up and give me the result as a table. Save the result in ./assets.
- Pull the latest numbers from AFCD foods by nutrient and tell me what changed since last week.
- Check AFCD foods by nutrient and summarize what you find in three bullet points.
- Pull the newest data from AFCD foods by nutrient and give me the result as a table.
- Check AFCD foods by nutrient every morning and tell me only when something changed.

## How to set up AFCD foods by nutrient in Muse Code

Pick the way that suits you. Each takes about two minutes.

### Use Spiral's MCP server

1. **Install Muse Code**

```bash
curl -fsSL https://dev.meta.ai/install.sh | bash
```

2. **Ask Muse to add the server**: Start `muse` and ask:

```text
Add the Spiral MCP server at https://api.spiral.ai/mcp
```

3. **Sign in**: In your terminal, run:

```bash
muse mcp login spiral
```

### Use the Spiral skill

1. **Send Muse Code this message**: Your agent reads Spiral's skill and sets itself up.

```
set up https://spiral.ai/SKILL.md
```

2. **Sign in or paste a key**: Approve Spiral in the browser, or give the agent a key from the console.

### Use the Spiral CLI

1. **Install and sign in**: Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

```bash
npx -y spiral-cli@latest init
```

### Call the Spiral API

1. **Create an API key**: In the console, under API keys.

2. **Run AFCD foods by nutrient**: One request; the result comes back by polling or a webhook.

```bash
curl https://api.spiral.ai/v1/runs \
  -H "Authorization: Bearer $SPIRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "provider": "alexandria",
    "model": "afcd-foodstandards-gov-au/foods/foods_by_nutrient",
    "input": {
      "nutrient_id": "<nutrient_id>"
    }
  }'
```

Then paste one of the prompts above: Muse Code finds AFCD foods by nutrient on Spiral, shows the price and runs it.

Setup guide in the docs: https://spiral.ai/docs/quickstarts/muse-code

## AFCD foods by nutrient tools and prices

- [Australian Food Composition Database (AFCD, FSANZ) · Foods by nutrient](https://spiral.ai/tools/alexandria/afcd-foodstandards-gov-au/foods/foods_by_nutrient) (Alexandria): $0.00873 per call.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| page | 1 to … | 1 | 1-based page of the client-side paginated result (the API returns the whole list). |
| sort | value_desc, value_asc, name | value_desc | Row order: value_desc (default), value_asc or name (AFCD alphabetical). |
| query |  | — | Case-insensitive substring matched against the food name and inclusions. |
| page_size | 1 to 200 | 50 | Rows per page (1-200). |
| food_group_id | 1 to … | — | Restrict to one AFCD food group (see list_food_groups); joins the food catalogue. |
| sub_food_group_id | 1 to … | — | Restrict to one AFCD sub food group (see list_food_groups); joins the food catalogue. |

## What can you do with AFCD foods by nutrient in Muse Code?

Build an Australian food reference browser with category navigation, nutrient explanations, and food comparisons. A coding agent can use AFCD descriptions and Public Food Keys to connect search results to the correct detail records.

### Compare breakfast cereals

Identify the ready-to-eat cereal category, list its foods, and resolve named cereals. Check nutrient definitions, rank the entries by iron, and inspect the selected food profiles and sampling notes.

### Build a cheese reformulation reference

Find AFCD's cheese categories and enumerate the reference foods. Match named cheese types, check sodium definitions and units, then compare sodium values and inspect the underlying profiles.

### Create an Australian food reference browser

Use the category hierarchy and category inventories for navigation, food search for lookup, nutrient definitions for explanations, nutrient comparisons for sorting, and individual profiles for the detail view.

### Explain nutrient terminology with food examples

Build an explanation of AFCD nutrient terms using the definitions, foods with reported values, and selected full profiles. Keep each nutrient's units visible alongside the examples.

### Review changes to a food reference collection

Periodically compare retrieved categories, food inventories, nutrient definitions, rankings, and selected profiles with earlier observations. Produce a review queue when AFCD descriptions or values change.

### Compare food preparation descriptions

Find raw and cooked food entries, examine their descriptions, and compare selected nutrients using the documented definitions. Keep preparation differences explicit when presenting the results.

## Overview

- [Alexandria](https://spiral.ai/providers/alexandria)
- [All Muse Code guides](https://spiral.ai/integrations/muse-code)

## AFCD foods by nutrient in other agents

- [Amp](https://spiral.ai/integrations/amp/afcd-foods-by-nutrient)
- [ChatGPT](https://spiral.ai/integrations/chatgpt/afcd-foods-by-nutrient)
- [Claude](https://spiral.ai/integrations/claude-desktop/afcd-foods-by-nutrient)
- [Claude Code](https://spiral.ai/integrations/claude-code/afcd-foods-by-nutrient)
- [Cline](https://spiral.ai/integrations/cline/afcd-foods-by-nutrient)
- [Codex](https://spiral.ai/integrations/codex/afcd-foods-by-nutrient)
- [Cursor](https://spiral.ai/integrations/cursor/afcd-foods-by-nutrient)
- [Devin](https://spiral.ai/integrations/devin/afcd-foods-by-nutrient)
- [dots](https://spiral.ai/integrations/dots/afcd-foods-by-nutrient)
- [Factory Droid](https://spiral.ai/integrations/factory-droid/afcd-foods-by-nutrient)
- [Gemini](https://spiral.ai/integrations/gemini/afcd-foods-by-nutrient)
- [Gemini CLI](https://spiral.ai/integrations/gemini-cli/afcd-foods-by-nutrient)
- [Google Antigravity](https://spiral.ai/integrations/antigravity/afcd-foods-by-nutrient)
- [goose](https://spiral.ai/integrations/goose/afcd-foods-by-nutrient)
- [Grok](https://spiral.ai/integrations/grok/afcd-foods-by-nutrient)
- [Grok Build](https://spiral.ai/integrations/grok-build/afcd-foods-by-nutrient)
- [Hermes](https://spiral.ai/integrations/hermes/afcd-foods-by-nutrient)
- [Instinct](https://spiral.ai/integrations/instinct/afcd-foods-by-nutrient)
- [Manus](https://spiral.ai/integrations/manus/afcd-foods-by-nutrient)
- [Muse](https://spiral.ai/integrations/muse/afcd-foods-by-nutrient)
- [n8n](https://spiral.ai/integrations/n8n/afcd-foods-by-nutrient)
- [Notion](https://spiral.ai/integrations/notion/afcd-foods-by-nutrient)
- [OpenClaw](https://spiral.ai/integrations/openclaw/afcd-foods-by-nutrient)
- [opencode](https://spiral.ai/integrations/opencode/afcd-foods-by-nutrient)
- [Perplexity](https://spiral.ai/integrations/perplexity/afcd-foods-by-nutrient)
- [Raycast](https://spiral.ai/integrations/raycast/afcd-foods-by-nutrient)
- [VS Code](https://spiral.ai/integrations/vscode/afcd-foods-by-nutrient)
- [Windsurf](https://spiral.ai/integrations/windsurf/afcd-foods-by-nutrient)
- [Zapier](https://spiral.ai/integrations/zapier/afcd-foods-by-nutrient)

## More Muse Code guides

- [AFCD food search](https://spiral.ai/integrations/muse-code/afcd-food-search)
- [AFCD foods in a category](https://spiral.ai/integrations/muse-code/afcd-foods-in-a-category)
- [AFCD food nutrient profile](https://spiral.ai/integrations/muse-code/afcd-food-nutrient-profile)
- [AFCD nutrient definitions](https://spiral.ai/integrations/muse-code/afcd-nutrient-definitions)
- [AFCD food groups](https://spiral.ai/integrations/muse-code/afcd-food-groups)
- [AUC current applications](https://spiral.ai/integrations/muse-code/auc-current-applications)

## Questions about AFCD foods by nutrient in Muse Code

**Can Muse Code use AFCD foods by nutrient?**

Yes. Add Spiral to Muse Code as an MCP server, and Muse Code can find and run AFCD foods by nutrient like any built-in tool.

**How much does AFCD foods by nutrient cost in Muse Code?**

$0.00873 per call. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your Muse Code plan is separate.

**Do I need an Alexandria account to use AFCD foods by nutrient in Muse Code?**

No. Spiral runs AFCD foods by nutrient on its own Alexandria account. You sign in to Spiral once and never paste a key.

**How long does it take to set up AFCD foods by nutrient in Muse Code?**

About two minutes: install Muse Code, then ask Muse to add the server, then sign in.

**Does Muse Code wait while AFCD foods by nutrient runs?**

AFCD foods by nutrient runs in the background. Muse Code starts the run, checks on it and gives you the json when it's ready.

**Which foods does AFCD cover?**

AFCD covers 1,588 foods commonly available in Australia. Its coverage is a reference selection of Australian foods, rather than a complete inventory of products sold worldwide.

**How many nutrients can AFCD describe?**

AFCD reports up to 268 nutrients per food. The nutrient documentation explains the units, derivation, assumptions, and limitations used for those components.

**What changed in the latest AFCD dataset?**

Release 3 incorporated new analytical data for 118 foods and an updated vitamin D dataset. That update describes the dataset as a whole; individual sampling notes provide the evidence behind a particular food.

**Are all AFCD values laboratory measurements?**

Laboratory analysis is the primary source, but a food's derivation can also identify calculated, borrowed, or label-based data. Sampling notes can include how many samples were purchased and where and when they were purchased.

**Are nutrient comparisons based on serving size?**

AFCD's nutrient comparison tables report values per 100 g. A ranking therefore compares equal food weights, which can differ substantially from the amounts someone would serve.

