# China Wholesale Food Prices: Xinfadi & National Index (`sinodata/china-agri-prices`) Actor

Daily China wholesale food prices, no login: 470+ vegetables, fruit, meat, eggs, seafood and grain prices from Beijing Xinfadi (新发地) with history since 2022, plus the national wholesale price indexes and daily movers from China's Ministry of Agriculture.

- **URL**: https://apify.com/sinodata/china-agri-prices.md
- **Developed by:** [SinoData](https://apify.com/sinodata) (community)
- **Categories:** E-commerce
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.45 / 1,000 prices

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-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

## China Wholesale Food Prices: Xinfadi & National Index

Get **daily wholesale food prices in China** as clean JSON. No login, no Chinese needed.

- **Beijing Xinfadi (北京新发地)**, China's largest wholesale food market: about **470 prices every day** for vegetables, fruit, pork, beef, lamb, eggs, poultry, fish, seafood, rice and oil, with min / max / average price, unit, spec and origin province
- **History since 2022-01-01**: any day or date range
- **National indexes** from the Ministry of Agriculture's price portal (全国农产品批发市场价格信息网): the Agricultural Products Wholesale Price 200 Index, "vegetable basket" index, grain & oil, vegetables, fruit, livestock and aquatic indexes
- **Daily movers**: the 20 products whose national average wholesale price moved most since the previous day
- **Hog prices** (optional): live hog, corn and soybean meal prices and the hog-to-grain ratio, national and for all 31 provinces
- English category names and prices converted to **CNY per kg**

### Use cases

- **Food inflation and CPI nowcasting**: Chinese food prices days before official statistics.
- **Commodity and agri trading**: pork, eggs, vegetables and fruit price trends.
- **Food companies, importers and exporters**: track the Chinese wholesale market for your products.
- **Research and journalism**: long daily time series for hundreds of products.
- **Monitoring**: schedule a daily run and send the results to Google Sheets, Slack or your database.

### Example input

```json
{
  "dateFrom": "2026-09-01",
  "dateTo": "2026-09-30",
  "categories": ["meatEggs"],
  "products": ["猪", "鸡蛋"],
  "includeNationalData": true
}
```

Leave the dates empty to get the latest published day.

### Output

A Xinfadi price:

```json
{
  "type": "price",
  "market": "北京新发地 (Beijing Xinfadi)",
  "date": "2026-10-07",
  "product": "大白菜",
  "spec": null,
  "category": "蔬菜",
  "categoryEnglish": "Vegetables",
  "minPrice": 0.35,
  "maxPrice": 0.45,
  "avgPrice": 0.4,
  "unit": "斤",
  "avgPricePerKg": 0.8,
  "currency": "CNY",
  "origin": "冀",
  "originProvinces": ["河北"]
}
```

A national index and a national mover:

```json
{ "type": "nationalIndex", "date": "2026-09-30", "indexName": "农产品批发价格200指数", "indexNameEnglish": "Agricultural Products Wholesale Price 200 Index", "value": 115.36, "previousValue": 115.32, "change": 0.04 }
{ "type": "nationalMover", "date": "2026-10-07", "product": "豆角", "avgPrice": 6.846, "previousAvgPrice": 6.6683, "changePct": 2.66, "unit": "元/公斤" }
```

- Prices are in CNY. Most Xinfadi prices are per **斤 (jin, 500 g)**; `avgPricePerKg` converts them. Some items are priced per box (箱), piece (个) or basket (筐).
- `origin` uses Chinese province abbreviations (冀 = Hebei, 蒙 = Inner Mongolia, 鲁 = Shandong...); `originProvinces` spells them out.
- Product names are in Chinese as published. Use the **Product names** filter with Chinese keywords: 猪 pork, 牛 beef, 羊 lamb, 鸡蛋 eggs, 白菜 cabbage, 土豆 potato, 苹果 apple, 大米 rice.

### Hog prices

Turn on **Include hog prices** to add today's farm-gate prices from **China Pig Net (中国养猪网)**, the reference for China's hog market:

- **Live hogs**: 外三元 (crossbred), 内三元 (domestic three-way cross) and 土杂猪 (local breeds), in CNY per kg
- **Feed**: corn and soybean meal, in CNY per tonne (also converted to CNY per kg)
- **Hog-to-grain ratio** (猪粮比), the government's profitability benchmark
- **National**, with day-on-day, year-on-year and month-on-month changes, plus **any of the 31 provinces** (or `"all"`) with day-on-day changes

```json
{
  "type": "hogPrice",
  "date": "2026-10-11",
  "region": "全国",
  "regionEnglish": "China (national)",
  "product": "生猪(外三元)",
  "productEnglish": "Live hog (crossbred, Duroc x Landrace x Yorkshire)",
  "price": 10.26,
  "unit": "元/公斤",
  "pricePerKg": 10.26,
  "changeFromPreviousDay": 0.02,
  "yoyChangePct": -8.39,
  "momChangePct": -6.3,
  "hogGrainRatio": 4.37
}
```

Hog prices are today's values only (China Pig Net keeps its history for paying members); schedule a daily run to build a history.

### Pricing

**$0.0005 per record.** One full day (about 500 records including the national data) costs about $0.25; one product category for a month is usually a few hundred records. Hog prices for all provinces add 160 records ($0.08).

### Notes and limits

- Xinfadi publishes prices every day, with fewer items on public holidays.
- The national indexes and movers are always the latest published values (not historical).
- Only public data is collected.

### Feedback

Need another market or a field? Open an issue on the Issues tab.

# Actor input Schema

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

First day of Xinfadi prices, YYYY-MM-DD. Leave both dates empty for the latest published day. History goes back to 2022-01-01.

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

Last day, YYYY-MM-DD (default: same as From date).

## `categories` (type: `array`):

Only these product categories (leave empty for all).

## `products` (type: `array`):

Only products whose Chinese name contains one of these, e.g. 猪 (pork), 鸡蛋 (eggs), 白菜 (cabbage), 苹果 (apple). Leave empty for all.

## `maxPrices` (type: `integer`):

Upper limit on Xinfadi price records per run. One day has about 470.

## `includeNationalData` (type: `boolean`):

Also save the Ministry of Agriculture's national wholesale price indexes (200 index, vegetable basket, grain & oil...) and the day's 20 biggest price movers. Always the latest values.

## `includeHogPrices` (type: `boolean`):

Also save today's live hog prices (外三元, 内三元, 土杂猪), corn and soybean meal prices and the hog-to-grain ratio from China Pig Net (中国养猪网): national by default, provinces below.

## `hogRegions` (type: `array`):

Provinces for hog prices in Chinese or English (e.g. 河南, Guangdong), or "all" for all 31. The national price is always included.

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

Not needed for normal use.

## Actor input object example

```json
{
  "maxPrices": 2000,
  "includeNationalData": true,
  "includeHogPrices": false,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `results` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("sinodata/china-agri-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("sinodata/china-agri-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 '{}' |
apify call sinodata/china-agri-prices --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,sinodata/china-agri-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/Ahxaj876xkG8TtVsi/builds/rSHH1uxu7FJdUyc9a/openapi.json
