# Mercari Japan Scraper — Products, Prices, Brands & Sellers (`haketa/mercari-scraper`) Actor

Scrape Mercari Japan (メルカリ), the country's #1 C2C marketplace, by keyword: price (JPY), item condition, brand, size, category, seller, sold/on-sale status and photos. Fast HTTP-only, no login. For resale research, price tracking & market data.

- **URL**: https://apify.com/haketa/mercari-scraper.md
- **Developed by:** [Haketa](https://apify.com/haketa) (community)
- **Categories:** E-commerce, Business, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 results

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

## Mercari Japan Scraper — Prices, Conditions, Brands, Sizes & Sellers (メルカリ)

[![Apify Actor](https://img.shields.io/badge/Apify-Actor-orange?logo=apify)](https://apify.com/haketa/mercari-scraper)
[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://apify.com/haketa/mercari-scraper)
[![Data Quality](https://img.shields.io/badge/Data%20Quality-Verified-blue.svg)](https://apify.com/haketa/mercari-scraper)
[![Format](https://img.shields.io/badge/Export-JSON%20|%20CSV%20|%20Excel-brightgreen)](https://apify.com/haketa/mercari-scraper)
[![Speed](https://img.shields.io/badge/Speed-High--Throughput-yellow)](https://apify.com/haketa/mercari-scraper)

Extract live product listings, historical sold-out price comparables, official item condition grades, brand identifiers, apparel sizes, and seller metrics from **Mercari Japan (メルカリ)**, Japan's undisputed #1 C2C secondhand marketplace. Whether you are conducting resale arbitrage, tracking Pokémon trading cards, evaluating luxury watches, or analyzing Japanese retail price trends, Mercari Japan Scraper delivers high-throughput structured market intelligence.

***

### ⚡ At a Glance

| Feature | Specification |
|---|---|
| **Target Website** | [Mercari Japan (jp.mercari.com)](https://jp.mercari.com) |
| **Input Options** | Keywords (`searchTerms`), listing status (`status`), sort orders, price boundaries |
| **Listing Status Filters** | `onSale` (available inventory), `soldOut` (historical comps), or `all` |
| **Data Fields** | Title, price in JPY, condition grade (1-6), brand, apparel sizes, seller ID, shop name, images, timestamps |
| **Output Formats** | Dataset (JSON, CSV, Excel, XML, NDJSON), Key-Value Store run summary |
| **Pagination** | Deep pagination unlocked (1,000+ items across single or multiple keywords) |
| **Proxy Requirement** | Apify Proxy datacenter proxies (automatic IP rotation, no residential proxy required) |
| **Execution Speed** | Ultra-fast HTTP-only extraction (~120 listings per page in milliseconds) |
| **Authentication** | No Mercari account or manual API token needed |

***

### 🚀 Why Scrape Mercari Japan?

Mercari (メルカリ) is the epicenter of Japan's secondhand economy and consumer-to-consumer commerce, hosting tens of millions of active listings spanning fashion, luxury goods, retro gaming, anime merchandise, trading cards, and consumer electronics:

- 💹 **Resale Arbitrage & Market Comps**: Pull thousands of recently `soldOut` items to discover the exact market-clearing price across international resale platforms (eBay, StockX, Chrono24).
- 🃏 **Trading Cards & Collectibles Tracking**: Track pricing trends for Pokémon cards (ポケモンカード), Yu-Gi-Oh!, One Piece TCG, and exclusive Japanese anime figurines.
- ⌚ **Luxury & Streetwear Valuation**: Monitor condition grades, price spreads, and authentic seller stock for brands like Rolex, Omega, Louis Vuitton, Supreme, and BAPE.
- 📦 **Automated Stock Sourcing**: Detect underpriced vintage cameras, retro consoles (Nintendo, PlayStation), and rare apparel before competitors buy them.
- 📊 **Macro Secondary Market Intelligence**: Analyze volume distributions, brand market share, and depreciation curves across Japanese consumer verticals.

***

### 🥊 Feature Comparison: Mercari Japan Scraper vs Alternatives

| Feature | Mercari Japan Scraper (This Actor) | Web Scraping / HTML Parsing | Official Web UI | Generic Scrapers |
|---|---|---|---|---|
| **Authentication / Tokens** | ⚡ Automatic cryptographic token minting | 🔴 Blocked by client-side render | ⚠️ Manual browsing only | 🔴 401 Unauthorized errors |
| **Historical Sold Comps** | 🟢 Direct `soldOut` filter support | 🔴 Hard to isolate | 🟡 Manual click per item | 🔴 Fails on lazy-loaded pages |
| **Listing Throughput** | ⚡ 120 listings per API page | 🐌 20-30 DOM elements | 🐌 Human reading speed | 🔴 Frequent rate limits |
| **Official Condition Grades** | 🟢 Normalized (6 standardized tiers) | 🟡 Unparsed Japanese text | 🟡 Visual check | 🔴 Missing or raw IDs |
| **Brand & Size Normalization** | 🟢 Structured `brandId`, `size`, `sizes` | 🔴 Messy text extraction | 🟡 Visual reading | 🔴 Missing |
| **Deep 1,000+ Pagination** | 🟢 Automatic cursor traversal | 🔴 Fails after page 2 | 🐌 Manual next button | 🔴 Blocked |

***

### 📊 Extracted Data Fields

Every scraped listing is parsed into standardized, strongly-typed JSON records:

#### 🏷️ Item Identification & Metadata

| Field | Type | Description | Coverage |
|---|---|---|---|
| `id` | String | Unique Mercari listing identifier (e.g. `m42971856910`) | 🟢 High (100%) |
| `name` | String | Complete listing title in Japanese or English | 🟢 High (100%) |
| `url` | String | Direct canonical URL to the item page on `jp.mercari.com` | 🟢 High (100%) |
| `searchTerm` | String | The query term that produced this listing record | 🟢 High (100%) |
| `itemType` | String | Marketplace origin (`mercari` standard or `beyond` for Mercari Shops) | 🟢 High (100%) |
| `isAuction` | Boolean | `true` if the item is listed in an auction format | 🟢 High (100%) |

#### 💰 Pricing, Status & Condition

| Field | Type | Description | Coverage |
|---|---|---|---|
| `price` | Integer | Final listing price in Japanese Yen (¥) | 🟢 High (100%) |
| `currency` | String | Currency denomination (always `JPY`) | 🟢 High (100%) |
| `status` | String | Current listing status (`on_sale` or `sold_out`) | 🟢 High (100%) |
| `condition` | String | Normalized condition grade (`New / unused`, `Almost unused`, `No noticeable damage`, etc.) | 🟢 High (100%) |
| `conditionId` | String | Raw Mercari condition code (`1` through `6`) | 🟢 High (100%) |
| `shippingPayer` | String | Shipping burden (`Free (seller pays)` or `Buyer pays`) | 🟢 High (96%) |

#### 🏷️ Categorization & Attributes

| Field | Type | Description | Coverage |
|---|---|---|---|
| `brand` | String | Clean brand name (e.g., `NIKE`, `Rolex`, `BANDAI`) | 🟡 Conditional (~55%) |
| `brandId` | String | Official Mercari brand database identifier | 🟡 Conditional (~55%) |
| `size` | String | Primary size descriptor (e.g., `L`, `27.5cm`, `FREE SIZE`) | 🟡 Conditional (~40%) |
| `sizes` | Array | Full array of associated size tags | 🟡 Conditional (~40%) |
| `categoryId` | String | Mercari numerical category hierarchy ID | 🟢 High (100%) |

#### 🏢 Seller Information & Media

| Field | Type | Description | Coverage |
|---|---|---|---|
| `sellerId` | String | Numerical account ID of the individual merchant | 🟢 High (98%) |
| `shopName` | String | Registered store name (for Mercari Shops / `beyond` items) | 🟡 Conditional (~15%) |
| `imageUrl` | String | Direct link to high-resolution primary photo | 🟢 High (100%) |
| `thumbnails` | Array | Full collection of photo thumbnail URLs | 🟢 High (100%) |
| `createdAt` | String | ISO 8601 creation timestamp | 🟢 High (100%) |
| `updatedAt` | String | ISO 8601 last modification timestamp | 🟢 High (100%) |
| `scrapedAt` | String | ISO 8601 timestamp when scraped | 🟢 High (100%) |

***

### 🏷️ Official Mercari Item Condition Reference

Mercari uses an official 6-tier condition grading system. The scraper automatically maps the raw integer code (`conditionId`) to human-readable descriptors:

| `conditionId` | Japanese Label | English Standard | Typical Condition Characteristics |
|---|---|---|---|
| `1` | 新品、未使用 | **New / unused** | Brand new with tags, unopened packaging, pristine |
| `2` | 未使用に近い | **Almost unused** | Like new, tried on once, flawless exterior |
| `3` | 目立った傷や汚れなし | **No noticeable damage** | Excellent pre-owned condition, minor gentle wear |
| `4` | やや傷や汚れあり | **Slightly damaged** | Normal used condition, minor scuffs or subtle marks |
| `5` | 傷や汚れあり | **Damaged** | Visible wear, scratches, or cosmetic discoloration |
| `6` | 全体的に状態が悪い | **Poor condition** | Heavy wear, junk items, or parts-only condition |

***

### 🗂️ Major Japanese Mercari Categories & ID Hierarchy

Understanding Mercari's category IDs enables precise downstream catalog sorting:

| Category Name | Japanese Equivalent | Common Category IDs |
|---|---|---|
| **Trading Cards & TCG** | トレーディングカード | `107`, `108`, `1289` |
| **Video Games & Consoles** | テレビゲーム | `72`, `1056`, `1152` |
| **Men's Apparel & Streetwear** | メンズ ファッション | `2`, `1077`, `1080` |
| **Women's Luxury & Bags** | レディース バッグ | `1`, `645`, `652` |
| **Anime Figures & Toys** | おもちゃ・ホビー・グッズ | `5`, `81`, `82` |
| **Cameras & Optics** | カメラ・光学機器 | `97`, `852`, `853` |

***

### ⚙️ Input Configuration

Mercari Japan Scraper provides comprehensive parameter control for both quick target lookups and high-volume data harvesting:

| Parameter | Type | Default | Description |
|---|---|---|---|
| `searchTerms` | Array of Strings | `["nintendo switch"]` | Keywords to search (Japanese kanji/katakana or English brand names). |
| `status` | String (Select) | `"onSale"` | Availability filter: `onSale`, `soldOut` (for price comps), or `all`. |
| `sort` | String (Select) | `"newest"` | Sorting option: `relevance`, `newest`, `priceAsc`, `priceDesc`, or `likes`. |
| `priceMin` | Integer | `0` (none) | Minimum listing price in Japanese Yen (e.g., `5000`). |
| `priceMax` | Integer | `0` (none) | Maximum listing price in Japanese Yen (e.g., `50000`). |
| `maxItems` | Integer | `0` (unlimited) | Total listings to collect across searches. Prefill is `100` for rapid testing. |
| `maxPages` | Integer | `0` (unlimited) | Max pages per keyword (120 listings/page). Set to `0` for unconstrained crawling. |
| `maxConcurrency` | Integer | `2` | Parallel search workers (1–5) for high-speed multi-term harvesting. |
| `proxyConfiguration` | Object | Datacenter | Apify Proxy configuration. Datacenter proxies work reliably and keep runs cheap. |

#### Example Input: Sold-Out Resale Comps (Pokémon Cards)

```json
{
  "searchTerms": ["ポケモンカード 151 BOX", "ナンジャモ SAR"],
  "status": "soldOut",
  "sort": "newest",
  "priceMin": 3000,
  "maxItems": 500,
  "maxPages": 0,
  "maxConcurrency": 2,
  "proxyConfiguration": { "useApifyProxy": true }
}
```

#### Example Input: Luxury Watch Market Discovery

```json
{
  "searchTerms": ["rolex submariner", "omega speedmaster"],
  "status": "onSale",
  "sort": "priceDesc",
  "priceMin": 300000,
  "maxItems": 250,
  "maxPages": 0,
  "maxConcurrency": 2,
  "proxyConfiguration": { "useApifyProxy": true }
}
```

***

### 📦 Sample Output

```json
{
  "id": "m42971856910",
  "name": "海外新品、タグ付き NIKE スポーツハーフタイツ Sサイズ 青",
  "price": 3750,
  "currency": "JPY",
  "status": "on_sale",
  "condition": "New / unused",
  "conditionId": "1",
  "shippingPayer": "Free (seller pays)",
  "brand": "NIKE",
  "brandId": "857",
  "size": "S",
  "sizes": ["S"],
  "categoryId": "10770",
  "itemType": "mercari",
  "shopName": null,
  "isAuction": false,
  "sellerId": "973114032",
  "imageUrl": "https://static.mercdn.net/thumb/item/webp/m42971856910_1.jpg?1775092778",
  "thumbnails": [
    "https://static.mercdn.net/thumb/item/webp/m42971856910_1.jpg?1775092778",
    "https://static.mercdn.net/thumb/item/webp/m42971856910_2.jpg?1775092778"
  ],
  "createdAt": "2026-04-02T01:19:38.000Z",
  "updatedAt": "2026-11-02T01:52:34.000Z",
  "url": "https://jp.mercari.com/item/m42971856910",
  "searchTerm": "nike",
  "scrapedAt": "2026-11-10T14:41:22.586Z"
}
```

***

### 💼 Step-by-Step Practical Workflow

#### Step 1: Select Search Keywords and Language

Determine whether your search terms are broad brand names (`"supreme"`, `"sony"`) or targeted Japanese phrases (`"ポケモンカード 未開封"`, `"ニンテンドースイッチ 有機EL"`). Entering authentic Japanese keywords often returns 3x to 5x higher listing volumes.

#### Step 2: Choose Listing Availability Mode

- If your goal is purchasing available inventory or real-time alert monitoring, select `status: "onSale"`.
- If your objective is pricing historical comps, calculating fair market value, or measuring sales velocity, select `status: "soldOut"`.

#### Step 3: Run the Actor and Monitor Live Streaming

Hit **Start**. Mercari Japan Scraper immediately begins parallel workers, minting proof tokens on the fly and pulling 120 items per API page. Watch the live console logs as items are pushed into your dataset.

#### Step 4: Export to Business Intelligence or Sheets

Once complete, download your data in Excel (`.xlsx`), CSV, or JSON format. You can also integrate webhooks to sync directly with Google Sheets, PostgreSQL, or your proprietary arbitrage dashboard.

***

### 💼 High-Impact Business Applications

#### 1. Cross-Border Resale & eBay Arbitrage

Source items in Japan at domestic C2C prices and resell them globally at higher margins. By monitoring both `onSale` prices and historical `soldOut` market clearing rates, you can accurately estimate net margins after shipping and export taxes.

#### 2. Trading Card Game (TCG) & Collectibles Market Indices

Build real-time pricing indices for rare collectible cards and figures. Calculate moving average prices, detect sudden spikes in market demand, and identify newly listed mint-condition cards (`conditionId: "1"`).

#### 3. Luxury Goods & High-End Watch Valuation

Extract authentic pre-owned luxury listings. Compare current Japanese asking prices against European and North American auction houses to spot price discrepancies.

#### 4. Brand Protection & Intellectual Property Monitoring

Track unauthorized resellers, counterfeit goods, or parallel-imported merchandise. Scrape brand-specific listings across high-risk categories to identify prolific unauthorized merchant accounts (`sellerId`).

***

### 💡 Practical Keyword Reference for Japanese Sourcing

Using authentic Japanese search terms frequently yields significantly more listings than English translations:

| Category | English Keyword | Japanese Search Term (High Volume) |
|---|---|---|
| **Trading Cards** | Pokémon Card Box | `ポケモンカード 未開封 BOX` |
| **Retro Gaming** | Game Boy Advance SP | `ゲームボーイアドバンスSP 本体` |
| **Anime Figures** | One Piece Figure | `ワンピース フィギュア 一番くじ` |
| **Camera & Lenses** | Contax T2 / T3 | `CONTAX T2 完動品` |
| **Streetwear** | Supreme Box Logo Hoodie | `Supreme ボックスロゴ パーカー` |
| **Luxury Bags** | Louis Vuitton Monogram | `ルイヴィトン モノグラム バッグ` |

***

### 🔗 Exporting & Microservice Integration

Automate your Mercari data pipelines using Apify's API and client SDKs:

- **Apify API (cURL)**:
  ```bash
  curl -X GET "https://api.apify.com/v2/datasets/{DATASET_ID}/items?format=json&clean=true"
  ```
- **Python Data Science Pipeline**:
  ```python
  from apify_client import ApifyClient
  import pandas as pd

  client = ApifyClient("YOUR_APIFY_TOKEN")
  run = client.actor("haketa/mercari-scraper").call(run_input={
      "searchTerms": ["ポケモンカード 151"],
      "status": "soldOut",
      "maxItems": 300
  })

  items = list(client.dataset(run["defaultDatasetId"]).iterate_items())
  df = pd.DataFrame(items)
  print(f"Average Sold Price: ¥{df['price'].mean():,.0f} JPY across {len(df)} comps")
  ```
- **Node.js Automated Webhook**:
  ```javascript
  import { ApifyClient } from 'apify-client';

  const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
  const run = await client.actor('haketa/mercari-scraper').call({
      searchTerms: ['sony a7iv'],
      status: 'onSale',
      maxItems: 120,
  });
  const { items } = await client.dataset(run.defaultDatasetId).listItems();
  console.log(`Retrieved ${items.length} active listings`);
  ```
- **Automated Webhooks (Discord / Slack / Zapier / Make)**:
  Pipe newly extracted deals directly into your Discord channel or Slack workspace with immediate image previews and direct buy links.

***

### ❓ Frequently Asked Questions

##### Do I need a Japanese IP address or residential proxy?

No. Mercari Japan's API does not enforce strict residential IP restrictions on these search endpoints. The actor works seamlessly and cost-effectively with standard Apify datacenter proxies.

##### How do I scrape historical sold prices for price comps?

Simply change the `status` dropdown in the input from `onSale` to `soldOut`. The scraper will exclusively return items that have already been purchased, providing accurate historical market comps.

##### How does deep pagination work?

Mercari returns 120 listings per API page with a cursor token (`nextPageToken`). When `maxPages` is set to `0`, the actor crawls subsequent pages continuously until your `maxItems` target is fulfilled or all search results are exhausted.

##### Why are some `brand` or `size` values null?

These attributes are strictly data-dependent. A listing for a video game or trading card does not have an apparel size or fashion brand; in those cases, the fields are cleanly returned as `null`.

##### Can I run multiple keyword queries at once?

Yes! Enter multiple terms in `searchTerms` (e.g. `["ps5", "switch", "xbox"]`). The actor processes them concurrently based on your `maxConcurrency` setting and consolidates all records into a single deduplicated dataset.

##### What currency are prices reported in?

All prices are returned in Japanese Yen (`JPY`, ¥) as integers matching the exact domestic checkout amount.

##### How frequently can I schedule this actor?

You can run this actor on any recurring schedule—from hourly deal-monitoring alerts to daily historical market archiving—using the Apify platform's built-in scheduler.

##### Can I export directly to Google Sheets or Airtable?

Yes. You can use Apify's native Google Sheets integration or connect via Make.com / Zapier to append new listings automatically.

##### Are shipping costs included in the price?

In Japan, most sellers offer free shipping (`shippingPayer: "Free (seller pays)"`). When the buyer pays shipping, `shippingPayer` indicates `"Buyer pays"`.

##### How does deduplication work across multiple terms?

Every Mercari listing has a unique alphanumeric ID (e.g., `m1234567890`). The actor deduplicates listings in memory during the run so your dataset contains zero duplicate items.

##### Is there a rate limit on the number of searches?

The actor handles request pacing and proxy rotation internally to prevent throttle responses. For large enterprise jobs scraping thousands of queries, keep `maxConcurrency` at `2` or `3` for maximum operational stability.

***

### 📋 Changelog

#### v1.2 — 2026-11

- **Deep Pagination Unlocked**: Removed restrictive 100-page limit; unlocked `maxPages: 0` for unconstrained pagination up to 1,000+ items.
- **Fast Prefill Optimization**: Configured rapid prefill defaults for sub-minute test runs.
- **Input & Output Schema Refinements**: Added standardized descriptions, output viewer URLs, and streamlined validation rules.
- **Enhanced Token & Rotation Resilience**: Improved automatic cryptographic token generation and connection retry handlers.

#### v1.1 — 2026-11

- Added support for multiple sizes extraction (`sizes` array) and Mercari Shops indicators (`shopName`).
- Added filtering by price range (`priceMin` and `priceMax`).
- Added sorting presets for relevance, price, and likes.

#### v1.0 — 2026-11

- Initial production release for Mercari Japan (メルカリ) scraping.
- Support for `onSale` and `soldOut` listing status filters.
- Native ES256 cryptographic token implementation without browser overhead.

# Changelog

This Actor's version history is a separate document: https://apify.com/haketa/mercari-scraper/changelog.md

# Actor input Schema

## `searchTerms` (type: `array`):

One or more keywords in Japanese or English (e.g., 'pokemon card', 'nintendo switch', 'rolex').

## `status` (type: `string`):

Filter by item availability: On sale only, Sold out only (ideal for market price comps & historical resale research), or Both.

## `sort` (type: `string`):

Order of returned listings: Relevance, Newest, Price ascending, Price descending, or Most liked.

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

Optional lower price threshold in Japanese Yen (JPY).

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

Optional upper price threshold in Japanese Yen (JPY).

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

Total unique listings to collect across all searches. Set to 0 for unlimited (governed by maxPages or total listings found). Prefill is 100 for fast runs.

## `maxPages` (type: `integer`):

Pages to crawl per keyword (120 listings per page). Set to 0 for unlimited pagination (governed by maxItems).

## `maxConcurrency` (type: `integer`):

How many search queries to process in parallel.

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

Apify Proxy configuration for IP rotation. Datacenter proxies are fully supported.

## Actor input object example

```json
{
  "searchTerms": [
    "nintendo switch"
  ],
  "status": "onSale",
  "sort": "newest",
  "maxItems": 100,
  "maxPages": 0,
  "maxConcurrency": 2,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

Direct JSON endpoint containing all scraped Mercari Japan listings, prices, and conditions

## `datasetUi` (type: `string`):

Interactive dataset viewer and export UI for CSV, JSON, and Excel formats

## `output` (type: `string`):

Execution summary containing total listings scraped and search queries processed

# 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 = {
    "searchTerms": [
        "nintendo switch"
    ],
    "maxItems": 100,
    "maxPages": 0
};

// Run the Actor and wait for it to finish
const run = await client.actor("haketa/mercari-scraper").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 = {
    "searchTerms": ["nintendo switch"],
    "maxItems": 100,
    "maxPages": 0,
}

# Run the Actor and wait for it to finish
run = client.actor("haketa/mercari-scraper").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 '{
  "searchTerms": [
    "nintendo switch"
  ],
  "maxItems": 100,
  "maxPages": 0
}' |
apify call haketa/mercari-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,haketa/mercari-scraper"
        }
    }
}
```

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/Vn5LdKagbm1vflqS7/builds/GTc1WSphrjzPDygSl/openapi.json
