# FairPrice 爬蟲｜新加坡超市商品、價格、促銷、庫存一鍵匯出（免 API） (`claude_code_reviewer/fairprice-scraper`) Actor

免登入抓 NTUC FairPrice（新加坡最大超市）商品：售價、原價、折扣、促銷、品牌、分類與庫存，輸出 JSON／CSV／Excel。跨境電商比價、選品、通路研究必備。

- **URL**: https://apify.com/claude\_code\_reviewer/fairprice-scraper.md
- **Developed by:** [Chad](https://apify.com/claude_code_reviewer) (community)
- **Categories:** SEO tools, E-commerce, Agents
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 搜尋商品

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

## FairPrice 爬蟲｜新加坡超市商品、價格、促銷一鍵下載（免 API）

抓 **NTUC FairPrice**（fairprice.com.sg）超市商品資料:關鍵字搜尋列表、售價、促銷標籤、品牌、分類、庫存、圖片。走公開 JSON API、**不用登入、不用 token、不用瀏覽器**,輸出乾淨的 snake\_case 結構化資料。

新加坡 FMCG 價格情報是成熟的 B2B 需求 —— 同一組關鍵字定期跑,就是一條 SG 超市價格追蹤曲線。

***

### 輸出欄位

| 欄位 | 說明 |
| --- | --- |
| `product_id` | FairPrice 商品 ID |
| `name` | 商品名稱 |
| `brand` | 品牌 |
| `price` | 售價（SGD） |
| `original_price` | 原價（促銷前 mrp,無促銷時為 null） |
| `discount_pct` | 折扣百分比（由售價/原價計算,無促銷時為 null） |
| `price_per_unit` | 單位價格（v1.1,目前恆為 null） |
| `unit_of_measure` | 計量單位,例如 `1 L`、`500 g` |
| `category` | 主分類名稱 |
| `category_path` | 分類路徑（v1.1,目前恆為 null） |
| `in_stock` | 是否有貨 |
| `is_express_delivery` | 是否快速配送（v1.1,目前恆為 null） |
| `promo_label` | 促銷文案,例如 `*Buy 1* Save $0.35` |
| `rating` | 平均評分（無評論為 null） |
| `review_count` | 評論數 |
| `image_urls` | 商品圖片網址陣列 |
| `product_url` | 商品頁面連結 |
| `source_mode` | 來源模式（`search`） |
| `source_query` | 觸發這筆的關鍵字 |
| `scraped_at` | 抓取時間（ISO 8601） |

> 缺值一律補 `null`,欄位不省略。標記 v1.1 的欄位已保留在 schema 內,待下一版補值。

### 模式

| mode | 輸入 | 產出 | 計費事件 |
| --- | --- | --- | --- |
| `search` | `keywords[]`（≤50） | 搜尋結果 listing | `search-listing` |

> 商品詳情(detail)模式規劃於 **v1.1** —— 目前 search 回傳的商品物件已含品牌、價格、促銷、分類、圖片等主要欄位,足夠多數比價/監控情境。

### 輸入

| 參數 | 型別 | 說明 |
| --- | --- | --- |
| `keywords` | string\[] | 搜尋關鍵字,一個概念一個關鍵字最準（上限 50） |
| `bulkInput` | string | 一行一個關鍵字,執行時自動併入 `keywords` |
| `storeId` | string | 選填,指定門市取得該店價格/庫存;留空用預設線上倉 |
| `maxItems` | integer | 每個關鍵字最多抓幾筆（預設 50、上限 500） |
| `proxyConfiguration` | object | 進階,通常不用開（FairPrice 無 Cloudflare） |

#### 範例 1 — 單一關鍵字

```json
{ "keywords": ["milk"], "maxItems": 30 }
```

#### 範例 2 — 多關鍵字批量

```json
{ "keywords": ["coffee"], "bulkInput": "eggs\nrice\nolive oil", "maxItems": 20 }
```

#### 範例 3 — 指定門市

```json
{ "keywords": ["bread"], "storeId": "165", "maxItems": 50 }
```

### 輸出範例

```json
{
    "product_id": "1577586",
    "name": "RedMan UHT Full Cream Milk 3.5%",
    "brand": "Redman",
    "price": 3.13,
    "unit_of_measure": "1 L",
    "category": "UHT Milk",
    "in_stock": true,
    "promo_label": "*Buy 1* Save $0.35",
    "rating": null,
    "review_count": null,
    "image_urls": ["https://media.nedigital.sg/fairprice/90221204_XL1_..."],
    "product_url": "https://www.fairprice.com.sg/product/redman-uht-full-cream-milk-35-1577586",
    "source_mode": "search",
    "source_query": "milk",
    "scraped_at": "2026-07-04T00:00:00.000Z"
}
```

### 計費（PPE）

| 事件 | 時機 | 單價 |
| --- | --- | --- |
| `actor-start` | 每次執行一次 | $0.005 |
| `search-listing` | 搜尋每成功抓一筆 | $0.002 |

計費**只在資料成功寫入 dataset 後**發生;每次執行結束會 log `total_items / charged / skipped`,計費筆數永遠等於實際輸出筆數。

### 注意事項

- 只抓**公開**商品資料,不抓需登入內容。
- 走 JSON API + CheerioCrawler,**不用瀏覽器**,執行成本低。
- 連續 5 頁抓不到新資料自動停止,不空轉。
- 價格/促銷以 FairPrice 當下回傳為準,會隨門市與時間變動。

### FAQ

**Q:抓得到促銷價嗎?** 抓得到當前售價(`price`)、促銷前原價(`original_price`)、折扣百分比(`discount_pct`)與促銷文案(`promo_label`)。無促銷時原價/折扣為 null。

**Q:可以抓特定門市的價格嗎?** 可以,填 `storeId`。留空則為預設線上倉。

**Q:會被擋嗎?** FairPrice 無 Cloudflare / bot 挑戰,datacenter 直連即可,一般不需要 proxy。

### 部署

```bash
apify login
apify push
```

### 免責聲明

本 Actor 僅抓取公開可存取的商品資訊,供價格研究與比價用途。使用者須自行遵守 FairPrice 網站條款與當地法規。

***

FairPrice 爬蟲、NTUC FairPrice API、新加坡超市、比價、價格追蹤、FMCG 數據、Singapore grocery data

# Actor input Schema

## `keywords` (type: `array`):

要搜尋的商品關鍵字。例如:milk、eggs、rice、coffee。一個概念一個關鍵字最準。

## `bulkInput` (type: `string`):

**一行一個**關鍵字,按 Enter 換行,不要加引號或逗號。執行時自動併入上面的關鍵字。從 Google Sheet / Excel 複製一整欄貼進來最快。

## `storeId` (type: `string`):

指定 FairPrice 門市以取得該店的價格/庫存。留空即用預設線上倉。一般用途留空即可。

## `maxItems` (type: `integer`):

每個關鍵字最多抓幾筆商品。越多費用越高。

## `proxyConfiguration` (type: `object`):

FairPrice 對 datacenter 請求友善(無 Cloudflare),預設不用 proxy 即可運作。只有大量抓取遇到被擋時才建議開啟。

## Actor input object example

```json
{
  "keywords": [
    "milk"
  ],
  "maxItems": 50,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# 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 = {
    "keywords": [
        "milk"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("claude_code_reviewer/fairprice-scraper").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 = { "keywords": ["milk"] }

# Run the Actor and wait for it to finish
run = client.actor("claude_code_reviewer/fairprice-scraper").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 '{
  "keywords": [
    "milk"
  ]
}' |
apify call claude_code_reviewer/fairprice-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/CVQzF6QdJnbhmCZTv/builds/qLQtXVZftrB2WfBaL/openapi.json
