# Mercari Japan Scraper: Items, Prices & Sold Listings (`hyperbach/mercari-scraper`) Actor

Scrape Mercari Japan (jp.mercari.com) items from search URLs, keywords or item links: title, price in yen, sold or on sale, condition, shipping, likes, seller, photos and category. Price and sold filters for marketplace sold prices. No login, no browser. A search that finds nothing costs nothing.

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

## Pricing

from $1.99 / 1,000 items

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: Items, Prices & Sold Listings

**Mercari Japan items, logged out: jp.mercari.com search URLs (with their filters), search words or item URLs in, one row per item out — the title, the price in yen, sold or on sale, the condition, the brand, the category and its path, the shipping payer, method, prefecture and days, the likes, the seller as the item page shows them, every photo and the description.** One free `target` row per input carries the site's count and a verdict: COMPLETE, CAPPED (your limit) or TRUNCATED (the site's own depth). No login, no API key, no browser, proxies handled for you.

**$3.99 per 1,000 `item` rows on the Free plan, $2.99 on Starter.** A run start is $0.0028. The default input returns about 50 rows for about $0.2023. A value that names nothing is a free row that says why.

![A Mercari item page in a browser: a handmade stoneware mug with its price, condition, brand, category, shipping and seller. Beside it, the row this Actor returns, with condition_en and shipping_payer highlighted as plain English values next to the Japanese condition, category, prefecture, likes and seller ratings.](https://api.apify.com/v2/key-value-stores/dcLLNGq99686o2A4v/records/hero-mercari-scraper.webp)

### Why this Mercari Japan scraper

- **Names, not codes.** Each item is read on its own detail call as well as in the search: the condition (`未使用に近い`, and `like new` in English), the category with its path, the shipping payer, method, prefecture and days, the brand, the likes and the comments count, every photo at full size and the whole description. A search card alone carries codes only.
- **The seller as the item page shows them.** The seller's display name, id, number of ratings and star rating on a personal item; the shop's name, review count and score on a Mercari Shops product.
- **Searches, filters and items in one run.** Search words, or search URLs from your browser with every filter you set there (sold or on sale, price, condition, category, brand, sort), or item URLs and `m…` ids. `status`, `priceMin` and `priceMax` filter every search at the source; each search gets its own cap (`maxItemsPerSearch`) and the run's cap sits on top (`maxItems`).
- **Every item of a search, checked.** 120 items a page in the site's own order, to the search's end: the free `target` row says COMPLETE with the site's count. The site shows a search at most 100 pages (about 12,000 items, measured 2026-11-06); a run that reaches that end says TRUNCATED with the count. An item two searches list is delivered and charged once.
- **Honest runs.** An item the site does not know is a free `not_found` row, checked on a second connection; a search with no match a free `no_results` row; Mercari US and member pages a free `invalid_input` row. Every input gets a row.

### Who it's for

- **Resellers and import buyers** — the asking and sold prices of a model on Mercari Japan, by condition, to price a purchase or a listing, read again every day.
- **Brand and market researchers** — what sells in a category or a brand: sold against on-sale items, prices, likes and conditions.
- **Proxy-buying services and price trackers** — the full record of item URLs a customer sends: price, sold or not, shipping and the seller's ratings.

### Quick start

**The first 100 items of a search URL**

```json
{
  "startUrls": [
    "https://jp.mercari.com/search?keyword=apple%20watch"
  ],
  "maxItemsPerSearch": 100
}
```

**Sold items for search words in a price band**

```json
{
  "searchTerms": [
    "nintendo switch",
    "ポケモンカード"
  ],
  "status": "sold_out",
  "priceMin": 1000,
  "priceMax": 30000,
  "maxItemsPerSearch": 200
}
```

**Items by URL and by id**

```json
{
  "startUrls": [
    "https://jp.mercari.com/item/m85552107200",
    "m77299541731"
  ]
}
```

### Switching from `fatihtahta/mercari-japan-scraper` or `abotapi/mercari-jp-scraper`?

Your input works as it is. Each name in the left column is read as this Actor's own field and the run log says so (`read <theirs> as <ours>`); a name marked *not read* is ignored with a note. A value in the other Actor's shape, an object list or its own date form, is read too.

| fatihtahta/mercari-japan-scraper / abotapi/mercari-jp-scraper | this Actor | what to know |
|---|---|---|
| `startUrls` | `startUrls` | Search URLs (their filters kept), item URLs (`/item/m…`, `/en/item/…`), Mercari Shops product URLs; category searches as `/search?category_id=…`. |
| `keyword` | `searchTerms` | One search; `searchTerms` takes several, one a line. |
| `status` | `status` | `on_sale`, `sold_out` (with `trading`), or both = all. |
| `priceMin` | `priceMin` | Yen; a search URL's own `price_min` wins. |
| `priceMax` | `priceMax` | Yen; a search URL's own `price_max` wins. |
| `limit` | `maxItemsPerSearch` | Items per search; 0 = every item the site shows. |
| `sort` | *not read* | Not an input: put `sort=score`, `created_time`, `price` or `num_likes` in a search URL. |
| `order` | *not read* | Not an input: put `order=desc` or `asc` in a search URL. |
| `proxyConfiguration` | *not read* | Not needed: the Actor brings its own connections at no cost to you. |

**What differs:**

- Each row carries the item's names (condition, category path, shipping method and prefecture), the likes and the seller's display name and ratings, read on the item's own detail call; the leader's row carries the search card's codes.
- `limit` is read as `maxItemsPerSearch`, a cap per search; the site shows at most about 12,000 items of a search, and a search that reaches that end is TRUNCATED with the count.
- `sort` and `order` are kept from a search URL (`sort=created_time&order=desc`); they are not inputs of their own.
- Sold items: `status` sold_out reads sold out and trading items, as the site's own filter does.

### Output

One row per item (and one free summary row per input):

| field | meaning |
|---|---|
| `record_type` | `item` on an item row (charged); `target` on an input's free summary row. |
| `status` | `ok`, or why an input gave no row: `no_results`, `not_found`, `invalid_input`, `failed`, `not_read` (see the FAQ). |
| `input` | The value you gave that this row answers. |
| `id` | Mercari's item id (`m…`), or the Mercari Shops product id. |
| `url` | The item on jp.mercari.com. |
| `title` | The item's title. |
| `price` | The price in yen, as a number. |
| `currency` | `JPY`. |
| `sale_status` | `on_sale`, `trading` (bought, the trade not finished) or `sold_out`. |
| `sold` | True when the item is no longer on sale (trading or sold out). |
| `condition` | The condition as the site writes it (`新品、未使用`, `未使用に近い`, `目立った傷や汚れなし` …). |
| `condition_en` | The condition in English: new, unused; like new; no noticeable scratches or stains; some scratches or stains; scratches or stains; poor condition. |
| `condition_id` | The site's condition id, 1 (new) to 6 (poor), as in a search URL's `item_condition_id`. |
| `brand` | The brand the seller chose, when one is set. |
| `category` | The item's category (the deepest level). |
| `category_id` | The category's id, as in a search URL's `category_id`. |
| `category_path` | The category path from the top level down. |
| `shipping_payer` | Who pays the shipping: `seller` (included in the price) or `buyer`. |
| `shipping_payer_text` | The shipping payer as the site writes it (`送料込み(出品者負担)`). |
| `shipping_method` | The shipping method (`らくらくメルカリ便`, `ゆうゆうメルカリ便` …). |
| `shipping_from` | The prefecture the item ships from. |
| `shipping_days` | The days to shipping as the site writes them (`1~2日で発送`). |
| `likes` | The item's likes. |
| `comments_count` | The comments on the item (a personal item; the texts are not read). |
| `seller_name` | The seller's display name as the item page shows it, or the shop's name for a Mercari Shops product. |
| `seller_id` | The seller's member id, or the shop's id. |
| `seller_ratings` | The seller's number of ratings (a shop: its review count). |
| `seller_star_rating` | The seller's star rating out of 5 (a shop: its score). |
| `item_type` | `personal` (a member's item) or `shop` (a Mercari Shops product). |
| `photos` | Every photo's URL, at full size. |
| `photo_count` | The number of photos. |
| `thumbnail` | The first photo's thumbnail URL. |
| `description` | The seller's description of the item. |
| `created_at` | When the item was listed (UTC). |
| `updated_at` | When the item was last updated (UTC). |
| `details` | `read` (the item's own detail call was read), `not_found` (deleted since the search) or `failed`: see the FAQ. |
| `results_found` | On a target row: the site's count for the search (it shows at most 15,000). |
| `verdict` | On a target row: COMPLETE (read to the end), CAPPED (`maxItemsPerSearch`), TRUNCATED (the site's 100-page depth under its count, or a list that ended under half its count) or PARTIAL (stopped: `note` says why). |
| `rows_delivered` | On a target row: the item rows it delivered. |
| `note` | Why a target row has the status or the verdict it has. |
| `scraped_at` | When this row was read (UTC). |

Example record:

```json
{
  "record_type": "item",
  "status": "ok",
  "input": "https://jp.mercari.com/en/search?keyword=watch",
  "id": "m95783950453",
  "url": "https://jp.mercari.com/item/m95783950453",
  "title": "SEIKO ソーラー チタン メンズ 腕時計",
  "price": 7300,
  "currency": "JPY",
  "sale_status": "on_sale",
  "sold": false,
  "condition": "目立った傷や汚れなし",
  "condition_en": "no noticeable scratches or stains",
  "condition_id": 3,
  "brand": "セイコータイムクリエーション",
  "category": "腕時計(クォーツ)",
  "category_id": 1731,
  "category_path": [
    "ファッション",
    "メンズ",
    "時計",
    "腕時計(アナログ)",
    "腕時計(クォーツ)"
  ],
  "shipping_payer": "seller",
  "shipping_payer_text": "送料込み(出品者負担)",
  "shipping_method": "らくらくメルカリ便",
  "shipping_from": "広島県",
  "shipping_days": "1~2日で発送",
  "likes": 2,
  "comments_count": 0,
  "seller_name": "Seller Name",
  "seller_id": "100000001",
  "seller_ratings": 908,
  "seller_star_rating": 5,
  "item_type": "personal",
  "photos": [
    "https://static.mercdn.net/item/detail/orig/photos/m95783950453_1.jpg?1792711572",
    "https://static.mercdn.net/item/detail/orig/photos/m95783950453_2.jpg?1792711572",
    "https://static.mercdn.net/item/detail/orig/photos/m95783950453_3.jpg?1792711572",
    "https://static.mercdn.net/item/detail/orig/photos/m95783950453_4.jpg?1792711572",
    "https://static.mercdn.net/item/detail/orig/photos/m95783950453_5.jpg?1792711572",
    "https://static.mercdn.net/item/detail/orig/photos/m95783950453_6.jpg?1792711572",
    "https://static.mercdn.net/item/detail/orig/photos/m95783950453_7.jpg?1792711572"
  ],
  "photo_count": 7,
  "thumbnail": "https://static.mercdn.net/thumb/item/jpeg/m95783950453_1.jpg?1792711572",
  "description": "光で駆動するソーラー機能を搭載し、軽量で肌に優しいチタン素材を採用した実用的な腕時計です。\n\n- ブランド: SEIKO\n- 素材: チタン\n- 機能: ソーラー\n- 表示方式: アナログ\n\n即購入OK・コメントなしOK\n素人保管のため神経質な方はご遠慮ください。3nでお願いします。\n\nご覧いただきありがとうございます。",
  "created_at": "2026-10-22T23:26:12Z",
  "updated_at": "2026-11-06T09:58:46Z",
  "details": "read",
  "results_found": null,
  "verdict": null,
  "rows_delivered": null,
  "note": null,
  "scraped_at": "2026-11-06T19:10:45Z"
}
```

### Pricing

**Pay for the items a run delivers**, plus one run start; no platform usage is billed to you. The item price falls with your Apify plan.

| event | unit | Free | Starter | Scale | Business |
|---|---|---|---|---|---|
| Item (`item`) | per 1,000 | $3.99 | $2.99 | $1.99 | $1.99 |
| Run start (`start`) | per run | $0.0028 | $0.0028 | $0.0028 | $0.0028 |

An item is **$3.99 per 1,000** on the Free plan ($0.00399 an item), with its detail call (condition and category names, shipping, the seller, every photo, the description) included. Each run that delivers a charged item also pays the **run start, $0.0028 once**; a run that delivers no charged item pays nothing at all. So one search of 100 items costs $0.4018 on the Free plan, and several searches in one run share one start. The free `target` row of every input, a value that is not a jp.mercari.com search, item or Mercari Shops product (`invalid_input`), an item the site does not know (`not_found`), a search with no match (`no_results`), an input left at the cap or the time limit (`not_read`) and a refusal the run could not pass (`failed`) are never charged. An item is charged once a run, also when several searches list it. A run that stops early (a timeout, an abort) is charged for the items it delivered. `maxItems` counts the charged rows; before the first request the log names the price of each row at your plan. Enterprise plans have their own rates: the Actor's Pricing tab shows the price for your plan.

### Usage patterns

- **Searches and items** — `searchTerms` takes words, one search a line, in Japanese or English. `startUrls` takes jp.mercari.com search URLs as your browser shows them (keyword, `status`, `price_min`, `price_max`, `item_condition_id`, `category_id`, `brand_id`, `shipping_payer_id`, `sort`, `order` are kept; the `/en/` pages too), item URLs (`/item/m…`) or bare `m…` ids, and Mercari Shops product URLs (`/shops/product/…`). Mercari Japan only.
- **What a row is** — `record_type` = `item`: one item, in the site's order, with the search card and the item's own detail call (`details` says whether that call was read). `record_type` = `target`: the free row of one input — `results_found` (the site's count, which it shows at most as 15,000), `rows_delivered`, the `verdict` and the `status` with its `note`.
- **How far a search goes** — `maxItemsPerSearch` (default 100; 0 = every item the site shows) stops each search after that many new items. The site shows a search at most 100 pages of 120 items, whatever its count; a run that reaches that end says TRUNCATED with the count, and a price band, a category or other words read more of it. `maxItems` caps the charged rows of the whole run.

### Input configuration

| field | type | default | what it does |
|---|---|---|---|
| `startUrls` | `array` | `[]` | jp.mercari.com search URLs (set the filters on the site, then copy the address: keyword, sold or on sale, price, condition, category, brand, sort are kept), item URLs (jp.mercari.com/item/m…, the /en/ pages too), Mercari Shops product URLs or bare item ids (m…). Plain words here are read as a search. |
| `searchTerms` | `array` | `[]` | Words to search for, one search each, in Japanese or English (for example ニンテンドースイッチ or nintendo switch). The filters below apply to them. |
| `status` | `all` / `on_sale` / `sold_out` | `"all"` | Items on sale, sold items (sold out and in trading, as the site's own filter), or all. A search URL's own status wins. |
| `priceMin` | `integer` | `0` | Only items priced at or above this many yen; 0 = no minimum. A search URL's own price_min wins. |
| `priceMax` | `integer` | `0` | Only items priced at or below this many yen; 0 = no maximum. A search URL's own price_max wins. |
| `maxItemsPerSearch` | `integer` | `100` | The most items each search delivers; 0 = every item the site shows (at most about 12,000 a search: 100 pages of 120). |
| `maxItems` | `integer` | `0` | The most charged rows of the whole run; 0 = no cap beyond your charge limit. |
| `feedback` | `string` |  | A note to the people who maintain this Actor: what you needed and did not get. For example a missing field, a wrong or empty result, or the Actor you switch from or to, and why. The run does not read it: the rows and the charges stay the same. A person reads every note. |

### Errors

**A run does not fail because of your input.** When an input cannot be used — a date that is not a date, an id in the wrong form, two settings that contradict each other — the run ends **Succeeded**, charges nothing, and says what to change:

- the status message starts with `INPUT REJECTED`;
- the dataset holds one row, `{"error": true, "code": "…", "message": "…"}`, and no results;
- the key-value store record `ERROR` holds the same object.

From code, check `error` on the first row before reading results.

A value that is not a jp.mercari.com search, item or Mercari Shops product (a member's page, Mercari US, another site) is not an error: it gets one free `target` row with `status` invalid_input that says why, and the run goes on with the others. A run that ends **Failed** is a fault on our side, never your input; it charges nothing, and we are alerted.

### FAQ

**Which status is which?**

A target row's `status` is `ok` (items served), `no_results` (the site lists nothing for the search; read on two connections), `not_found` (the site answers that the item does not exist; checked on two connections), `invalid_input` (not a jp.mercari.com search, item or Mercari Shops product), `failed` (the site refused every try; free) or `not_read` (left at `maxItems`, the charge limit or the run's time limit). An item row's `status` is `ok`.

**What does `details` not_found or failed mean?**

Each item of a search is also read on its own detail call. `not_found`: the item was deleted between the search and the read; `failed`: the call was not served after four tries. Both rows carry the search card's fields (the title, the price, sold or on sale, the condition id, the photos) and no seller name or likes.

**Does it need a Mercari account or an API key?**

No. Everything is read from what jp.mercari.com shows a visitor who is not logged in.

**Does it read Mercari US or a seller's reviews?**

No. It reads Mercari Japan (jp.mercari.com) searches and items. A Mercari US link and a member's page get a free `invalid_input` row.

**Do I need Apify Proxy or my own proxy?**

No. The Actor uses its own connections, at no extra cost to you.

### Integration

#### JavaScript

```javascript
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_TOKEN' });
const run = await client.actor('hyperbach/mercari-scraper').call({"startUrls": ["https://jp.mercari.com/search?keyword=apple%20watch"], "maxItemsPerSearch": 100});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

#### Python

```python
from apify_client import ApifyClient
client = ApifyClient('YOUR_TOKEN')
run = client.actor('hyperbach/mercari-scraper').call(run_input={'startUrls': ['https://jp.mercari.com/search?keyword=apple%20watch'], 'maxItemsPerSearch': 100})
items = client.dataset(run['defaultDatasetId']).list_items().items
```

#### CLI

```bash
apify call hyperbach/mercari-scraper --input '{"startUrls": ["https://jp.mercari.com/search?keyword=apple%20watch"], "maxItemsPerSearch": 100}'
```

#### REST

```bash
curl -X POST "https://api.apify.com/v2/acts/hyperbach~mercari-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H 'Content-Type: application/json' -d '{"startUrls": ["https://jp.mercari.com/search?keyword=apple%20watch"], "maxItemsPerSearch": 100}'
```

#### AI agents and MCP

Apify's MCP server offers this Actor as a tool to Claude, Cursor, VS Code and any other MCP client. Connect `https://mcp.apify.com?tools=hyperbach/mercari-scraper` and ask, for example: "Get the first 100 Mercari Japan listings for apple watch with price, condition, likes and seller". The agent fills the input from the table above and reads the rows from the run's dataset. A field under the name another Actor gives it is read as this Actor's own: `urls`, `url`, `links`, `searchUrls` as `startUrls`; `keyword`, `queries`, `keywords`, `searchQueries` as `searchTerms`; `statuses`, `itemStatus` as `status`; `minPrice`, `price_min` as `priceMin` (and more). An agent or a person can add `feedback` to any run and say what was needed and not delivered: a missing field, a wrong or empty result, the Actor switched from or to, and why. The run returns the same rows at the same price, and a person reads every note.

#### n8n, Make and Zapier

The Apify node in n8n, the Apify app in Make and the Apify integration in Zapier run this Actor on a schedule or from a trigger and read its dataset. A webhook on the run's end (Integrations on the Actor page) sends the rows on to your own endpoint. Nothing to install on our side.

### Support

**Disagree with a charge?** Write to apify@hyperbach.com with the run ID. We will ask Apify to compensate you, and the charge comes back to your Apify account as platform credit.

**Did it do the job?** A short [review on the Store](https://apify.com/hyperbach/mercari-scraper/reviews), at any rating, helps the next buyer choose.

### See also

- **[Facebook Marketplace Scraper](https://apify.com/hyperbach/facebook-marketplace-scraper)** — Marketplace listings by search, category and city: the price, the date listed and the seller, and on request the description and the vehicle facts.
- **[Avito Scraper](https://apify.com/hyperbach/avito-scraper)** — Avito.ru listings by search words, category or URL, with the price, the city, the seller type and the images.
- **[Kleinanzeigen Scraper](https://apify.com/hyperbach/kleinanzeigen-scraper)** — Kleinanzeigen.de listings by search words and place, with the price, the postcode, the seller type and shipping.
- **[AutoScout24 Scraper](https://apify.com/hyperbach/autoscout24-scraper)** — AutoScout24 car listings in eight European markets by make, model and place, with the price, mileage, first registration and the dealer.
- **[Leboncoin Scraper](https://apify.com/hyperbach/leboncoin-scraper)** — Leboncoin.fr listings by search words, category and place or by URL, with the price, the postcode, the seller type and the images.
- **[AutoTrader.ca Scraper](https://apify.com/hyperbach/autotrader-ca-scraper)** — AutoTrader.ca car listings by search URL, make and model around a Canadian city or listing URL, with the price, mileage, year, trim, the VIN where shown and the dealer or private seller.

*This page is generated from the Actor's schemas and a live sample — it cannot describe a field the Actor does not have.*

# Actor input Schema

## `startUrls` (type: `array`):

jp.mercari.com search URLs (set the filters on the site, then copy the address: keyword, sold or on sale, price, condition, category, brand, sort are kept), item URLs (jp.mercari.com/item/m…, the /en/ pages too), Mercari Shops product URLs or bare item ids (m…). Plain words here are read as a search.

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

Words to search for, one search each, in Japanese or English (for example ニンテンドースイッチ or nintendo switch). The filters below apply to them.

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

Items on sale, sold items (sold out and in trading, as the site's own filter), or all. A search URL's own status wins.

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

Only items priced at or above this many yen; 0 = no minimum. A search URL's own price_min wins.

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

Only items priced at or below this many yen; 0 = no maximum. A search URL's own price_max wins.

## `maxItemsPerSearch` (type: `integer`):

The most items each search delivers; 0 = every item the site shows (at most about 12,000 a search: 100 pages of 120).

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

The most charged rows of the whole run; 0 = no cap beyond your charge limit.

## `feedback` (type: `string`):

A note to the people who maintain this Actor: what you needed and did not get. For example a missing field, a wrong or empty result, or the Actor you switch from or to, and why. The run does not read it: the rows and the charges stay the same. A person reads every note.

## Actor input object example

```json
{
  "startUrls": [
    "https://jp.mercari.com/en/search?keyword=watch"
  ],
  "searchTerms": [],
  "status": "all",
  "priceMin": 0,
  "priceMax": 0,
  "maxItemsPerSearch": 50,
  "maxItems": 50
}
```

# Actor output Schema

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

All scraped records in the default dataset. One row per item (and one free summary row per input):

## `runSummary` (type: `string`):

How the run went: item rows charged, free rows, inputs by status, the walk per input (items delivered, the site's count, pages read, the verdict), the source counters (calls, served, refused, exits, rotations, bytes) and the memory watch.

# 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 = {
    "startUrls": [
        "https://jp.mercari.com/en/search?keyword=watch"
    ],
    "maxItemsPerSearch": 50,
    "maxItems": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("hyperbach/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 = {
    "startUrls": ["https://jp.mercari.com/en/search?keyword=watch"],
    "maxItemsPerSearch": 50,
    "maxItems": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("hyperbach/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 '{
  "startUrls": [
    "https://jp.mercari.com/en/search?keyword=watch"
  ],
  "maxItemsPerSearch": 50,
  "maxItems": 50
}' |
apify call hyperbach/mercari-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,hyperbach/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/Kyi7BtaAXsT7gSrpH/builds/nDdjMOk94hfL1qgDv/openapi.json
