# 日本二手书店 BookOff 二手书·漫画·CD·游戏价格 — 二手价与库存 (`jpmarketdata/bookoff-market-cn`) Actor

输入关键词，查看二手书、漫画、CD、DVD、游戏在日本 BookOff（ブックオフ）官方网店卖多少钱。二手典型价与区间取自全部匹配商品；在售/售罄件数与相对定价的折扣取自 120 件抽样。每个关键词 $0.02，无结果不收费。BookOff Japan used prices per keyword. Unofficial.

- **URL**: https://apify.com/jpmarketdata/bookoff-market-cn.md
- **Developed by:** [h ichi](https://apify.com/jpmarketdata) (community)
- **Categories:** E-commerce, Lead generation, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 keyword market analyzeds

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

## 日本二手书店 BookOff 二手书·漫画·CD·游戏价格 — 二手价与库存

**它做什么：** 输入关键词，查看二手书、漫画、CD、DVD、游戏在日本 BookOff（ブックオフ）官方网店卖多少钱。

**你输入：** 一个或多个日文关键词，如 `ガンダム`；可选类别（书籍 / 漫画 / 杂志 / CD / DVD / 游戏）。

**你得到：** 二手典型价与区间（最低–最高、中间 50%），通常取自全部匹配商品；另有取自 120 件抽样（默认是最便宜的 120 件）的在售与售罄件数、相对日本定价的折扣、新品价、主要类别。可选：每件商品一行。

**价格：** 每个关键词 $0.02（列表里的每个关键词都会计费）；如需逐条明细，另加每条商品 $0.002（默认关闭）。无结果不收费。

**示例：** 输入 `ガンダム` → 4,893 件 · 二手典型价 ¥550（区间 ¥99–77,000）· 抽样的 120 件中 82% 已售罄 · 二手价约比定价低 78%。

**In English:** Type a keyword and get what used books, manga, CDs, DVDs and games cost on BookOff's official online store in Japan. You get typical used price and range usually read across all matching listings, plus in-stock vs sold-out counts, discount vs list price and new-copy price from a 120-listing sample.

> 非官方工具 / Unofficial — 与 BOOKOFF 无关联，仅读取公开网页。Not affiliated with BOOKOFF; reads public pages only.

### 中文说明

#### 这是给谁用的（Who this is for）

**日本二手书、二手漫画的采买是一门成熟的中文生意**——旧书商、漫画全套代购、CD/DVD/游戏选品、动漫周边转卖，全都要先回答同一个问题：这本书在日本的二手价到底是多少。而 **BookOff（ブックオフ）自己就开着中文版的门店与页面**，中文买家对这个招牌并不陌生：它是日本最大的二手连锁（800 多家实体店共用一个官方网店目录），涵盖书籍、漫画、杂志、CD、DVD 与游戏。

这个 Actor 直接返回**统计结果本身**，按关键词计价，约 8 秒完成，而不是让你自己去算逐条清单；而且二手价的区间通常取自**全部匹配商品**，不是首页的 120 件样本。

- **`usedPriceJpy` —— 最低价、中间 50% 区间、中位数与最高价。** 一个命中 4,893 件的关键词，给出的就是这 4,893 件真实的价格位置，只用 5 次请求，而不是从 120 件样本里估出来的。
- **`outOfStockRatioSampled`** —— BookOff 会把售罄商品**带着最后的价格**继续挂着，所以售罄占比是动销信号，售罄价是日本二手媒体里最接近公开「成交价」的东西。
- **`stockBreakdown`** —— 有货 / 库存紧张 / 仅剩 1 件 / 无货。
- **`discountVsListPricePct`** —— 二手价相对日本定价（定価）便宜多少。
- **`newPriceJpy`**、**`genreTop`**，以及按当前汇率的美元换算。
- 可选：每一件取样商品（标题、价格、成色、库存、定价、折扣、发售日、可店取标记、链接）。

无需登录、无需 API Key，运行之间不存储任何数据。

本 Actor 是英文版 [BookOff Japan Used Media](https://apify.com/jpmarketdata/bookoff-market-checker) 的**中文语言包**：抓取逻辑与统计口径完全相同，只有标题、商店说明、文档和输入项标签改写成中文。

#### 概览 Overview

每个关键词返回一条 `market_summary` 汇总记录，核心是**带口径标注的二手价格**（全部商品口径还是 120 件抽样，见下节），并附库存构成、售罄比例、折扣率、新品价格与品类构成。

#### 输入 Input

| 字段 | 示例 | 说明 |
|---|---|---|
| `keywords` | `["ガンダム"]` | 日文命中率最高——目录是日文的，英文关键词只能命中用拉丁字母印刷的标题（实测 2026-08-18：`Gundam` 498 件 / `ガンダム` 4,893 件）。每个关键词 $0.02 |
| `genreCode` | `"11"` | 可选：`12` 书籍 / `11` 漫画 / `13` 杂志 / `31` CD / `71` DVD 与蓝光 / `51` 游戏。留空 = 全部 |
| `maxItemsPerKeyword` | `120` | 用于计算库存/折扣/品类构成的读取件数（30–360，每页 120）。**不影响二手价格数字**；低于 120 时只限制返回的单件商品数 |
| `includeIndividualItems` | `false` | 开启后每一件取样商品输出一条记录（+$0.002/件） |
| `convertToUsd` | `true` | 按当前汇率附上美元统计 |

```json
{
    "keywords": ["ガンダム", "鬼滅の刃"],
    "genreCode": null,
    "maxItemsPerKeyword": 120,
    "includeIndividualItems": false,
    "convertToUsd": true
}
```

常用日文关键词对照：高达 = `ガンダム` / 鬼灭之刃 = `鬼滅の刃` / 海贼王 = `ワンピース` / 勇者斗恶龙 = `ドラゴンクエスト` / 米津玄师 = `米津玄師` / 画集 = `画集`。

#### 输出 Output

字段名保持英文，这是 API 接口。

*实测于 2026-07-25（BookOff 真实页面，关键词 ガンダム）；2026-08-18 复测时命中数仍为 4,893*

```json
{
  "type": "market_summary",
  "keyword": "ガンダム",
  "genre": null,
  "genreName": null,
  "totalListingsFound": 4893,
  "sampledListings": 120,
  "keywordStatus": "ok",
  "hint": null,
  "usedPriceJpy": {"min": 99, "q1": 330, "median": 550, "q3": 1375, "max": 77000, "count": 4893},
  "usedPriceJpyBasis": "population_quantiles",
  "newPriceJpy": {"min": 528, "q1": 660, "median": 990, "q3": 1650, "max": 6600, "count": 14},
  "stockBreakdown": {"inStock": 12, "lowStock": 6, "lastOne": 4, "outOfStock": 98},
  "outOfStockRatioSampled": 0.8167,
  "discountVsListPricePct": {"median": 78},
  "genreTop": [["コミック", 61], ["書籍", 34], ["DVD・ブルーレイ", 12]],
  "usedPriceUsd": {"min": 0.63, "q1": 2.11, "median": 3.52, "q3": 8.8, "max": 492.8},
  "exchangeRateJpyUsd": 0.0064,
  "checkedAt": "2026-07-25T09:00:00+00:00",
  "sourceUrl": "https://shopping.bookoff.co.jp/search/keyword/%E3%82%AC%E3%83%B3%E3%83%80%E3%83%A0?per-page=120&sort=50&p=1"
}
```

`q1` 与 `q3` 是中间 50% 的两端：一半的「ガンダム」商品价格落在 ¥330–¥1,375 之间。

开启 `includeIndividualItems: true` 后，每件商品额外一条记录（2026-08-18 实测，关键词 `ONE PIECE 105`）：

```json
{
  "type": "item",
  "keyword": "ガンダム",
  "id": "0019946797",
  "title": "ONE PIECE(巻百五) ジャンプC",
  "priceJpy": 220,
  "condition": "used",
  "stockStatus": "in_stock",
  "listPriceJpy": 528,
  "discountPct": 58,
  "releaseDate": "2023/03/03",
  "storePickup": true,
  "url": "https://shopping.bookoff.co.jp/used/0019946797"
}
```

#### 全部商品口径还是 120 件抽样 —— 每个数字都注明

每条记录都带 **`usedPriceJpyBasis`**，你永远不必猜这个数字是怎么来的：

| `usedPriceJpyBasis` | 含义 | 怎么得到的 | 什么时候出现 |
|---|---|---|---|
| **`exact`** | 对**全部命中商品**做的真实统计 | 整个结果集只有一页（≤120 件），全部读取——1 次请求 | 窄关键词 |
| **`population_quantiles`** | 最低价、中间 50% 区间、中位数与最高价取自**全部匹配商品，而不是抽样**，`count` = 全部命中数 | 按二手价从低到高排序，直接跳到该名次所在的那一页（例如 4,893 件中的第 1,224 / 2,447 / 3,670 件 = 第 11 / 21 / 31 页），再加一页从高到低取最高价——共 5 次请求 | 大多数关键词 |
| **`null`** | 什么都没找到，所以没有价格可描述（`keywordStatus: "not_found"`，不收费） | — | 零结果关键词 |
| **`sample`** | 只对读取到的那批商品做的普通统计，`count` = 读取件数 | 兜底。当页与页之间的价格不再稳定地由低到高，或多关键词运行触到时间预算时使用（此时同时置 `truncatedForTimeLimit: true`） | 少见 |

兜底本身就是重点：如果网店以后改了排序方式，本 Actor 会**停止自称全部商品口径**，把这一行标为 `sample`，而不是悄悄返回错误的数字。

**0 件的关键词也会返回一行**：所有价格字段为 null，`keywordStatus: "not_found"`，`usedPriceJpyBasis: null`（什么都没测到，就不自称任何口径），并附一行 `hint` 告诉你下一步该试什么——而且不收费。有命中的关键词是 `keywordStatus: "ok"`、`hint: null`。

`newPriceJpy`、`stockBreakdown`、`outOfStockRatioSampled`、`discountVsListPricePct` 与 `genreTop` **始终是样本口径**（样本量见 `sampledListings`）。在默认 `maxItemsPerKeyword: 120` 下，样本是最便宜的 120 件，所以库存构成要读成「这个市场的低价端」；把它调到 240/360，样本会自动利用本来就要读取的那几页散布到整个价格区间——**不增加请求，也不增加时间**。

#### 本 Actor 不做什么

- **不覆盖卡牌、手办与模型。** BookOff 官方网店根本没有 TCG / 玩具品类——只有书籍、漫画、杂志、CD、DVD 与蓝光、游戏。卡牌和手办请用万代书店（Mandarake）这类来源。
- **不做时间序列。** BookOff 是定价销售的二手零售商，价格是「挂牌价」；售罄商品的价格是「最后一次挂出的价格」，很接近实际卖出的价格，但它是商品主数据上的价格，不是逐笔成交记录，也不带成交日期。
- **不做英文到日文的翻译。** 目录是日文的，英文关键词只能命中用拉丁字母印刷的标题，所以只看得到市场的一部分——实测 2026-08-18：`One Piece` 1,731 件 / `ワンピース` 2,174 件（80%），`camera` 1,795 件 / `カメラ` 9,842 件（18%），`Gundam` 498 件 / `ガンダム` 4,893 件（10%），`manga` 689 件 / `漫画` 38,239 件（2%）。要看全貌请用日文（ガンダム、鬼滅の刃、米津玄師）。
- **不做服务端的「仅看有货」筛选。** 站内 UI 里有这些筛选，但其查询参数并不公开稳定，因此 v1 用样本报告库存构成，而不是在服务端过滤。
- **不处理个人数据。** BookOff 是第一方零售商，没有卖家。

#### 价格 Pricing —— 每个关键词 $0.02

| 计费事件 | 价格 | 何时发生 |
|---|---|---|
| 关键词汇总 | **$0.02** | 每个关键词一次，列表里的每个关键词都会计费 |
| 单件商品记录 | **$0.002** | 仅当开启「输出单件商品」时（默认关闭） |

默认运行（1 个关键词、只要汇总）花费 **$0.02**，约 8 秒完成。按关键词计费，没有月费。**零结果的关键词绝不收费。**

#### 注意事项 Notes & limits

- `totalListingsFound` 统计所有命中商品，无论是否有货。
- 网店默认排序是「人気順」（人气顺，带畅销/广告加权），因此本 Actor **总是显式发送排序参数**，以免统计被带偏。
- 只读且限速（1 请求 / 1.5 秒），每个关键词 5 次请求。多关键词运行有 95 秒软预算：超出预算的关键词仍会返回汇总，但会标记 `truncatedForTimeLimit` 且 `usedPriceJpyBasis: "sample"`。
- 与ブックオフコーポレーション株式会社无任何关联。数据用于市场调研，大额交易前请自行核实。

#### 用途 Use cases

- **进口与转卖选品** —— 通过代购下单前，先看日本的二手价格带，再与 eBay / 煤炉的成交价对比。
- **给自己的库存定价** —— 取自**全部匹配商品**的中位数与中间 50% 区间的上沿，才是日本市场实际的价格水平，而不是最吵的那条挂牌。
- **动销筛选** —— 售罄比例高、在售件数薄，说明这个题材在走货；反之就是压仓。
- **目录 / 版权调研** —— 某个系列、某个厂牌、某位歌手的二手供给有多深，相对定价打几折。
- **重定价与监测** —— 定时运行，跟踪每个关键词的中位数随时间的变化。

***

### English

#### Overview

Used-price figures for any keyword on BookOff's official Japanese online store, one row per keyword: the cheapest price, the middle 50% range, the median and the dearest, usually read across **every matching listing** — not a first-page sample — plus the stock split, the sold-out share and the discount against list price.

This listing is the **Chinese-language package** of our English Actor [BookOff Japan Used Media](https://apify.com/jpmarketdata/bookoff-market-checker). It reads the same pages and works out the same numbers; only the documentation, store copy and input labels are written for Chinese-speaking buyers (日本二手书 / 二手漫画).

#### Input

| Field | Example | Notes |
|---|---|---|
| `keywords` | `["ガンダム"]` | Japanese works best — an English keyword only matches titles printed in Latin letters (`Gundam` 498 vs `ガンダム` 4,893). $0.02 per keyword |
| `genreCode` | `"11"` | Optional: `12` Books / `11` Comics / `13` Magazines / `31` CD / `71` DVD & Blu-ray / `51` Games |
| `maxItemsPerKeyword` | `120` | Listings read for the stock / discount / genre mix (30–360). Does **not** change the used-price figures |
| `includeIndividualItems` | `false` | Turn on to also get each read listing as its own row (+$0.002 each) |
| `convertToUsd` | `true` | Adds USD figures at the current exchange rate |

#### Output

One `type: "market_summary"` row per keyword — `usedPriceJpy` with **`usedPriceJpyBasis`** (`exact` = every matching listing read / `population_quantiles` = read across every matching listing / `sample` = only the listings that were read), `newPriceJpy`, `stockBreakdown`, `outOfStockRatioSampled`, `discountVsListPricePct`, `genreTop`, USD conversion — see the JSON example in the Chinese section — plus optionally one `item` row per read listing.

#### Pricing

| Event | Price |
|---|---|
| Keyword summary | **$0.02** |
| Individual listing row | **$0.002** each |

Individual listings are OFF by default, so a default run is a flat **$0.02** per keyword and takes about 8 seconds. You pay per keyword; there is no monthly fee. A keyword that returns zero listings is never charged.

#### Notes & limits

- **Trading cards, figures and hobby goods are out of scope** — BookOff's official online store has no TCG / hobby genre. Use a Mandarake source for those.
- BookOff is a fixed-price retailer: prices are **asking prices**, and a sold-out product's price is the last price it was offered at — a good stand-in for what it sold for, but a product-master price with no sale date, so no history over time.
- The store's default order is 人気順 (popularity, ad/best-seller weighted); this Actor always sends an explicit order.
- `newPriceJpy`, `stockBreakdown`, `outOfStockRatioSampled`, `discountVsListPricePct` and `genreTop` always come from the sample only (`sampledListings` gives its size).
- Read-only and throttled (1 request / 1.5 s), 5 requests per keyword, 95-second soft budget. No personal data — BookOff is a first-party retailer, there are no sellers.

***

### 日本語

#### 概要 Overview

ブックオフ公式オンラインストアの中古相場を、キーワード1件につき1レコードで返します。特徴は先頭ページのサンプル統計ではなく**検索結果の全件から読み取った中古価格**（安い順に並べ替え、その順位が載っているページへ直接ジャンプ）。あわせて在庫内訳、在庫なし比率、定価に対する割引率、新品価格、ジャンル内訳、USD換算。中国語圏の利用者（日本二手书 / 二手漫画）向けに中国語で書き直したパッケージで、英語版は [BookOff Japan Used Media](https://apify.com/jpmarketdata/bookoff-market-checker)（取得・統計処理は同一）。

#### 入力 Input

`keywords`（**日本語**推奨、カタログが日本語のため）／`genreCode`（12=書籍 / 11=コミック / 13=雑誌 / 31=CD / 71=DVD・ブルーレイ / 51=ゲーム）／`maxItemsPerKeyword`（既定 120、30〜360）／`includeIndividualItems`（既定 OFF）／`convertToUsd`（既定 ON）。

#### 出力 Output

キーワードごとに `market_summary` を1件。**数値の根拠は必ず明示**します：`usedPriceJpyBasis` が `exact`（全件が1ページに収まり全数集計）/ `population_quantiles`（検索結果の全件から読み取り）/ `sample`（読み取った件数だけの統計）のどれかを示し、ページ間で価格の並びが単調に上がらない場合や時間予算（95秒）を超えた場合は**全件基準を名乗らず** `sample` に落ちます。在庫内訳・割引率・ジャンル内訳・新品価格は常にサンプル基準です。

#### 料金 Pricing

キーワードサマリー（`keyword-analyzed`）**$0.02**／個別商品レコード（`item-scraped`）**$0.002 / 件**。個別明細は**既定 OFF** なので既定実行は $0.02 固定です。**0件のキーワードには課金されません。** 使った分だけの従量課金です。

#### 注意 Notes

**トレカ・ホビー・フィギュア系のジャンルは公式オンラインストアに存在しないため対象外**です（書籍・コミック・雑誌・CD・DVD・ゲームのみ）。ブックオフは定価販売の中古小売であり、価格は「出品価格」、売り切れ商品の価格は「最後に提示されていた価格」で販売日時は取得できません（時系列分析は不可）。既定の並び順（人気順）は広告・売れ筋バイアスがあるため常に並び順を明示します。リクエストは1.5秒間隔・キーワードあたり5リクエスト。ブックオフコーポレーション株式会社とは無関係です。

### 出问题了怎么办

- **数字不对，或者运行失败了？** 请在 **Issues** 标签页提交。每一条我都会看，2 个工作日内回复（日本时间）。
- **绝不会返回假的「空结果」。** 网站读不到的时候，运行会失败并说明原因。
- **没有结果就不计费。** 你只为真正拿到的结果付费。
- **每周自检。** 自动测试每周运行一次；网站有变化我会修。
- **只读公开页面。** 不登录、不涉及个人信息，访问也很克制。

### 同一作者的其他工具

- [日本化妆品排行榜 @cosme Top 50 评分与价格](https://apify.com/jpmarketdata/cosme-beauty-market-cn)
- [日本二手乐器 Digimart 吉他·乐器价格 — 二手价与成色](https://apify.com/jpmarketdata/digimart-instrument-market-cn)
- [藤屋相机 Fujiya Camera 日本二手相机·镜头价格 — 按成色分级](https://apify.com/jpmarketdata/fujiya-camera-market-cn)
- [日本高达模型·手办 HobbyLink Japan 价格 — 现货还是预订](https://apify.com/jpmarketdata/hlj-hobby-market-cn)
- [日本二手手机店 Iosys 二手 iPhone·手机价格 — 按成色分级](https://apify.com/jpmarketdata/iosys-phone-market-cn)
- [万代书店 Mandarake 日本二手手办·漫画价格 — 在售价与售罄价](https://apify.com/jpmarketdata/mandarake-market-cn)
- [游游亭 Yuyu-tei 日本卡牌单卡价格 — 售价与回收价](https://apify.com/jpmarketdata/yuyutei-tcg-price-cn)
- [@cosme Japan Beauty Ranking — Top 50 Ratings & Prices](https://apify.com/jpmarketdata/cosme-beauty-market-checker)

本工具的其他语言版本：[English](https://apify.com/jpmarketdata/bookoff-market-checker) · [한국어](https://apify.com/jpmarketdata/bookoff-market-kr)

全部工具（日本二手交易平台、房产、招聘、赛事、预测市场）：<https://apify.com/jpmarketdata>

### 免责声明

非官方的独立工具 — **与 BOOKOFF 没有从属、认可或赞助关系**。商品名称与标识归各自所有者所有，在这里只用于说明数据来自哪里。数据读取自公开页面，供市场调研使用；据此行动前请自行核实。

# Actor input Schema

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

一个或多个搜索关键词。日文命中率最高（ガンダム、ワンピース、ドラゴンクエスト、米津玄師）：目录是日文的，英文关键词只能命中用拉丁字母印刷的标题——实测 2026-08-18，'Gundam' 498 件而 'ガンダム' 4,893 件，'One Piece' 1,731 件而 'ワンピース' 2,174 件。零结果的关键词会带 keywordStatus 'not\_found' 返回，且不收费。每个关键词 $0.02。

## `genreCode` (type: `string`):

把搜索限定到某一个 BookOff 品类：12=书籍（書籍）、11=漫画（コミック）、13=杂志（雑誌）、31=CD、71=DVD 与蓝光、51=游戏（ゲーム）。留空表示搜索全部品类。注意：官方网店没有卡牌与手办/模型品类。

## `maxItemsPerKeyword` (type: `integer`):

每个关键词检视多少件商品，用于计算库存构成、折扣率与品类构成。二手价格的分位点取自整个结果集的母体，不受此项影响。结果每页 120 件，因此大于 120 的取值只是把本来就要抓取的分位页一起用上——样本自动散布在整个价格区间，不增加请求也不增加时间；小于 120 的取值只会限制开启「输出单件商品」时返回（并计费）的件数（+$0.002/件）。

## `includeIndividualItems` (type: `boolean`):

默认关闭：一次运行每个关键词汇总固定 $0.02。开启后还会输出每一件取样商品（标题、价格、成色、库存状态、定价、折扣率、发售日、可店取标记、链接），费用 +$0.002/件。

## `convertToUsd` (type: `boolean`):

按当前汇率（open.er-api.com）在日元统计旁边附上美元统计。

## Actor input object example

```json
{
  "keywords": [
    "ガンダム"
  ],
  "maxItemsPerKeyword": 120,
  "includeIndividualItems": false,
  "convertToUsd": true
}
```

# 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": [
        "ガンダム"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("jpmarketdata/bookoff-market-cn").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": ["ガンダム"] }

# Run the Actor and wait for it to finish
run = client.actor("jpmarketdata/bookoff-market-cn").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": [
    "ガンダム"
  ]
}' |
apify call jpmarketdata/bookoff-market-cn --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,jpmarketdata/bookoff-market-cn"
        }
    }
}

```

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/jm4ygrtjs6IkXVYLc/builds/3ivwy6lRcxjPRK8CY/openapi.json
