# Mercari Product Listings Scraper

This template extracts product listing information (such as price, product name, and product URL) from Mercari using search keywords.

- Template page: [https://www.octoparse.com/template/mercari-keyword-product-listings-scraper](https://www.octoparse.com/template/mercari-keyword-product-listings-scraper)
- Categories: E-Commerce
- Status: `PUBLISHED`
- Run mode: `CLOUD`

## Pricing

Current price: **$0.06/1,000 lines**. Billing is based on output rows; an Octoparse subscription may be required.

## What is an Octoparse template?

An Octoparse template is a ready-to-use scraping workflow with predefined inputs and structured outputs. Use the exact parameter keys below; do not invent parameters.

## Overview

This ready-to-use template collects structured data from search-results pages.

## Output

The current workflow extracts 5 fields, including `キーワード`, `商品URL`, `商品名`, `画像URL`, `販売価格`.

## Use Cases

- Use structured results for research, comparison, and monitoring.
- Collect rows without building the extraction workflow from scratch.
- Combine results with other templates for downstream enrichment.
- Review a representative result before starting a large batch.

## Why Octoparse

- **No coding required:** complete Keywords (up to 250 per run), Number of pages (1~100) and start the template in cloud mode.
- **Flexible export:** review and export results as CSV, Excel, or JSON.

## Input

### Keywords (up to 250 per run)

Required. 搜索关键词 Constraints: minItems=1; maxItems=250; items.minLength=1; items.maxLength=10000.

### Number of pages (1~100)

Required. 页数 Constraints: minimum=1, maximum=100.

## How to Use

# Mercari Product Listings Scraper

## Overview
Collects product listing info from Mercari using search keywords. Source: https://jp.mercari.com/

## Pricing
- **$0.05 / 1,000 lines**
- Billing is based on the number of output lines produced by the task.

## Inputs
- **Keywords (up to 250 per run)** (required): one or more values, one per line.
- **Number of pages (1–100)** (required): enter a number from 1 to 100.

## Output Fields
- `キーワード`
- `商品名`
- `商品URL`
- `販売価格`
- `画像URL`

Fields can be empty when the source record does not provide them.

## How to Use
1. Open the template and select **Try it** or **Start**.
2. Complete the input fields.
3. Run the task in the cloud.
4. Review the output rows and export or process the structured data.

## Limitations
- Collects only the fields listed above from listing pages; it does not add data that Mercari does not display.
- `商品URL`, `販売価格`, and `画像URL` can be empty when the source record does not provide them.

## Tips
- Start with one or a few inputs and review the returned rows before scaling.
- Use specific valid keywords (up to 250 per run) to reduce unrelated or duplicate records.
- Use a stable URL or identifier from `キーワード`, `商品名`, `商品URL`, `販売価格`, or `画像URL` as the deduplication key when available.

## Scheduling and API Access
- Schedule recurring runs in the cloud and export collected data.
- Reuse data through Octoparse OpenAPI or the [AgentTools API](https://www.octoparse.com/docs/en/api-reference/agenttools-api/search-templates).
- Scheduling and API access may require a paid Octoparse plan.

## Limitations

Results depend on what the source site exposes at run time. Fields may be empty when a source page does not provide a value. The template enforces the input limits shown above.

## Tips

Use specific, valid inputs and review a representative result before starting a large batch. Remove duplicate inputs when repeated records are not needed.

## FAQ

### What do I need to enter?

Use the exact inputs and limits listed above.

### What data does this template return?

See Output Schema below; availability can vary by source record.

### How is usage billed?

See the Pricing section above for current pricing and billing details.

## Related Templates

- [Mercari Product Details Scraping by URL](https://www.octoparse.com/template/mercari-url-based-product-listing-scraper)
- [Mercari Product Details Scraping by URL (Cloud Only)](https://www.octoparse.com/template/mercari-product-detail-url-scraper-cloud)
- [Google Maps Listings Scraper (by Keywords)](https://www.octoparse.com/template/google-maps-scraper-listing-page-by-keyword)
- [Google Maps Listings Scraper (by URLs)](https://www.octoparse.com/template/google-maps-scraper-listing-page-by-url)
- [Booking Japan Listings Scraper](https://www.octoparse.com/template/booking-com-hotel-listings-scraper)

## Input Schema

```json
{
  "title": "Mercari Product Listings Scraper input",
  "description": "Input parameters configured for the current published template version.",
  "type": "object",
  "schemaVersion": 1,
  "additionalProperties": false,
  "properties": {
    "keywords": {
      "title": "Keywords (up to 250 per run)",
      "description": "搜索关键词",
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 10000
      },
      "minItems": 1,
      "maxItems": 250,
      "x-octoparse": {
        "apiEnabled": true
      }
    },
    "number_of_pages": {
      "title": "Number of pages (1~100)",
      "description": "页数",
      "type": "integer",
      "minimum": 1,
      "maximum": 100,
      "x-octoparse": {
        "apiEnabled": true
      }
    }
  },
  "required": [
    "keywords",
    "number_of_pages"
  ]
}
```

## Input JSON Example

Example 1

```json
{
  "keywords": [
    "漫画",
    "化粧品"
  ],
  "number_of_pages": 30.0
}
```

Example 2

```json
{
  "keywords": [
    "漫画",
    "化粧品"
  ],
  "number_of_pages": 30.0
}
```

Example 3

```json
{
  "keywords": [
    "漫画",
    "化粧品"
  ],
  "number_of_pages": 30.0
}
```

Example 4

```json
{
  "keywords": [
    "漫画",
    "化粧品"
  ],
  "number_of_pages": 30.0
}
```

Example 5

```json
{
  "keywords": [
    "漫画",
    "化粧品"
  ],
  "number_of_pages": 30.0
}
```


## Output Schema

```json
{
  "schemaVersion": 1,
  "type": "object",
  "properties": {
    "キーワード": {
      "type": "string",
      "description": ""
    },
    "商品URL": {
      "type": "string",
      "description": ""
    },
    "商品名": {
      "type": "string",
      "description": ""
    },
    "画像URL": {
      "type": "string",
      "description": ""
    },
    "販売価格": {
      "type": "string",
      "description": ""
    }
  },
  "title": "Mercari Product Listings Scraper output",
  "description": "Initial output fields derived from the current published implementation. Field descriptions are maintained by Data Center; production field names and types should be refreshed from recent successful runs.",
  "additionalProperties": false
}
```

## Output Example

Example 1

```json
{
  "キーワード": "化粧品",
  "商品URL": "https://jp.mercari.com/item/m72771496520",
  "商品名": "キュレル ジェルメイク落とし 130g",
  "画像URL": "https://static.mercdn.net/thumb/item/webp/m72771496520_1.jpg?1795441672",
  "販売価格": "¥1,000"
}
```

Example 2

```json
{
  "キーワード": "化粧品",
  "商品URL": "https://jp.mercari.com/item/m89535065401",
  "商品名": "KANEBO CREAM IN DAY SPF30",
  "画像URL": "https://static.mercdn.net/thumb/item/webp/m89535065401_1.jpg?1793775868",
  "販売価格": "¥3,900"
}
```

Example 3

```json
{
  "キーワード": "漫画",
  "商品URL": "https://jp.mercari.com/item/m14524607256",
  "商品名": "人妻とＪK 二巻セット",
  "画像URL": "https://static.mercdn.net/thumb/item/webp/m14524607256_1.jpg?1794993609",
  "販売価格": "¥600"
}
```

Example 4

```json
{
  "キーワード": "化粧品",
  "商品URL": "https://jp.mercari.com/item/m57905073697",
  "商品名": "ORLANE B21 エクストラオーディネール",
  "画像URL": "https://static.mercdn.net/thumb/item/webp/m57905073697_1.jpg?1794737348",
  "販売価格": "¥3,800"
}
```

Example 5

```json
{
  "キーワード": "化粧品",
  "商品URL": "https://jp.mercari.com/item/m80173432654",
  "商品名": "オイズPBジェル 200g 美容液",
  "画像URL": "https://static.mercdn.net/thumb/item/webp/m80173432654_1.jpg?1792286346",
  "販売価格": "¥1,500"
}
```

## API

`POST https://openapi.octoparse.com/api/agentTools/executeTask`

This is the OpenAPI Agent Tools `executeTask` endpoint. Authenticate with a Bearer token.

Request body:

`templateName` is the template slug; `parameters` is a JSON object string whose keys match Input Schema; `taskName`, `idempotencyKey`, and `maxCollectedRows` are optional.

Obtain a token:

```http
POST https://openapi.octoparse.com/token
Content-Type: application/json

{
  "username": "YOUR_USERNAME",
  "password": "YOUR_PASSWORD",
  "grant_type": "password"
}
```

Use `data.access_token` as `Authorization: Bearer <token>`. After starting, poll `getTaskStatus` and export with `exportData`.

```json
{
  "templateName": "mercari-keyword-product-listings-scraper",
  "taskName": "Mercari Product Listings Scraper",
  "parameters": "{\"keywords\":[\"漫画\",\"化粧品\"],\"number_of_pages\":30.0}"
}
```

## Python Example

```python
import json
import requests

OPENAPI_BASE = "https://openapi.octoparse.com"
ACCESS_TOKEN = "YOUR_ACCESS_TOKEN"

parameters = json.loads("{\"keywords\":[\"漫画\",\"化粧品\"],\"number_of_pages\":30.0}")

response = requests.post(
    f"{OPENAPI_BASE}/api/agentTools/executeTask",
    headers={
        "Authorization": f"Bearer {ACCESS_TOKEN}",
        "Content-Type": "application/json",
    },
    json={
        "templateName": "mercari-keyword-product-listings-scraper",
        "taskName": "Mercari Product Listings Scraper",
        "parameters": json.dumps(parameters, ensure_ascii=False),
    },
    timeout=60,
)
print(response.status_code)
print(response.json())
```

## HTTP/cURL Example

```bash
curl -X POST "https://openapi.octoparse.com/api/agentTools/executeTask" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "templateName": "mercari-keyword-product-listings-scraper",
  "taskName": "Mercari Product Listings Scraper",
  "parameters": "{\"keywords\":[\"漫画\",\"化粧品\"],\"number_of_pages\":30.0}"
}
JSON
```

## MCP Setup

Connect an MCP-compatible AI client to `https://mcp.octoparse.com` using browser OAuth or an Octoparse API key. Find `mercari-keyword-product-listings-scraper`, inspect its inputs, create a cloud task with the exact Input Schema keys, and export JSON results.

## Machine-readable Resources

- [Template contract](https://www.octoparse.com/templates/mercari-keyword-product-listings-scraper.json)
- [Manifest](https://www.octoparse.com/templates/mercari-keyword-product-listings-scraper-manifest.json)
