# Japan Gold & Silver Prices – Dealer Buy & Retail (`datalab-jp/japan-precious-metal-prices`) Actor

Japanese gold, platinum, palladium and silver prices per gram from several Japanese bullion dealers in one table: retail (sell) and buy-back prices, spread, the dealer's day-on-day change and change since your last run. Optional Tanaka bullion coins and karat grades (K18, Pt900).

- **URL**: https://apify.com/datalab-jp/japan-precious-metal-prices.md
- **Developed by:** [Task Data](https://apify.com/datalab-jp) (community)
- **Categories:** Business, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 price rows

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

## Japan Gold & Silver Prices – Dealer Buy & Retail

Get **Japanese gold, platinum, palladium and silver prices** as published by several Japanese precious-metal dealers, in one table: the **retail (selling) price**, the **buy-back price**, the **spread** between them, the dealer's own **day-on-day change**, the **publication time** and the **change since your previous run**. Optionally add **Tanaka's bullion-coin prices** and **karat / purity-grade buy prices** (K24…K5, Pt1000…Pt850, SV925). All prices are in JPY per gram (or per coin) with the dealer and source URL on every row. No coding needed.

### What data can you extract?

| Field | Description | Example |
|---|---|---|
| `dealer` / `dealerName` / `dealerNameEn` / `dealerType` | Source ID, company name, and whether it sells and buys or only buys | `tanaka` / 田中貴金属工業 / Tanaka Kikinzoku Kogyo |
| `metal` / `productType` / `productCode` | Metal, product type (`bullion`, `coin`, `purity_grade`) and a code shared across dealers | `gold` / `bullion` / `gold_bullion` |
| `productNameEn` / `productNameJa` | English product name and the dealer's short label | Gold bullion bar (dealer's price per gram) / 金 |
| `fineness` / `weightGrams` | Metal content stated by a grade label (K18 = 0.75); coin weight | 0.75 / 31.1035 |
| `retailPrice` / `buyPrice` | Dealer's selling price and buying price | 23741 / 23192 |
| `buyPriceWithoutPremium` | Tanaka platinum coins: buy price without the coin premium | 274433 |
| `unit` / `currency` / `taxIncluded` | `JPY/g` or `JPY/coin`; tax treatment as labelled on the page | `JPY/g` / `JPY` / true |
| `spread` / `spreadPct` | Retail minus buy, and as % of retail | 549 / 2.31 |
| `retailChangePublished` / `buyChangePublished` | Day-on-day change as printed by the dealer (前日比) | 636 / 444 |
| `publishedAt` / `priceDate` / `publishedToday` / `hoursSincePublished` | When the dealer published the price (Japan time) and how old it is | 2026-10-09T17:00:00+09:00 |
| `buyRankAmongDealers` / `retailRankAmongDealers` / `dealersCompared` | Where this dealer stands for the same product in this run | 1 / 2 / 3 |
| `previousRetailPrice` / `previousBuyPrice` / `…ChangeSinceLastRun` / `changeType` | Change vs your previous run (`new`, `up`, `down`, `mixed`, `unchanged`) | 23105 / 22748 / `up` |
| `notes` | Conditions the dealer states, as codes (see field notes) | `["fees_extra"]` |
| `sourceUrl` / `scrapedAt` | Page the price was read from and when | https://gold.tanaka.co.jp/commodity/souba/ |

The default input returns the **bar prices of all three dealers: 10 rows** (measured 2026-10-10: Tanaka 3, Nihon Material 4, Gold Plaza 3). With every product type it is about **37 rows in total**: the 10 bar rows, 8 Tanaka coin rows and 19 Gold Plaza grade rows. Each run reads 3 public pages (one per dealer, one after another) and finishes in a few seconds.

#### Data sources (measured 2026-10-10)

| `dealer` | Page | What it publishes | Publication pattern seen |
|---|---|---|---|
| `tanaka` | gold.tanaka.co.jp/commodity/souba/ | Gold, platinum, silver: retail and buy per gram with day-on-day change; gold and platinum bullion coins (1, 1/2, 1/4, 1/10 oz) | Page says business days at 9:30 and 14:00 JST, plus extra updates on large market moves (the page showed a 17:00 publication on 2026-10-09). Day-on-day change is vs the previous business day's 9:30 price |
| `nihon-material` | material.co.jp/market.php | Gold, platinum, **palladium**, silver: retail and buy per gram with day-on-day change | Stamped "10:00発表" on 2026-10-09 |
| `goldplaza` | goldplaza.jp/gold/rate | Buy prices only: gold, platinum, silver ingots per gram, and karat / purity grades | Stamped with a date only; the publication time and the ingot day-on-day change are filled in by the page's own script, which this Actor does not call, so they are `null` |

How similar the numbers are: on 2026-10-09 Nihon Material's gold and platinum bar prices were identical to Tanaka's 9:30 publication, and Gold Plaza's ingot buy prices matched them too. The dealers differed in **silver**, in **timing** (Tanaka republished at 17:00), in what else they publish (palladium, coins, karat grades) and in their spreads. This Actor does not claim that one dealer is cheaper in general; compare `publishedAt` before comparing prices.

Weekends and Japanese holidays: dealers do not publish, and the pages keep the last business-day price. The Actor returns that price with its original `publishedAt` and `publishedToday: false`. When a page shows no number for a price (e.g. "お問合せ"), that price is `null` with `retailPriceStatus` / `buyPriceStatus` = `not_published`; a product with no number at all is skipped and counted in `RUN_REPORT`.

### Why scrape Japanese gold and silver dealer prices?

1. **Dealer price comparison** — see the retail and buy-back price of each dealer side by side, with `spread` and a per-metal summary in `RUN_REPORT`.
2. **Spread tracking** — the gap between a dealer's selling and buying price changes with market conditions; record it every business day.
3. **Japan premium research** — compare Japanese yen retail prices with international spot prices you already have (this Actor does not fetch spot prices or exchange rates).
4. **Price alerts** — schedule the Actor with `mode: "changes"` and receive only the prices that moved since the last run.
5. **AI agents / RAG** — give an LLM agent current Japanese dealer prices through the Apify MCP server, with explicit units, tax treatment and publication times it can reason over.

### How to use it (no coding)

1. Click **Try for free**.
2. Keep all three dealers selected, or pick the ones you need.
3. Optional: choose **Metals** (e.g. only gold) and **Product types** (add coins or karat grades).
4. Choose **Output mode**: `all` for the full table, `changes` for only new or moved prices.
5. Click **Start**, then export the results as JSON, CSV or Excel.
6. To monitor, create a **Schedule**, e.g. weekdays at 10:30 and 14:30 JST, with `mode: "changes"`.

### Input example

```json
{
  "dealers": ["tanaka", "nihon-material", "goldplaza"],
  "metals": [],
  "productTypes": ["bullion"],
  "mode": "all",
  "stateStoreName": "japan-precious-metal-prices-state",
  "maxItems": 100
}
```

Everything: `{"productTypes": ["bullion", "coin", "purity_grade"]}` (about 37 rows).
Gold-only alert: `{"metals": ["gold"], "mode": "changes", "stateStoreName": "gold-watch"}`.

### Output example

```json
{
  "dealer": "tanaka",
  "dealerName": "田中貴金属工業",
  "dealerNameEn": "Tanaka Kikinzoku Kogyo",
  "dealerType": "refiner_and_bullion_dealer",
  "metal": "gold",
  "productType": "bullion",
  "productCode": "gold_bullion",
  "productNameEn": "Gold bullion bar (dealer's price per gram)",
  "productNameJa": "金",
  "fineness": null,
  "weightGrams": null,
  "currency": "JPY",
  "unit": "JPY/g",
  "taxIncluded": true,
  "retailPrice": 23741,
  "buyPrice": 23192,
  "buyPriceWithoutPremium": null,
  "retailPriceStatus": "published",
  "buyPriceStatus": "published",
  "spread": 549,
  "spreadPct": 2.31,
  "retailChangePublished": 636,
  "buyChangePublished": 444,
  "publishedAt": "2026-10-09T17:00:00+09:00",
  "publishedAtText": "2026年10月09日 17:00公表(日本時間)",
  "priceDate": "2026-10-09",
  "publishedToday": false,
  "hoursSincePublished": 28.85,
  "notes": ["fees_extra"],
  "sourceUrl": "https://gold.tanaka.co.jp/commodity/souba/",
  "scrapedAt": "2026-10-10T12:51:05.677Z",
  "buyRankAmongDealers": 1,
  "retailRankAmongDealers": 2,
  "dealersCompared": 3,
  "previousRetailPrice": null,
  "previousBuyPrice": null,
  "previousPublishedAt": null,
  "retailChangeSinceLastRun": null,
  "retailChangePctSinceLastRun": null,
  "buyChangeSinceLastRun": null,
  "buyChangePctSinceLastRun": null,
  "changeType": "new",
  "changeBasis": "first-run-baseline"
}
```

A Gold Plaza karat-grade row has `dealer: "goldplaza"`, `productType: "purity_grade"`, `productCode: "gold_k18"`, `fineness: 0.75`, `retailPrice: null`, `retailPriceStatus: "not_offered"`, `buyPrice: 16982`, `buyChangePublished: 200`, `taxIncluded: null`. A Tanaka coin row has `productCode: "platinum_coin_1oz"`, `unit: "JPY/coin"`, `weightGrams: 31.1035`, `retailPrice: 330961`, `buyPrice: 290875` and `buyPriceWithoutPremium: 274433`.

**Field notes**

- `changeType` is `new` for every row on the first run with a given `stateStoreName` (`changeBasis: "first-run-baseline"`). Later runs compare with the previous run: `up` / `down` when every price that moved moved that way, `mixed` when retail and buy moved in opposite directions, `unchanged` when nothing moved (a re-publication with the same numbers is `unchanged`).
- `retailChangePublished` / `buyChangePublished` are the dealer's own numbers; each dealer picks its own comparison point. Gold Plaza's ingot and karat-grade day-on-day changes are produced by its page script from an internal data feed that this Actor does not call, so they are `null` (the Actor's own `retailChangeSinceLastRun` / `buyChangeSinceLastRun` and `changeType` still track changes between runs).
- Ranks compare each dealer's **latest** price for the same `productCode` in this run. Dealers publish at different times, so a rank is not a same-moment comparison.
- `notes` codes: `fees_extra` (Tanaka: purchase/sale fees are not included in the bar price), `retail_account_only` (Tanaka sells silver only inside its online account), `own_brand_bars` (Nihon Material: prices apply to its own bars), `buy_only` (Gold Plaza publishes buy prices only), `fees_deducted` (Gold Plaza: fees are deducted from the quoted price), `change_derived_by_dealer` (see above).
- `taxIncluded` is `true` where the page labels the price tax-inclusive (税込). Gold Plaza does not label its karat-grade table, so those rows have `null`.
- `fineness` is filled only for grade labels (K18, Pt900, SV925 …); bar and coin pages do not print it.
- The Actor returns numbers, dates, short product labels and the source URL only — no text, images or page design from the dealers' sites.

#### Product codes

| `productCode` | Dealers | Unit |
|---|---|---|
| `gold_bullion`, `platinum_bullion`, `silver_bullion` | tanaka, nihon-material, goldplaza | JPY/g |
| `palladium_bullion` | nihon-material | JPY/g |
| `gold_coin_1oz`, `gold_coin_half_oz`, `gold_coin_quarter_oz`, `gold_coin_tenth_oz` | tanaka | JPY/coin |
| `platinum_coin_1oz`, `platinum_coin_half_oz`, `platinum_coin_quarter_oz`, `platinum_coin_tenth_oz` | tanaka | JPY/coin |
| `gold_k24`, `gold_k22`, `gold_k21_6`, `gold_k20`, `gold_k18`, `gold_k14`, `gold_k12`, `gold_k10`, `gold_k9`, `gold_k8`, `gold_k5`, `gold_k18wg`, `gold_k14wg` | goldplaza | JPY/g |
| `platinum_pt1000`, `platinum_pt950`, `platinum_pt900`, `platinum_pt850` | goldplaza | JPY/g |
| `silver_sv1000`, `silver_sv925` | goldplaza | JPY/g |

### How much does it cost?

Pay-per-event: a tiny start charge of $0.00005 (Apify's default Actor Start event, charged once per GB of memory; this Actor runs on 1 GB) plus a per-row price:

| Event | What it is | Price |
|---|---|---|
| Actor Start (`apify-actor-start`) | Once per run (per GB of memory) | $0.00005 |
| Result (`apify-default-dataset-item`) | Each price row returned | $0.003 (FREE and BRONZE plans) · $0.002 (SILVER and above) |

The default run (10 bar-price rows) costs $0.03 on the FREE plan and $0.02 on SILVER. Every product type (about 37 rows) costs about $0.11 on FREE and $0.07 on SILVER. In `mode: "changes"` you pay only for rows that moved; on weekends and holidays that is usually none. Use `maxItems` to cap spend.

### Integrations: API, MCP, and AI agents

This Actor is **read-only**: it only reads public price pages, never logs in, submits forms or changes anything on any website. It is safe for AI agents to call autonomously.

#### API (curl)

```bash
curl -X POST "https://api.apify.com/v2/acts/datalab-jp~japan-precious-metal-prices/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" -d '{"dealers": ["tanaka", "nihon-material", "goldplaza"], "productTypes": ["bullion"], "maxItems": 100}'
```

#### Python

```python
from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("datalab-jp/japan-precious-metal-prices").call(run_input={"dealers": ["tanaka", "nihon-material", "goldplaza"], "productTypes": ["bullion"], "maxItems": 100})
items = client.dataset(run["defaultDatasetId"]).list_items().items
```

#### JavaScript

```javascript
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('datalab-jp/japan-precious-metal-prices').call({ dealers: ['tanaka', 'nihon-material', 'goldplaza'], productTypes: ['bullion'], maxItems: 100 });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

The synchronous `run-sync-get-dataset-items` endpoint waits up to 300 seconds; a run normally finishes in under 15 seconds.

#### Use with AI agents (MCP)

Through the [Apify MCP server](https://mcp.apify.com), an agent (Claude, ChatGPT, Cursor, LangChain…) can discover and call this Actor with natural-language intent such as "What is Tanaka's gold buy price per gram today?". Useful arguments: `metals` (e.g. `["gold"]`), `productTypes` (`["bullion", "coin", "purity_grade"]`) and `dealers`. Every row states its unit, tax treatment and `publishedAt`, so the agent can tell a weekend price from today's.

### Related Actors

Other Japan data Actors by the same developer:

- [**Japan Scrap Metal Prices – Steel & Non-Ferrous**](https://apify.com/datalab-jp/japan-scrap-metal-prices) — scrap steel and non-ferrous buying prices from Japanese dealers
- [**Japan Trade Show Exhibitor List – JIMTOF, CEATEC**](https://apify.com/datalab-jp/japan-trade-show-exhibitors) — exhibitor lists of Japanese trade shows (company-level data)
- [**Japan Tax Auction Real Estate – NTA Public Auction**](https://apify.com/datalab-jp/japan-nta-public-auction) — real estate from National Tax Agency public auctions
- [**Mercari Japan Scraper – Listings & Item Details**](https://apify.com/datalab-jp/mercari-japan-listings-scraper) — Mercari listings and sold prices

### FAQ

**Is scraping these price pages legal?**
The Actor reads only prices the companies publish openly for anyone, without logging in or bypassing access control, one page at a time. Before adding a dealer we read its robots.txt and site terms (2026-10-10). Dealers whose terms prohibit reproducing or using the information on their sites were left out. Only factual price data (numbers, dates, short product labels) and the source URL are returned. You are responsible for using the data in line with applicable law and the dealers' terms.

**Can I use it through the API?**
Yes — see the curl, Python and JavaScript examples above. Results can also be exported as JSON, CSV, Excel or sent to webhooks, Google Sheets, Slack and more via Apify integrations.

**Can AI agents use this Actor?**
Yes. It is read-only and returns explicit units, tax treatment and publication times; see *Use with AI agents (MCP)* above.

**Why is a particular dealer missing?**
Only dealers whose published terms do not restrict reusing their price pages are included. Dealers whose terms limit the use or reproduction of site content are left out, and no dealer is added without reading its terms first.

**Why does the price not change on Saturday?**
Japanese dealers publish on business days only. The Actor returns the last published price with its `publishedAt` and `publishedToday: false`.

**How does change tracking work?**
The Actor stores the last prices in a named key-value store in your Apify account (`stateStoreName`). Each run compares with it and updates it. Use a different name per scheduled task if tasks use different filters. If the output is cut by `maxItems` or a spending limit, the store is not updated, so you will not miss a change.

**Why did I get 0 rows?**
Check `RUN_REPORT` in the run's key-value store: it gives each dealer's status and a plain-language hint. Common causes: a combination no dealer publishes (e.g. `dealers: ["tanaka"]` with `metals: ["palladium"]`), or `mode: "changes"` when no published price moved.

**Do I need a proxy?**
No. The Actor connects directly by default. On 2026-10-10 Tanaka's page answered from the Apify platform both directly and through the datacenter proxy; the other two pages were checked from a Japanese connection. If a site ever blocks direct access, enable Apify Proxy; with no group chosen the Actor uses Japan-based residential IPs.

### Disclaimer

Prices are copied from public price pages of the companies named above and provided as-is for information only. They are not offers to buy or sell and not investment advice; actual transaction prices, fees and availability are set by each dealer at the time of the transaction. This Actor is not affiliated with or endorsed by any of these companies.

***

**中文摘要（简体）**
本 Actor 汇总日本多家贵金属商公布的黄金、铂金、钯金、白银每克零售价与回购价（日元，含税标注），并给出买卖价差、商家公布的日涨跌、发布时间以及与上次运行相比的变化。
可选加入田中贵金属的金币/铂金币价格和 K18、Pt900、SV925 等成色回购价；周末及日本节假日返回最近一个营业日的价格并注明发布时间。
只读、无需编程，可通过 API 或 MCP 供 AI 代理调用；数据仅供参考，不构成投资建议。

# Actor input Schema

## `dealers` (type: `array`):

Which Japanese dealers' published price pages to read, e.g. \['tanaka'] for Tanaka Kikinzoku only or \['tanaka', 'nihon-material'] for the two bullion dealers. Pick any of: tanaka (gold, platinum, silver; bars and coins), nihon-material (gold, platinum, palladium, silver bars), goldplaza (buyer: ingot and karat-grade buy prices only). Defaults to all three when omitted. Each dealer publishes on business days on its own schedule; publishedAt shows when each price was published.

## `metals` (type: `array`):

Keep only these metals, e.g. \['gold'] or \['platinum', 'palladium']. Allowed: gold, platinum, palladium, silver. Leave empty (default) to keep all four. Palladium is published only by nihon-material, so \['palladium'] with dealers=\['tanaka'] returns nothing (the run log explains why).

## `productTypes` (type: `array`):

Which products to return, e.g. \['bullion'] for bar prices per gram or \['bullion', 'coin', 'purity_grade'] for everything. Values: bullion (bar price per gram, all dealers), coin (Tanaka's bullion-coin prices per coin: Vienna Philharmonic / Maple Leaf / Eagle, 1 to 1/10 oz), purity_grade (Gold Plaza's buy prices per gram for K24…K5, Pt1000…Pt850, SV1000/SV925). Defaults to \['bullion'] (about 10 rows). Combined with metals, a row must match both.

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

What to return: 'all' (the full table every run, each row annotated with the change vs the previous run) or 'changes' (only rows that are new or whose retail or buy price moved since the previous run, for alerts). Defaults to 'all'. In 'changes' mode the very first run returns everything as a baseline. Previous prices are kept in the named key-value store given in stateStoreName.

## `stateStoreName` (type: `string`):

Name of the key-value store in your Apify account that remembers the previous prices, e.g. 'japan-precious-metal-prices-state' or 'gold-watch'. Use letters, digits and '-' only (max 63). Defaults to 'japan-precious-metal-prices-state'. Use a separate name per scheduled task with different filters, otherwise products entering or leaving the filter show up as new.

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

Maximum number of rows returned in this run, e.g. 20 for bullion only or 100 for every product. Each row is one billable result, so this is your cost cap. Defaults to 100; a run with every dealer and every product type is about 37 rows. If the cap cuts the output, change tracking is not advanced, so the next run still reports the changes.

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

Apify Proxy settings. By default the Actor connects directly (no proxy). On 2026-10-10 Tanaka's price page answered HTTP 200 from the Apify platform both directly and via the datacenter proxy; the Nihon Material and Gold Plaza pages answered 200 from a Japanese connection. If a site ever blocks direct access, enable Apify Proxy here; with no group chosen the Actor uses Japan-based residential IPs (RESIDENTIAL, JP), billed per GB.

## Actor input object example

```json
{
  "dealers": [
    "tanaka",
    "nihon-material",
    "goldplaza"
  ],
  "metals": [],
  "productTypes": [
    "bullion"
  ],
  "mode": "all",
  "stateStoreName": "japan-precious-metal-prices-state",
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `prices` (type: `string`):

All price rows as dataset items: dealer, metal, product code and English name, retail price, buy price, spread, unit (JPY/g or JPY/coin), publication time, dealer-published change, change since the previous run and cross-dealer rank (see dataset schema).

## `runReport` (type: `string`):

Per-dealer status (ok, empty, failed), publication time per dealer, a per-metal bullion comparison (lowest retail, highest buy, each dealer's spread), change-tracking counts (new/up/down/mixed/unchanged) and plain-language hints when nothing was returned.

# 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 = {
    "dealers": [
        "tanaka",
        "nihon-material",
        "goldplaza"
    ],
    "metals": [],
    "productTypes": [
        "bullion"
    ],
    "mode": "all",
    "stateStoreName": "japan-precious-metal-prices-state",
    "maxItems": 100,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("datalab-jp/japan-precious-metal-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 = {
    "dealers": [
        "tanaka",
        "nihon-material",
        "goldplaza",
    ],
    "metals": [],
    "productTypes": ["bullion"],
    "mode": "all",
    "stateStoreName": "japan-precious-metal-prices-state",
    "maxItems": 100,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("datalab-jp/japan-precious-metal-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 '{
  "dealers": [
    "tanaka",
    "nihon-material",
    "goldplaza"
  ],
  "metals": [],
  "productTypes": [
    "bullion"
  ],
  "mode": "all",
  "stateStoreName": "japan-precious-metal-prices-state",
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call datalab-jp/japan-precious-metal-prices --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,datalab-jp/japan-precious-metal-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/3BihGurBwQqFhKDks/builds/9vIweCmo2TfXOBDhv/openapi.json
