# Mercari Marketplace & Resale Scraper (`wyle/mercari-scraper`) Actor

Fast, HTTP-only scraper for Mercari. Extract secondhand products, resale prices, condition grades, seller metadata, and image galleries using automated ES256 DPoP cryptographic signing.

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

## Pricing

from $1.50 / 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?

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 Marketplace & Resale Scraper

Ultra-fast, HTTP-only Apify Actor to scrape secondhand products, resale prices, collectibles, fashion, and electronics from **Mercari**.

***

### 🌟 Key Features

- ⚡ **HTTP-Only with RFC 9449 DPoP Signing**: Automatically generates on-the-fly ECDSA P-256 (ES256) DPoP JWT proofs to query Mercari internal search endpoints directly with zero browser overhead.
- 🏷️ **Rich Product Attributes**: Extracts Item Name, Price (JPY), Status (On Sale / Sold Out), Condition Rating (New, Like New, Good, Fair), Brand Name, Category, Seller ID, Created/Updated Timestamps, and High-Resolution Photo Galleries.
- 🎯 **Advanced Search & Filtering**: Filter by custom keywords, price min/max, sort orders (Newest, Best Match, Price Low-High), and availability.
- 🔄 **Automated Token-Based Pagination**: Transparently handles cursor pagination across thousands of listings.
- 🤖 **AI-Ready Output Schema**: Standardized Apify dataset schema formatted for e-commerce arbitrage bots, market intelligence, and resale valuation models.

***

### 📥 Input Parameters

| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| `keywords` | Array | No | Search query keywords | `["pokemon card", "nintendo switch"]` |
| `status` | String | No | Filter availability: `on_sale`, `sold_out`, `all` | `"on_sale"` |
| `sortBy` | String | No | Sort order (`score`, `created_time`, `price_asc`, `price_desc`) | `"score"` |
| `minPrice` | Integer | No | Minimum price in JPY | `1000` |
| `maxPrice` | Integer | No | Maximum price in JPY | `50000` |
| `maxItems` | Integer | No | Max items to scrape (Default: `60`) | `100` |
| `pageSize` | Integer | No | Batch size per API page (Default: `30`) | `30` |
| `proxyConfiguration` | Object | No | Apify proxy configuration | `{ "useApifyProxy": true }` |

***

### 📤 Sample Output JSON

```json
{
  "itemId": "m38289897301",
  "url": "https://jp.mercari.com/item/m38289897301",
  "name": "一番くじ ポケモン C賞 30周年 ミジュマル ぬいぐるみ",
  "price": 2300,
  "priceCurrency": "JPY",
  "status": "ITEM_STATUS_ON_SALE",
  "isSoldOut": false,
  "itemCondition": "New, unused (新品、未使用)",
  "brand": null,
  "sellerId": "342521310",
  "categoryId": "980",
  "thumbnails": [
    "https://static.mercdn.net/thumb/item/webp/m38289897301_1.jpg?1787495309"
  ],
  "photos": [
    "https://static.mercdn.net/item/detail/webp/photos/m38289897301_1.jpg?1787495309"
  ],
  "createdTimestamp": 1787495309,
  "createdIso": "2026-08-23T14:28:29Z",
  "updatedTimestamp": 1787661040,
  "updatedIso": "2026-08-25T12:30:40Z",
  "searchKeyword": "pokemon card"
}
```

# Actor input Schema

## `keywords` (type: `array`):

Keywords or product queries to search on Mercari (e.g. 'pokemon card', 'nintendo switch', 'vintage levis', 'g-shock').

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

Filter by item availability status.

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

Sorting order for listings.

## `minPrice` (type: `integer`):

Minimum item price in JPY.

## `maxPrice` (type: `integer`):

Maximum item price in JPY.

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

Maximum total items to push to the dataset.

## `pageSize` (type: `integer`):

Number of items per internal API page.

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

Proxy settings. Apify Datacenter or Residential proxy supported.

## Actor input object example

```json
{
  "keywords": [
    "pokemon card",
    "nintendo switch"
  ],
  "status": "on_sale",
  "sortBy": "score",
  "maxItems": 60,
  "pageSize": 30
}
```

# Actor output Schema

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

Dataset containing scraped Mercari items.

# 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 = {
    "keywords": [
        "pokemon card",
        "nintendo switch"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("wyle/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 = { "keywords": [
        "pokemon card",
        "nintendo switch",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("wyle/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 '{
  "keywords": [
    "pokemon card",
    "nintendo switch"
  ]
}' |
apify call wyle/mercari-scraper --silent --output-dataset

```

## MCP server setup

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