# 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
- **Features:** Limited permissions
- **Stats:** 54 total users, 1 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/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

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(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 '{
  "searchKeywords": [
    "Nintendo Switch"
  ],
  "status": "all",
  "sortBy": "relevance",
  "maxResults": 10
}' |
apify call cloud9_ai/mercari-scraper --silent --output-dataset

```

## MCP server setup

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