# TKPI Nutrition



The official Indonesian food composition table — every food in the Ministry of Health's TKPI, and the full nutrient profile of any one of them.



## Daily Nutrition Requirements (AKG)

The official recommended daily intake for all 26 age and life-stage groups — energy, macros, every vitamin and mineral. The other half of the food composition table.

- Method: `GET`
- Path: `/v1/nutrition/requirements`

**Parameters**

| Name | Type | | Description |
|---|---|---|---|
| `group` | string | optional | `children`, `male`, `female`, `pregnancy`, or `lactation`. Omits to all 26 groups. |

**Example request**

```bash
curl https://api.diraz.ae/v1/nutrition/requirements \
  -H "Authorization: Bearer drz_live_…"
```

**Example response**

```json
{
  "data": {
    "groups": {
      "male": [
        {
          "age_group": "19 - 29 tahun",
          "weight_kg": 60,
          "height_cm": 168,
          "energy_kcal": 2650,
          "protein_g": 65,
          "fat_total_g": 75,
          "fat_omega_6_g": 17,
          "fat_omega_3_g": 1.6,
          "carbohydrate_g": 430,
          "fibre_g": 37,
          "water_ml": 2500,
          "vitamin_c_mg": 90,
          "calcium_mg": 1000,
          "iron_mg": 9,
          "zinc_mg": 11
        }
      ]
    }
  },
  "meta": {
    "request_id": "req_7Q2fK4mZ"
  }
}
```

## Indonesian Food Directory

All 1,146 foods in the Ministry of Health's composition table, searchable by name and filterable by group.

- Method: `GET`
- Path: `/v1/nutrition/foods`

**Parameters**

| Name | Type | | Description |
|---|---|---|---|
| `q` | string | optional | Keyword against the food's name, e.g. `rice` or `tempe`. |
| `group` | string | optional | The table's own group, in the requested language — `Cereals` or `Serealia`. |
| `lang` | string | optional | `en` for the table's English names (default), `id` for Indonesian — the table's own names, never our translation. |
| `limit` | integer | optional | Foods per page. |

**Example request**

```bash
curl https://api.diraz.ae/v1/nutrition/foods \
  -H "Authorization: Bearer drz_live_…"
```

**Example response**

```json
{
  "data": {
    "foods": [
      { "code": "AR001", "name": "Rice, milled, raw", "group": "Cereals", "type": "Raw" },
      { "code": "AR002", "name": "Rice, milled, variant pelita, raw", "group": "Cereals", "type": "Raw" }
    ]
  },
  "meta": {
    "request_id": "req_7Q2fK4mZ",
    "as_of": "2026-08-19T00:00:00.000Z",
    "age_seconds": 42,
    "next_update_at": "2026-08-20T00:00:00.000Z"
  }
}
```

## Food Nutrient Profile

The full nutrient profile of one food — energy, macronutrients, minerals, and vitamins per 100 g, from the official composition table.

- Method: `GET`
- Path: `/v1/nutrition/foods/{code}`

**Parameters**

| Name | Type | | Description |
|---|---|---|---|
| `code` | path segment | required | A food code from the directory, e.g. `HR005` for a fresh Alabio duck egg. |
| `lang` | string | optional | `en` (default) or `id` — the food name in the table's own wording. The Indonesian page also fills in Latin names. |

**Example request**

```bash
curl https://api.diraz.ae/v1/nutrition/foods/%7Bcode%7D \
  -H "Authorization: Bearer drz_live_…"
```

**Example response**

```json
{
  "data": {
    "code": "HR005",
    "name": "Alabio duck egg, fresh",
    "latin_name": null,
    "group": "Eggs",
    "type": "Raw",
    "description": null,
    "water_g": 70,
    "energy_kcal": 187,
    "protein_g": 11.8,
    "fat_g": 14.2,
    "carbohydrate_g": 3,
    "fibre_g": 0,
    "ash_g": 1,
    "calcium_mg": 60,
    "phosphorus_mg": 268,
    "iron_mg": 6,
    "sodium_mg": 115,
    "potassium_mg": 80,
    "copper_mg": 0.6,
    "zinc_mg": 1.7,
    "retinol_mcg": 180,
    "beta_carotene_mcg": 437,
    "thiamin_mg": 1.55,
    "riboflavin_mg": 0.37,
    "niacin_mg": 0.1
  },
  "meta": {
    "request_id": "req_7Q2fK4mZ",
    "as_of": "2026-08-19T00:00:00.000Z",
    "age_seconds": 42,
    "next_update_at": "2026-08-20T00:00:00.000Z"
  }
}
```