# Japan Resale Price Check – Mercari & Yahoo Sold Prices (`datalab-jp/japan-resale-price-check`) Actor

What does it sell for in Japan? One row per keyword and marketplace with median, quartiles, sample size, days-to-sell and USD from recent sold listings on Mercari, Yahoo! Auctions and Yahoo! Flea Market. Optional asking-price rows, condition and price filters, exclude keywords. Read-only, MCP-ready.

- **URL**: https://apify.com/datalab-jp/japan-resale-price-check.md
- **Developed by:** [Task Data](https://apify.com/datalab-jp) (community)
- **Categories:** E-commerce, Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$20.00 / 1,000 price summaries

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/running/actors-in-store.md#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

## Japan Resale Price Check – Mercari & Yahoo Sold Prices

Ask **"what does this sell for in Japan?"** and get **one row per marketplace** with the answer: median, quartiles, sample size, days-to-sell and a USD conversion — computed from **recent sold listings on Mercari, Yahoo! Auctions and Yahoo! Flea Market**. Pass one keyword or a list of hundreds, optionally add asking-price rows to see the gap between what sellers ask and what buyers pay, and narrow the sample by condition, price band or exclude keywords. Built for resellers, proxy-buying (代購) services, price researchers and AI agents that need a number, not a list. No coding required.

### What data can you extract?

Every row is one **keyword × marketplace × price type**. No individual listings are returned — use the sibling listing Actors named in `listingsActor` for that.

| Field | Description |
|-------|-------------|
| `keyword`, `keywordUsed`, `keywordMapped` | What you asked, what was searched, whether a Japanese alias was applied |
| `marketplace`, `priceType` | `mercari` / `yahoo_auctions` / `yahoo_fleamarket`; `sold` (completed sales) or `asking` (current listings) |
| `fetchStatus`, `lowSample`, `priceDispersionHigh`, `hint` | `ok`, `partial`, `no_matches`, `no_valid_prices`, `blocked_suspected`, `request_failed`; warnings; plain-language note |
| `n`, `requestedSampleSize`, `sampleComplete`, `stopReason`, `pagesFetched` | How many priced listings were used, and how the sample was gathered |
| `sampleOrder`, `sampleTimeField`, `sampleNewestAt`, `sampleOldestAt` | In what order the marketplace returned the sample and the time window it covers |
| `totalAvailable`, `totalRelation` | Matches the marketplace reported for the query; `capped` when Mercari stops counting at 15,000 |
| `scanned`, `excludedInvalidPrice`, `excludedNoBid`, `excludedOtherMarket`, `excludedByFilter`, `duplicatesRemoved` | Where the rest of the scanned listings went |
| `priceMinJpy`, `p25Jpy`, `medianJpy`, `p75Jpy`, `priceMaxJpy`, `meanJpy`, `iqrJpy`, `spreadRatio`, `outlierShare` | Price statistics in yen (R type-7 quantiles) |
| `medianUsd`, `p25Usd`, `p75Usd`, `fxRate`, `fxDate`, `fxSource`, `fxStatus`, `fxBase`, `fxQuote`, `fxFetchedAt` | USD conversion and exactly which rate produced it |
| `medianDaysToSell`, `daysToSellN`, `daysToSellBasis` | Yahoo! Flea Market only: median days from listing to sale |
| `medianListingDays`, `listingDaysN` | Yahoo! Auctions only: median auction duration of the sold sample |
| `shippingIncludedShare`, `shippingKnownN` | Share of the sample with seller-paid **domestic** shipping |
| `conditionNewShare` … `conditionUnknownShare` | Condition mix of the sample on a common five-step scale |
| `bidCountMedian` | Yahoo! Auctions only |
| `listingsActor`, `chargeStatus`, `checkedAt` | Where to get the underlying listings; billing note; timestamp |

### Why use it?

- **Pricing before you buy or list** — a median and quartiles beat eyeballing a page of listings, and three marketplaces side by side show where an item is cheap to source and where it sells high.
- **Ask vs. sold** — `includeAsking: true` adds the asking-price row so you can see how far current sellers sit above what actually closes.
- **Bulk pricing** — pass a list of dozens of model numbers and get a spreadsheet back; each row is one cheap event, not hundreds of listing results.
- **Time-to-sell** — Yahoo! Flea Market rows carry the median days from listing to sale, a liquidity signal the price alone does not give.
- **AI agents / MCP** — one row is exactly what an agent needs to answer a price question; this Actor is discoverable and callable through the [Apify MCP server](https://mcp.apify.com/).

### How to use it (no coding)

1. Click **Start** (or **Try for free**).
2. Enter one or more **Keywords** — Japanese product names match best, e.g. `ポケモンカード 151`, `MG ガンダム`, `iPhone 15 Pro 256GB`.
3. Optionally pick **Marketplaces** and a **Sample size** (default 200 recent sales per marketplace).
4. Open **Advanced** to add asking-price rows, exclude words like `まとめ売り` or `BOX`, set a price band or condition filter, or pin the exchange rate.
5. Click **Start** and read the table, or download CSV / JSON. A per-query report is saved as `SEARCH_REPORT`.

### Input example

```json
{
  "keywords": ["ポケモンカード 151", "MG ガンダム"],
  "marketplaces": ["mercari", "yahoo_auctions", "yahoo_fleamarket"],
  "sampleSize": 200,
  "includeAsking": true,
  "excludeKeywords": ["まとめ売り", "BOX"],
  "conditionFilter": ["new", "like_new"]
}
```

All fields are optional. Running with no input prices `ポケモンカード 151` on all three marketplaces.

### Output example

Measured on 2026-09-09 for `ポケモンカード 151` (no filters):

| marketplace | n | medianJpy | p25Jpy | p75Jpy | medianUsd | medianDaysToSell | medianListingDays | priceDispersionHigh |
|---|---|---|---|---|---|---|---|---|
| mercari | 200 | 3,050 | 1,780 | 14,850 | 19.77 | — | — | true |
| yahoo\_fleamarket | 200 | 6,000 | 1,388 | 19,250 | 38.89 | 1.51 | — | true |
| yahoo\_auctions | 200 | 7,750 | 2,042 | 19,125 | 50.22 | — | 5.27 | true |

`priceDispersionHigh` is true for all three: "ポケモンカード 151" covers single cards, packs and boxes, so the quartiles span 1,400–19,000 yen. Add `excludeKeywords: ["BOX", "パック"]` or a tighter keyword to price one product. One row as JSON:

```json
{
  "keyword": "ポケモンカード 151",
  "keywordUsed": "ポケモンカード 151",
  "keywordMapped": false,
  "marketplace": "yahoo_fleamarket",
  "priceType": "sold",
  "fetchStatus": "ok",
  "lowSample": false,
  "priceDispersionHigh": true,
  "hint": "Prices are widely spread (IQR > 1.5 × median). The keyword may cover different products, sets or conditions — check the listings before relying on the median.",
  "n": 200,
  "requestedSampleSize": 200,
  "sampleOrder": "end_time_desc (API default for sold)",
  "sampleTimeField": "endedAt",
  "sampleNewestAt": "2026-09-09T10:36:43.000Z",
  "sampleOldestAt": "2026-09-08T02:11:40.000Z",
  "sampleComplete": true,
  "stopReason": "sample_size",
  "pagesFetched": 2,
  "totalAvailable": 2406,
  "totalRelation": "exact",
  "scanned": 200,
  "excludedInvalidPrice": 0,
  "excludedNoBid": 0,
  "excludedOtherMarket": 0,
  "excludedByFilter": 0,
  "duplicatesRemoved": 0,
  "priceMinJpy": 300,
  "p25Jpy": 1388,
  "medianJpy": 6000,
  "p75Jpy": 19250,
  "priceMaxJpy": 128000,
  "meanJpy": 12410,
  "iqrJpy": 17862,
  "spreadRatio": 13.87,
  "outlierShare": 0.08,
  "medianUsd": 38.89,
  "p25Usd": 9.0,
  "p75Usd": 124.76,
  "fxBase": "USD",
  "fxQuote": "JPY",
  "fxRate": 154.3,
  "fxDate": "2026-09-08",
  "fxFetchedAt": "2026-09-09T10:36:40.000Z",
  "fxSource": "frankfurter.dev (ECB reference rate)",
  "fxStatus": "fetched",
  "medianDaysToSell": 1.51,
  "daysToSellN": 200,
  "daysToSellBasis": "endTime − openTime of sold flea-market listings",
  "medianListingDays": null,
  "listingDaysN": 0,
  "shippingIncludedShare": 1,
  "shippingKnownN": 200,
  "conditionNewShare": 0.31,
  "conditionLikeNewShare": 0.42,
  "conditionGoodShare": 0.2,
  "conditionFairShare": 0.05,
  "conditionPoorShare": 0.02,
  "conditionUnknownShare": 0,
  "bidCountMedian": null,
  "listingsActor": "datalab-jp/yahoo-auctions-flea-market-scraper",
  "chargeStatus": "charged",
  "checkedAt": "2026-09-09T10:36:44.000Z"
}
```

### How the statistics are computed

- **Sample.** For each keyword and marketplace the Actor reads sold listings from the marketplace's own JSON search endpoint until `sampleSize` priced listings are collected (or results run out). Yahoo! Flea Market and Yahoo! Auctions return sold listings **newest-ended first**, so their samples are the most recent sales; Mercari's sold search is not strictly chronological — `sampleOrder` and the `sampleNewestAt` / `sampleOldestAt` window tell you exactly what was used. Samples are never pooled across marketplaces.
- **What counts as sold.** Mercari: status sold-out. Yahoo! Flea Market: status SOLD. Yahoo! Auctions: closed auctions with **at least one bid** (bid-less closed auctions go to `excludedNoBid`). Flea-market items that the Yahoo! Auctions API also returns are left out of the auctions row (`excludedOtherMarket`) so nothing is counted twice.
- **`n`** = listings with a positive numeric price after exclude keywords, price band, condition filter and de-duplication. Prices are the figures the marketplace shows for the listing, not settled payment amounts.
- **Quantiles** use R's type-7 definition (linear interpolation): `h = (n − 1)·p`, `Q(p) = (1 − g)·x[⌊h⌋] + g·x[⌊h⌋ + 1]`. `iqrJpy = p75 − p25`; `spreadRatio = p75 / p25` (null when p25 ≤ 0); `outlierShare` is the share outside `[p25 − 1.5·IQR, p75 + 1.5·IQR]`. P25–P75 is the middle half of the sample — not a confidence interval and not a guaranteed range for the next sale.
- **`priceDispersionHigh`** is `iqr > 1.5 × median`. It flags a wide spread; it does not prove the keyword mixes products (a single product in varying condition can also spread).
- **Days to sell** is reported only where both timestamps are known and mean what the name says: Yahoo! Flea Market `endTime − openTime` (`medianDaysToSell`), Yahoo! Auctions `endTime − startTime` (`medianListingDays`, the auction duration). Mercari has no reliable sale timestamp, so no figure is given rather than a guess.
- **USD** = JPY ÷ `fxRate`, where `fxRate` is yen per US dollar from your `usdJpyRate` input or the ECB reference rate via frankfurter.dev (previous business day, `fxDate`). If neither is available the USD columns are null and `fxStatus` says why; yen statistics are unaffected.
- **Low sample.** `lowSample` is true when `0 < n < 20`. Treat those medians as indicative only.

### Data guarantees

- **Zero results cost nothing.** A keyword with no sold listings still gets a row (`n: 0`, `fetchStatus: no_matches`, a `hint`) but no `price-summary` charge. Partial fetches (`fetchStatus: partial`) are not charged either.
- **Every number is traceable.** The row states the sample order, time window, exclusions, total available and the FX rate used.
- **Hard cost caps.** `maxKeywords` and `maxSummaryRows` bound the run; each billable row is one event regardless of `sampleSize`.
- **Japanese labels and machine codes** wherever a label appears in the sibling listing Actors, so results join cleanly.

### Scheduling & automation

Run a keyword list daily or weekly to build a price history — append the rows to a sheet or database keyed on `keyword + marketplace + priceType + checkedAt`. Connect a run-finished webhook to Slack, Discord, Zapier or Make from the Actor's *Integrations* tab. The *Examples* tab has ready-made tasks (three-market check, ask vs. sold, bulk keyword list).

### Performance

Each row needs 2–5 API requests (200 sales at 100–120 per page). Measured locally on 2026-09-09: 3 rows in about 1 second, 12 rows in about 2 seconds, with three queries in flight.

### How much does it cost?

Pay-per-event, no start fee:

| Event | What it is | Price |
|---|---|---|
| Price summary (`price-summary`) | Each statistics row with `n > 0` and a complete fetch | $0.02 |

Ten keywords across three marketplaces, sold prices only, cost $0.60. Adding asking prices doubles the rows. Rows with `n = 0` or a partial fetch are free. Use `maxSummaryRows` to cap spend.

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

This Actor is **read-only**: it reads publicly visible listing data, performs no login, bid, purchase or write action, and is safe for autonomous agents to call.

#### API (curl)

```bash
curl -X POST "https://api.apify.com/v2/acts/datalab-jp~japan-resale-price-check/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"keywords": ["ポケモンカード 151"], "sampleSize": 200}'
```

#### Python (apify-client)

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("datalab-jp/japan-resale-price-check").call(run_input={
    "keywords": ["ポケモンカード 151", "MG ガンダム"],
    "includeAsking": True,
})
rows = client.dataset(run["defaultDatasetId"]).list_items().items
```

#### JavaScript (apify-client)

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

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('datalab-jp/japan-resale-price-check').call({ keywords: ['ポケモンカード 151'] });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

#### Use with AI agents (MCP)

Discoverable through the [Apify MCP server](https://mcp.apify.com/) (`search-actors` "Japan resale price", "Mercari sold prices") and eligible for agentic payments. Reading a row: quote `medianJpy` (and `medianUsd`) with `n`; if `priceDispersionHigh` is true, say the keyword is broad and suggest a tighter one or exclude words; if `lowSample` is true, say the figure is indicative; if `fetchStatus` is `no_matches`, relay the `hint`. To show the actual listings, call the Actor named in `listingsActor`.

### Trust & maintenance

- Exercised by an automated weekly health check (real queries on all three marketplaces, `n > 0`) in addition to Apify's daily Store test.
- Marketplace endpoints change from time to time. Breakages reported on the **Issues** tab are answered within two business days, and fixes ship as new builds without changing the input contract.
- The Actor never returns a fabricated result: when a marketplace answers with an error or an unexpected body, the row says `blocked_suspected` or `request_failed` and is not charged.

### Related Actors

- **Mercari Japan Scraper – Listings & Item Details** — the individual Mercari listings behind the `mercari` row
- **Yahoo Auctions Japan Scraper – Live, Sold & Flea Market** — the individual Yahoo listings behind the `yahoo_auctions` and `yahoo_fleamarket` rows
- **Yahoo! Auctions Sold Scraper**, **Japan Flea Market Scraper**, **Suruga-ya**, **CardRush TCG**, **Melonbooks**, **Diskunion** — the rest of our Japanese resale family

### FAQ

**Why are the three medians so different?**
They are different markets: Yahoo! Auctions prices are final bids on auctions, Mercari and Yahoo! Flea Market are fixed prices, and buyer demographics differ. That difference is the information — read the rows side by side rather than averaging them.

**Why is Mercari's sample window months long while Yahoo's is a day?**
Mercari's sold search is not ordered by sale time, so the 200 listings can span months; `sampleOldestAt` tells you. Yahoo returns newest-ended first. For a strictly recent Mercari price, use a narrower keyword so fewer, fresher listings match.

**Can I get the listings behind a number?**
Yes — run the Actor named in `listingsActor` with the same keyword and `status: ["sold_out"]`. This Actor deliberately returns only statistics.

**Is a low median for "iPhone 15 Pro" right?**
Probably not what you meant: on a broad keyword, cases and cables outnumber phones, and `priceDispersionHigh` will be true. Add `priceMin` or exclude words (`ケース`, `フィルム`) or include the storage size.

**Is this legal?**
The Actor reads only publicly visible listing data through the JSON endpoints each marketplace's own web pages use, without logging in, at bounded request rates, and stores no per-listing data — only aggregates. You are responsible for using the results in accordance with applicable laws and each marketplace's terms.

### Compliance & ethics

Read-only; publicly visible listing data only; no login, bid, purchase or write action; bounded request volume (100–120 listings per request, three queries in parallel, retries with back-off). Output is aggregate statistics; no seller or buyer identities are stored.

# Actor input Schema

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

Products to price, one per entry, e.g. \['ポケモンカード 151', 'MG ガンダム', 'iPhone 15 Pro 256GB']. Japanese product names match best; each keyword produces one row per selected marketplace (and per price type). If omitted, a health-check for 'ポケモンカード 151' runs. Up to `maxKeywords` entries are processed. A zero-result keyword returns a row with n = 0, a hint, and no charge.

## `marketplaces` (type: `array`):

Which marketplaces to summarise, e.g. \['mercari'] for a single market. Defaults to all three. Each marketplace is a separate row — sold prices are not pooled across markets because auction and fixed-price levels differ. Yahoo! Auctions sold rows count only closed auctions with at least one bid; flea-market items surfaced by the auctions API are excluded from the auctions row.

## `sampleSize` (type: `integer`):

How many sold listings to collect per keyword and marketplace before computing statistics, e.g. 100 for a quick check or 500 for a stable median. Defaults to 200; accepts 50–500. Yahoo! Flea Market and Yahoo! Auctions samples are the most recently ended sales; Mercari's search order is not strictly chronological (reported in `sampleOrder`). Larger samples cost more requests but the same price.

## `includeAsking` (type: `boolean`):

When true, a second row per keyword and marketplace summarises listings currently for sale (`priceType: asking`) next to the sold row, so you can see the gap between what sellers ask and what buyers pay. Defaults to false (sold prices only). Asking rows are billed like sold rows. For auctions the asking price is the current bid or buy-now price as Yahoo indexes it.

## `excludeKeywords` (type: `array`):

Words that must not appear in a listing title, e.g. \['まとめ売り', 'ジャンク', 'BOX'] to keep bulk lots and boxes out of a single-card price. Sent to each marketplace's search as an exclusion and enforced again on returned titles (case-insensitive substring). Leave empty to exclude nothing. Excluded listings are counted in `excludedByFilter`, not in `n`.

## `priceMin` (type: `integer`):

Drop listings priced below this many yen before computing statistics, e.g. 500 to remove obvious mis-listings and accessories. Note this makes the result a conditional distribution — the median is the median of listings within your band. Leave empty for no minimum; must not exceed `priceMax`.

## `priceMax` (type: `integer`):

Drop listings priced above this many yen before computing statistics, e.g. 100000 to remove bundles. Same caveat as `priceMin`: the result becomes the distribution within your band. Leave empty for no maximum.

## `conditionFilter` (type: `array`):

Restrict the sample to these condition grades on a common five-step scale, e.g. \['new', 'like\_new'] for a near-mint price. Mapped to each marketplace's own codes (Mercari 1–6, Yahoo NEW/USED10–60). Leave empty to include all conditions; the condition mix of the sample is always returned as `condition…Share` columns.

## `maxKeywords` (type: `integer`):

Upper bound on how many keywords are processed, e.g. 20 for a bounded scheduled job. Defaults to 50; accepts 1–500. Extra keywords are skipped with a log warning. Combine with `maxSummaryRows` to cap cost: rows = keywords × marketplaces × price types.

## `maxSummaryRows` (type: `integer`):

Hard cap on statistics rows produced by the run (each billable row is one keyword × marketplace × price type), e.g. 30 for 10 keywords across three markets. Defaults to 150; accepts 1–5000. Once reached, remaining queries are recorded as skipped\_limit in SEARCH\_REPORT and not fetched.

## `autoRetryKeywordMapping` (type: `boolean`):

When true (default), a keyword that returns zero listings and appears in a small verified alias table (e.g. 宝可梦 → ポケモン, 高达 → ガンダム) is retried once with its Japanese equivalent; `keywordUsed` shows the term actually searched and `keywordMapped` is true. The original keyword is always tried first. Set false to get the plain zero-result row with a hint.

## `usdJpyRate` (type: `string`):

Optional exchange rate in yen per US dollar, e.g. '154.3', used for the USD columns. When empty the Actor fetches the ECB reference rate from frankfurter.dev at run start (previous business day); if that fails, USD columns are null and `fxStatus` says why. JPY statistics never depend on this.

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

Apify Proxy settings. By default the Actor connects directly from the Apify platform — on 2026-09-09 all three marketplace endpoints answered direct requests without errors. Enable Apify Proxy here if direct access is ever blocked; the same setting applies to all three marketplaces.

## Actor input object example

```json
{
  "keywords": [
    "ポケモンカード 151"
  ],
  "marketplaces": [
    "mercari",
    "yahoo_auctions",
    "yahoo_fleamarket"
  ],
  "sampleSize": 200,
  "includeAsking": false,
  "excludeKeywords": [],
  "conditionFilter": [],
  "maxKeywords": 50,
  "maxSummaryRows": 150,
  "autoRetryKeywordMapping": true,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `priceSummaries` (type: `string`):

Statistics rows (median, quartiles, sample size, days-to-sell, USD) as dataset items.

## `searchReport` (type: `string`):

Per keyword × marketplace fetch status, sample basis, exclusions and hints.

# 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": [
        "ポケモンカード 151"
    ],
    "marketplaces": [
        "mercari",
        "yahoo_auctions",
        "yahoo_fleamarket"
    ],
    "sampleSize": 200,
    "includeAsking": false,
    "excludeKeywords": [],
    "conditionFilter": [],
    "maxKeywords": 50,
    "maxSummaryRows": 150,
    "autoRetryKeywordMapping": true,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("datalab-jp/japan-resale-price-check").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": ["ポケモンカード 151"],
    "marketplaces": [
        "mercari",
        "yahoo_auctions",
        "yahoo_fleamarket",
    ],
    "sampleSize": 200,
    "includeAsking": False,
    "excludeKeywords": [],
    "conditionFilter": [],
    "maxKeywords": 50,
    "maxSummaryRows": 150,
    "autoRetryKeywordMapping": True,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("datalab-jp/japan-resale-price-check").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 '{
  "keywords": [
    "ポケモンカード 151"
  ],
  "marketplaces": [
    "mercari",
    "yahoo_auctions",
    "yahoo_fleamarket"
  ],
  "sampleSize": 200,
  "includeAsking": false,
  "excludeKeywords": [],
  "conditionFilter": [],
  "maxKeywords": 50,
  "maxSummaryRows": 150,
  "autoRetryKeywordMapping": true,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call datalab-jp/japan-resale-price-check --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,datalab-jp/japan-resale-price-check"
        }
    }
}

```

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/FeMhm17Gfz2D2g37V/builds/ae5Ko7gRIAbaXfanK/openapi.json
