# Mercari Japan Scraper (`cloud9_ai/mercari-scraper`) Actor

Scrape product listings, prices, and sold items from Mercari Japan marketplace. Search by keyword, filter by status (on sale/sold out), price range, and item condition. Track actual selling prices for resale research and market analysis.

- **URL**: https://apify.com/cloud9\_ai/mercari-scraper.md
- **Developed by:** [cloud9](https://apify.com/cloud9_ai) (community)
- **Categories:** E-commerce, Lead generation
- **Stats:** 50 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $50.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 Scraper

Scrape product listings, prices, and sold items from [Mercari Japan](https://jp.mercari.com/) -- Japan's largest consumer-to-consumer marketplace.

### Key Features

- **Search by keywords** -- Find products matching any query on Mercari Japan
- **Sold item tracking** -- View actual selling prices for resale research (物販リサーチ)
- **Price range filtering** -- Narrow results by minimum/maximum price in JPY
- **Item condition filtering** -- Filter by new, like-new, good, fair, or poor condition
- **Flexible sorting** -- Sort by relevance, price, or newest listings
- **Direct URL scraping** -- Scrape individual product pages for full details
- **Automatic pagination** -- Collect up to 1,000 items per run

### Why Track Sold Items?

For resellers and market researchers, knowing the **actual selling price** is more valuable than the listing price. Set `status` to `sold_out` to see completed transactions and understand real market value.

### Input Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `searchKeywords` | string\[] | Yes\* | -- | Keywords to search for |
| `productUrls` | string\[] | Yes\* | -- | Direct Mercari product URLs |
| `status` | string | No | `all` | `all`, `on_sale`, or `sold_out` |
| `sortBy` | string | No | `relevance` | `relevance`, `price_asc`, `price_desc`, `created_desc` |
| `priceMin` | integer | No | -- | Minimum price in JPY |
| `priceMax` | integer | No | -- | Maximum price in JPY |
| `itemCondition` | string | No | `all` | `all`, `new`, `like_new`, `good`, `fair`, `poor` |
| `maxResults` | integer | No | `50` | Max items to scrape (1-1000) |

\*At least one of `searchKeywords` or `productUrls` is required.

### Output Fields

Each scraped item includes:

| Field | Type | Description |
|-------|------|-------------|
| `productId` | string | Mercari item ID |
| `title` | string | Product title |
| `price` | number | Price in JPY |
| `url` | string | Full product URL |
| `imageUrl` | string | Primary image URL |
| `thumbnails` | string\[] | All thumbnail URLs |
| `status` | string | Item status (on\_sale / sold\_out) |
| `isSold` | boolean | Whether the item has been sold |
| `condition` | string | Item condition |
| `description` | string | Full description (product pages only) |
| `sellerName` | string | Seller display name |
| `sellerRating` | number | Seller rating score |
| `categoryName` | string | Product category |
| `brandName` | string | Brand name |
| `shippingPayer` | string | Who pays shipping |
| `shippingMethod` | string | Shipping method (product pages only) |
| `likeCount` | number | Number of likes |
| `commentCount` | number | Number of comments |
| `updatedAt` | string | Last update timestamp |
| `scrapedAt` | string | When the data was scraped |

### Example Usage

#### Search for Nintendo Switch listings

```json
{
  "searchKeywords": ["Nintendo Switch"],
  "status": "on_sale",
  "sortBy": "price_asc",
  "priceMax": 30000,
  "maxResults": 100
}
```

#### Research sold prices for iPhone 15

```json
{
  "searchKeywords": ["iPhone 15"],
  "status": "sold_out",
  "sortBy": "created_desc",
  "maxResults": 200
}
```

#### Scrape specific product pages

```json
{
  "productUrls": [
    "https://jp.mercari.com/item/m12345678",
    "https://jp.mercari.com/item/m87654321"
  ]
}
```

### Proxy Requirements

This actor uses datacenter proxies (BUYPROXIES94952) with Japan IP addresses by default. If datacenter proxies are unavailable, it falls back to residential proxies. Mercari Japan may block non-Japanese IP addresses.

### Pricing

**$4 per 1,000 items** scraped.

### Limitations

- Mercari may limit search results to approximately 600 items per query
- Heavy scraping may trigger rate limiting or CAPTCHA challenges
- Some fields (description, shippingMethod) are only available on individual product pages
- Results depend on Mercari's page structure; changes to the site may temporarily affect data extraction

# Actor input Schema

## `searchKeywords` (type: `array`):

Keywords to search for on Mercari Japan (e.g., 'Nintendo Switch', 'iPhone 15')

## `productUrls` (type: `array`):

Direct Mercari product URLs to scrape (e.g., https://jp.mercari.com/item/m12345678)

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

Filter by item status. Use 'sold\_out' to see actual selling prices (useful for resale research / 物販リサーチ)

## `sortBy` (type: `string`):

Sort order for search results

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

Minimum price filter in Japanese Yen

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

Maximum price filter in Japanese Yen

## `itemCondition` (type: `string`):

Filter by item condition

## `maxResults` (type: `integer`):

Maximum number of items to scrape (default: 50, max: 1000)

## Actor input object example

```json
{
  "searchKeywords": [
    "Nintendo Switch",
    "iPhone 15"
  ],
  "productUrls": [
    "https://jp.mercari.com/item/m12345678"
  ],
  "status": "all",
  "sortBy": "relevance",
  "priceMin": 1000,
  "priceMax": 50000,
  "itemCondition": "all",
  "maxResults": 10
}
```

# 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 = {
    "searchKeywords": [
        "Nintendo Switch"
    ],
    "status": "all",
    "sortBy": "relevance",
    "maxResults": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("cloud9_ai/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 = {
    "searchKeywords": ["Nintendo Switch"],
    "status": "all",
    "sortBy": "relevance",
    "maxResults": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("cloud9_ai/mercari-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 '{
  "searchKeywords": [
    "Nintendo Switch"
  ],
  "status": "all",
  "sortBy": "relevance",
  "maxResults": 10
}' |
apify call cloud9_ai/mercari-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

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