# Mercari Item Detail Scraper (`good-apis/mercari-product-scraper`) Actor

- **URL**: https://apify.com/good-apis/mercari-product-scraper.md
- **Developed by:** [Danny](https://apify.com/good-apis) (community)
- **Categories:** E-commerce
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$4.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.

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

## Mercari Japan Item Detail Scraper

Get the **full detail** for one **Mercari Japan** (`jp.mercari.com`) listing — title, **price in
yen (¥)**, condition, category, description, seller, availability and every photo — from an item id
or URL. Pair it with the **Mercari Japan Search Scraper** to enrich search results.

- **Marketplace:** Mercari Japan (jp.mercari.com). Prices are Japanese yen (JPY).
- **Pricing:** Pay per result — **$4.00 / 1,000 items** (charged only when an item is returned).

### Input

Provide **one** of `item_id` / `url`, or leave both blank and give a `seed_search` keyword (the actor
then details the top live result for that keyword — handy for testing).

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `item_id` | string | | Mercari Japan item id, e.g. `m28656360094`. |
| `url` | string | | Full item URL, e.g. `https://jp.mercari.com/item/m28656360094`. |
| `seed_search` | string | | Used only when `item_id`/`url` are blank: details the TOP live result for this keyword. Default `ポケモンカード`. |

```json
{ "item_id": "m28656360094" }
```

### Output

One dataset row:

| Field | Type | Description |
|-------|------|-------------|
| `item_id` | string | Mercari item id. |
| `title` | string | Full listing title. |
| `price` | integer | Price in **yen** (no decimals). |
| `currency` | string | Always `JPY`. |
| `condition` | string | Japanese condition grade (e.g. `新品、未使用`, `目立った傷や汚れなし`). |
| `availability` | string | `InStock` or `SoldOut`. |
| `is_sold` | boolean | True when sold. |
| `category` | string | Category path (e.g. `ゲーム・おもちゃ・グッズ > トレーディングカード > ポケモンカードゲーム`). |
| `description` | string | Full item description. |
| `seller_id` / `seller_name` / `seller_url` | string | Seller profile. |
| `num_images` | integer | Number of photos. |
| `images` | array | Full-resolution photo URLs (up to 20). |
| `url` | string | Canonical item URL. |

```json
{
  "item_id": "m28656360094",
  "title": "ピカチュウex sar スタートデッキ100 NO.25",
  "price": 480000,
  "currency": "JPY",
  "condition": "新品、未使用",
  "availability": "InStock",
  "is_sold": false,
  "category": "ゲーム・おもちゃ・グッズ > トレーディングカード > ポケモンカードゲーム",
  "seller_id": "874742996",
  "seller_name": "即購入⭕",
  "num_images": 12,
  "url": "https://jp.mercari.com/item/m28656360094"
}
```

### Use it from code

**Python**

```python
from apify_client import ApifyClient
client = ApifyClient("<APIFY_TOKEN>")
run = client.actor("good-apis/mercari-product-scraper").call(
    run_input={"item_id": "m28656360094"})
item = next(client.dataset(run["defaultDatasetId"]).iterate_items())
print(item["title"], item["price"], "JPY", item["condition"])
```

**Node.js**

```javascript
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: '<APIFY_TOKEN>' });
const run = await client.actor('good-apis/mercari-product-scraper')
    .call({ item_id: 'm28656360094' });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items[0]);
```

### FAQ

**Where do I get an `item_id`?** From the **Mercari Japan Search Scraper**, or the code in any
`jp.mercari.com/item/<id>` URL.

**What if the item was already sold or removed?** The actor returns a clear error rather than a
partial row; sold-but-still-listed items return normally with `is_sold: true`.

**Why is `condition` in Japanese?** It is Mercari Japan's own condition grade, kept verbatim so it
matches the site exactly.

# Actor input Schema

## `item_id` (type: `string`):

Mercari Japan item id — the code in a /item/ URL, e.g. 'm28656360094'. Leave blank to auto-pick the top result of seed\_search.

## `url` (type: `string`):

Full item URL, e.g. 'https://jp.mercari.com/item/m28656360094'. Alternative to item\_id.

## `seed_search` (type: `string`):

Used only when item\_id/url are blank: returns the detail of the TOP live result for this Mercari Japan search keyword, so the actor always resolves a live item.

## Actor input object example

```json
{
  "seed_search": "ポケモンカード"
}
```

# Actor output Schema

## `results` (type: `string`):

All scraped items in the default dataset.

# 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 = {
    "seed_search": "ポケモンカード"
};

// Run the Actor and wait for it to finish
const run = await client.actor("good-apis/mercari-product-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 = { "seed_search": "ポケモンカード" }

# Run the Actor and wait for it to finish
run = client.actor("good-apis/mercari-product-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "seed_search": "ポケモンカード"
}' |
apify call good-apis/mercari-product-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=good-apis/mercari-product-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/MyXQiZr2EkSI6bYtu/builds/Z2Lxf3LTwDwukHoZW/openapi.json
