# NilaiGizi.com (`ryyos/nilai-gizi`) Actor

\[$0.5/1000] crawler food nutrition data (product detail pages and advance search) from nilaigizi.com

- **URL**: https://apify.com/ryyos/nilai-gizi.md
- **Developed by:** [Rio Dwi Saputra](https://apify.com/ryyos) (community)
- **Categories:** Other, E-commerce, News
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

**Search Indonesian food nutrition data in any language** and get back complete, structured nutrition facts — calories, protein, fat, vitamins, minerals, and %AKG (Indonesia's recommended daily intake) — sourced from [nilaigizi.com](https://nilaigizi.com), an independent food composition database maintained by [ahligizi.id](https://ahligizi.id). Just type a food name like "white milk" or "instant noodles" in English (or any language) — the Actor **automatically translates your keyword to Indonesian**, searches the site, and can translate the results **back to English** so you never have to speak Indonesian to use Indonesian nutrition data. Runs on the Apify platform with scheduling, API access, and one-click dataset export built in, so there's no scraper to write or rate limits to manage yourself.

### Why use NilaiGizi.com Food Nutrition Search?

- **No language barrier** — search "milk", "rice", or "fried noodles" and still get accurate matches, even though nilaigizi.com itself only understands Indonesian. Keyword translation happens automatically on every run.
- **Bilingual output** — choose whether results come back in English or the site's original Indonesian, right from the input form.
- **Complete nutrition facts, not just a summary** — every match is automatically enriched with the full nutrient table, product images, related products, and edit history from its detail page, not just the search snippet.
- **Great for nutrition & diet apps** — build meal planners, calorie trackers, or diet tools on real Indonesian food composition data instead of manually transcribing values from a website.
- **Zero setup** — no proxies, no browser automation, no scraper maintenance. Point it at a keyword and get structured JSON back.

### How to use NilaiGizi.com Food Nutrition Search

1. Click **Try for free** (or **Start**) to open the Actor.
2. On the **Input** tab, type the food or product name you're looking for in the **Search keyword** field — any language works.
3. Pick your **Output language** (English or Indonesian) and adjust pagination if needed (see [Input](#input) below).
4. Click **Start** and wait for the run to finish.
5. Open the **Dataset** tab to view, filter, or export your results.

### Input

The Actor takes a single JSON input object; see the **Input** tab in Apify Console for the full interactive form.

| Field | Description |
|---|---|
| `keyword` | Food/product name to search for, in any language, e.g. `"white milk"` or `"nasi"`. Automatically translated to Indonesian before searching. |
| `outputLanguage` | `"en"` to machine-translate every output field to English (default), or `"id"` to keep the site's original Indonesian text. |
| `includeFullDetails` | When `true` (default), fetches the full nutrition facts table, images, and related products for every result. Set to `false` for a lighter, faster run that only returns the search-result summary. |
| `startPage`, `maxPages` | Pagination controls — `maxPages` caps how many result pages are fetched per run, to stay light on this small, independently-run site. |

Example input:

```json
{
    "keyword": "white milk",
    "outputLanguage": "en",
    "maxPages": 2
}
```

### Output

Each dataset item is one matching product, enriched with its full nutrition facts (unless `includeFullDetails` is disabled).

```json
{
    "productId": 22,
    "url": "https://nilaigizi.com/gizi/detailproduk/22/nilai-kandungan-gizi-Nasi-/-Nasi-Putih",
    "name": "White Rice",
    "category": "Natural",
    "summary": "Energy 180.00 kcal, Total Fat 0.30 g, Protein 3.00 g, ...",
    "nutrients": [
        { "name": "Energy", "amount": 180, "unit": "kcal", "percentAkg": 8.37 },
        { "name": "Total Fat", "amount": 0.3, "unit": "g", "percentAkg": 0.45 }
    ],
    "images": ["https://nilaigizi.com/assets/images/produk/produk_1535761724.png"],
    "relatedProducts": [
        { "productId": 23, "name": "Steamed Rice", "url": "https://nilaigizi.com/gizi/detailproduk/23/...", "summary": "Water 56.70 g, Energy 180.00 kcal, ..." }
    ],
    "editHistory": [
        { "editor": "Muhammad Iqbal Basagili, S.Gz., M.P.H. (Nutr & Diet)", "date": "March 20, 2021" }
    ]
}
```

You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

#### Data table

| Field | Description |
|---|---|
| `productId` | Numeric product ID on nilaigizi.com |
| `name` | Product name |
| `category` | `Natural` or `Processed` (translated from `Alami`/`Buatan`) |
| `summary` | One-line nutrient snippet, as shown in search results |
| `nutrients` | Full nutrition table: name, amount, unit, and %AKG (% of Indonesia's recommended daily intake) |
| `images` | Product image URLs |
| `relatedProducts` | Similar products linked from the detail page |
| `editHistory` | Who last verified the data and when |

### Pricing / cost estimation

This Actor makes lightweight HTTP requests only — no browser rendering — with a polite delay between each one, so runs are fast and cheap. A typical keyword search with a couple of result pages and full details enabled easily fits within the Apify free tier's monthly compute allowance.

### Tips

- Leave `includeFullDetails` off if you only need a quick list of matching products and their summary line — it skips the extra per-product request and finishes much faster.
- Keep `maxPages` modest for broad, generic keywords (like "susu"/"milk"), which can span many result pages; narrow your keyword instead of raising the page cap.
- Set `outputLanguage` to `"id"` if you want the original Indonesian terminology (e.g. for cross-referencing against the live site).

### FAQ, disclaimers, and support

Keyword and output translation is powered by a free machine-translation service and may occasionally produce an imperfect phrase, especially for compound or brand-specific product names — the underlying nutrition figures themselves are always sourced directly from nilaigizi.com's own published product pages. Verify translated or original data against the original source before using it for medical, regulatory, or labeling purposes. This Actor is not affiliated with nilaigizi.com or ahligizi.id. If you run into scraping issues (a selector no longer matching after a site redesign, for example), please open an issue in the Issues tab — a custom scraping solution can also be arranged on request.

# Actor input Schema

## `keyword` (type: `string`):

Food or product name to search for, in any language (e.g. "white milk", "instant noodles", "brown rice"). It is automatically translated to Indonesian before searching, since nilaigizi.com only indexes Indonesian-language product names.

## `outputLanguage` (type: `string`):

Language for the scraped output (product name, category, nutrient names, etc). "English" machine-translates every field; "Indonesian" returns the site's original text as-is (faster, no translation step).

## `includeFullDetails` (type: `boolean`):

When enabled, fetches the complete nutrition facts table, images, and related products for every search result (one extra, rate-limited request per item). When disabled, only the lightweight search-result summary is returned.

## `startPage` (type: `integer`):

Search result page to start fetching from (each page holds 20 results).

## `maxPages` (type: `integer`):

Caps how many search result pages are fetched per run, to control cost/duration and stay polite to this small, independently-run site.

## Actor input object example

```json
{
  "keyword": "milk",
  "outputLanguage": "en",
  "includeFullDetails": true,
  "startPage": 1,
  "maxPages": 3
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "keyword": "milk"
};

// Run the Actor and wait for it to finish
const run = await client.actor("ryyos/nilai-gizi").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "keyword": "milk" }

# Run the Actor and wait for it to finish
run = client.actor("ryyos/nilai-gizi").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "keyword": "milk"
}' |
apify call ryyos/nilai-gizi --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=ryyos/nilai-gizi",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "NilaiGizi.com",
        "description": "[$0.5/1000] crawler food nutrition data (product detail pages and advance search) from nilaigizi.com",
        "version": "0.1",
        "x-build-id": "YuTTLtmgJxEbTAvrZ"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/ryyos~nilai-gizi/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-ryyos-nilai-gizi",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/ryyos~nilai-gizi/runs": {
            "post": {
                "operationId": "runs-sync-ryyos-nilai-gizi",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/ryyos~nilai-gizi/run-sync": {
            "post": {
                "operationId": "run-sync-ryyos-nilai-gizi",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "keyword"
                ],
                "properties": {
                    "keyword": {
                        "title": "Search keyword",
                        "type": "string",
                        "description": "Food or product name to search for, in any language (e.g. \"white milk\", \"instant noodles\", \"brown rice\"). It is automatically translated to Indonesian before searching, since nilaigizi.com only indexes Indonesian-language product names.",
                        "default": "milk"
                    },
                    "outputLanguage": {
                        "title": "Output language",
                        "enum": [
                            "en",
                            "id"
                        ],
                        "type": "string",
                        "description": "Language for the scraped output (product name, category, nutrient names, etc). \"English\" machine-translates every field; \"Indonesian\" returns the site's original text as-is (faster, no translation step).",
                        "default": "en"
                    },
                    "includeFullDetails": {
                        "title": "Include full nutrition facts per result",
                        "type": "boolean",
                        "description": "When enabled, fetches the complete nutrition facts table, images, and related products for every search result (one extra, rate-limited request per item). When disabled, only the lightweight search-result summary is returned.",
                        "default": true
                    },
                    "startPage": {
                        "title": "Start page",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Search result page to start fetching from (each page holds 20 results).",
                        "default": 1
                    },
                    "maxPages": {
                        "title": "Max result pages to fetch",
                        "minimum": 1,
                        "maximum": 50,
                        "type": "integer",
                        "description": "Caps how many search result pages are fetched per run, to control cost/duration and stay polite to this small, independently-run site.",
                        "default": 3
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
