# Malaysia Grocery Prices: PriceCatcher Data by State and Shop (`yappman/malaysia-pricecatcher-grocery-prices`) Actor

Malaysia grocery and food prices from PriceCatcher open data (DOSM and KPDN), collected daily: latest price, price history, price changes and state summaries by item, state, district and shop. Malaysia price data under CC BY 4.0. Not affiliated with DOSM or KPDN.

- **URL**: https://apify.com/yappman/malaysia-pricecatcher-grocery-prices.md
- **Developed by:** [Russell Yapp](https://apify.com/yappman) (community)
- **Categories:** E-commerce, Business
- **Features:** Limited permissions
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 rows

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/actors/store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Malaysia Grocery Prices: PriceCatcher Data by State and Shop

Daily Malaysia grocery prices: several hundred everyday food and grocery items (797 in the item list on 3 December 2026) at shops and markets across Malaysia (about 3,900 premises listed), from the PriceCatcher open dataset. In Malay this is *harga barang* data. Ask for the latest price, a price history, the items whose price moved, or a per-state summary, and get one clean row per observation with the item, the shop, the state and district, and the price in ringgit (RM).

The PriceCatcher dataset is published as open data on OpenDOSM and data.gov.my. Its dataset page names the Department of Statistics Malaysia (DOSM) and the Ministry of Domestic Trade as the data sources, and says the prices are collected and verified by groundstaff every day. This Actor reads the published files, joins the item and premise lookups, and returns rows. It does not scrape any shop website.

### What you can do

| Mode | What you get |
|---|---|
| `latest` | The last price of each item at each shop inside the lookback window (default 7 days). One row per item and shop. |
| `byItem` | Every observation in the lookback window for the items you name. |
| `byPlace` | Every observation in the lookback window for the states, districts, shop types, shop names or chain you name. |
| `history` | Every observation between `dateFrom` and `dateTo` (a span of at most 366 days, both dates included) for the items or places you name. |
| `priceChange` | Items whose latest price at a shop moved by at least `minChangePercent` against the price `compareDays` earlier. Biggest moves first. |
| `stateSummary` | Per item, state and day: the number of observations and the minimum, median and maximum price. The smallest output for trends: the sums are done for you. |

Filters work in every mode: `items` (Malay words in the item name, group or category, such as `ayam` or `beras`), `itemCodes`, `itemGroup`, `itemCategory`, `states`, `districts`, `premiseTypes`, `premiseCodes`, `premiseName` and `chain`. Accents and case are ignored. If a filter matches no item or no shop, the run reads no month file, charges nothing and says so.

A lookback window ends on the latest date in the data, not on today's date. The file can trail the calendar by a day or two, and every row carries its own `date` and the `fileRelease` it came from.

### Example input

```json
{
  "mode": "priceChange",
  "states": ["Selangor"],
  "itemCategory": "AYAM",
  "lookbackDays": 7,
  "compareDays": 7,
  "minChangePercent": 5,
  "maxItems": 200
}
```

The first run prefilled in the Apify Console asks for 20 rows of `ayam` in Selangor, which costs about $0.04. A run with no `maxItems` returns at most 100 rows. Raise `maxItems` (up to 100,000) when you want more.

### Demo

[![Malaysia Grocery Prices on Apify: the dataset columns of a price-change run. Click to play the demo on YouTube.](https://data.yappman.com/assets/malaysia-dataset-columns.png)](https://youtu.be/sRW9H7bmsEk)

65-second demo on YouTube: https://youtu.be/sRW9H7bmsEk

Example Task (chicken price changes in Selangor, capped at 20 rows): https://apify.com/yappman/malaysia-pricecatcher-grocery-prices/examples/malaysia-chicken-price-moves-selangor

### Output

One JSON row per observation (`rowType: "price"`) or per summary (`rowType: "stateSummary"`). Fields that do not apply to a mode are `null`.

- Item: `itemCode`, `itemName`, `unit`, `itemGroup`, `itemCategory`.
- Shop: `premiseCode`, `premiseName`, `premiseType`, `address`, `state`, `district`, and `chainGuess`.
- Price: `date`, `priceRm`. In `priceChange` mode also `previousDate`, `previousPriceRm`, `priceChangeRm`, `priceChangePercent`.
- Summary: `observations`, `minPriceRm`, `medianPriceRm`, `maxPriceRm` (with `state` and `date`).
- Provenance: `source`, `fileRelease` (the monthly file and the time the publisher last changed it), `attribution` and `disclaimer`.

Every run also writes a `RUN_SUMMARY` record with counts only: the months read, the data date, the window, the rows pushed, what was charged, and whether any file was skipped.

Things to know about the data:

- Items are generic goods (for example chicken, green chilli, rice), each with a unit. There are no brands and no barcodes, so this is an index of prices by place and day, not a branded basket tool.
- `chainGuess` is a guess from the shop name by fixed patterns (Mydin, 99 Speedmart, Lotus's, AEON, Giant and a few more). The source has no chain field. Shops that match no pattern have `null`.
- Premise names and addresses are given as the source publishes them. A text value that looks like an email address or a phone number is replaced by `[removed: contact-like text]`.
- PriceCatcher suits high-frequency checks of specific items in specific places. For inflation measurement, DOSM recommends its consumer price index.

### How fresh, and how it avoids repeat downloads

The publisher's dataset page shows a daily update of the current month's file (read 3 December 2026). The newest date in the file can still be a day or two behind: on 3 December 2026 it was 1 December. The Actor keeps each month file in a key-value store in your Apify account, named `malaysia-pricecatcher-cache`, together with the publisher's ETag and Last-Modified. A later run asks the publisher one question ("has it changed?") and downloads nothing new when the answer is no. A finished month is not asked about again. The two lookup files are checked at most once a week.

The cache store stays in your account until you delete it, and its storage counts as your own Apify usage (about 10 MB for each month file: the January 2022 file was 10.1 MB compressed, so a 366-day history keeps up to 13 files, roughly 100 to 130 MB). You can delete it at any time: the next run downloads what it needs again.

### Pricing

Pay per event, the same on every plan:

| Event | Price | When |
|---|---|---|
| Run start | $0.005 | Once per run, when the first month file has been read. |
| Month file | $0.003 | Once per monthly file read, even if no row matches. A window that reaches back into the previous month reads two. |
| Row | $0.0015 | Each row returned (a price row or a summary row). |

Examples, each with one month file read: a 100-row run costs $0.005 + $0.003 + 100 x $0.0015 = $0.158. A 1,000-row history costs $1.508. A 50-row state summary costs $0.083. Each further month file adds $0.003: a 7-day window reads two files in the first days of a month, and a 366-day history reads up to 13. A run in which every file is skipped charges nothing, and rows stop at your maximum-cost setting.

### Licence and credit

This data is made open under the Creative Commons Attribution 4.0 International License (CC BY 4.0), as stated on the publisher's dataset pages (read 3 December 2026). The publisher's site-level terms were not found when this was written.

Every row carries this line, and you should keep it when you share the data:

Contains data from PriceCatcher (https://open.dosm.gov.my/data-catalogue/pricecatcher), Department of Statistics Malaysia (DOSM) and the Ministry of Domestic Trade, via data.gov.my, licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Changes: joined with the item and premise lookups, filtered, rounded and summarised; contact-like text replaced; chainGuess added.

The data comes with no warranty of accuracy or suitability. This Actor is not affiliated with or endorsed by DOSM, KPDN or the Government of Malaysia, and uses none of their logos.

### Limits

- One month file is read at a time and held compressed in memory; the Actor needs 1,024 MB.
- A run holds at most about 1 million observations (or summary groups), and a state summary at most 12 million prices. If a very broad query reaches that, the run stops reading further month files and does not charge for them, names the months it did not read in `RUN_SUMMARY` (`monthsNotReadAtCap`, with `candidateCapReached`), and returns what it holds from the months already read. Add a filter to narrow it.
- A month file that is not published, cannot be read, or is refused is named in `RUN_SUMMARY` and charges nothing. If every file is skipped the run fails.
- History starts in January 2022: the dataset page lists 60 monthly files, 2022-01 to 2026-12, and `dateFrom` cannot be earlier than 2022-01-01. A month that is not there is skipped by name. Older months are larger (January 2022 held 2.45 million rows, about 65 MB uncompressed), so a long history reads more data per file.

### Use it on a schedule

Run it daily with the same input and compare the output: `priceChange` mode with a Task and an Apify schedule gives you a price-move alert without any code.

# Actor input Schema

## `mode` (type: `string`):

What to return. Latest: the last price of each item at each shop in the lookback window. By item and By place: every observation in the lookback window for the items or places you name. History: every observation between two dates. Price change: items whose price moved by at least a percentage. State summary: minimum, median and maximum per item, state and day.

## `items` (type: `array`):

Words to find in the item name, group or category (Malay, as the source writes them, such as ayam or beras). An item matches when all the words of one entry are in its text; accents and case are ignored. Up to 20 entries.

## `itemCodes` (type: `array`):

PriceCatcher item codes (whole numbers). Up to 200.

## `itemGroup` (type: `string`):

Words in the item group, such as BARANGAN SEGAR. Accents and case are ignored.

## `itemCategory` (type: `string`):

Words in the item category, such as SAYUR-SAYURAN. Accents and case are ignored.

## `states` (type: `array`):

States as the source writes them (such as Selangor, Pulau Pinang or W.P. Kuala Lumpur); accents and case are ignored. A state that matches no shop gives no rows. Up to 20.

## `districts` (type: `array`):

Districts as the source writes them. Up to 20.

## `premiseTypes` (type: `array`):

Shop types as the source writes them, such as Pasar Basah or Pasar Raya / Supermarket. Up to 20.

## `premiseCodes` (type: `array`):

PriceCatcher premise codes (whole numbers). Up to 200.

## `premiseName` (type: `string`):

Words that must all appear in the premise name. Accents and case are ignored.

## `chain` (type: `string`):

The chain guessed from the premise name, such as Mydin or 99 Speedmart. The source has no chain field, so this is a guess from the name.

## `lookbackDays` (type: `integer`):

For latest, by item, by place, price change and state summary (without dates): how many days back from the latest date in the data (1 to 31).

## `compareDays` (type: `integer`):

Price change mode: compare the latest price with the price this many days earlier (1 to 31).

## `minChangePercent` (type: `number`):

Price change mode: keep only moves of at least this many percent, up or down (0 to 1000).

## `dateFrom` (type: `string`):

YYYY-MM-DD, not before 2022-01-01 (the oldest month the publisher lists). Needed in history mode; in state summary mode it replaces the lookback window.

## `dateTo` (type: `string`):

YYYY-MM-DD, not after today (Malaysian date), at most 365 days after dateFrom.

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

The most rows returned (1 to 100,000). Each row is one row event. The default is small so a first run is cheap.

## Actor input object example

```json
{
  "mode": "latest",
  "items": [
    "ayam"
  ],
  "states": [
    "Selangor"
  ],
  "lookbackDays": 7,
  "compareDays": 7,
  "minChangePercent": 5,
  "maxItems": 20
}
```

# Actor output Schema

## `rows` (type: `string`):

No description

## `runSummary` (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 = {
    "items": [
        "ayam"
    ],
    "states": [
        "Selangor"
    ],
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("yappman/malaysia-pricecatcher-grocery-prices").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 = {
    "items": ["ayam"],
    "states": ["Selangor"],
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("yappman/malaysia-pricecatcher-grocery-prices").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "items": [
    "ayam"
  ],
  "states": [
    "Selangor"
  ],
  "maxItems": 20
}' |
apify call yappman/malaysia-pricecatcher-grocery-prices --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,yappman/malaysia-pricecatcher-grocery-prices"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/0MdHYNyPqXbXoLzOO/builds/2VUPU75cGCPhatrJt/openapi.json
