# Mercari Category URL Scraper (`morkerr/mercari-category-url`) Actor

Extract every Mercari US category with name, URL, and ID across all 3 levels (L1, L2, L3). Perfect for building sitemaps, product feeds, category-based scraping, and marketplace analytics. Powered by Playwright with residential proxy support.

- **URL**: https://apify.com/morkerr/mercari-category-url.md
- **Developed by:** [morkerr](https://apify.com/morkerr) (community)
- **Categories:** Automation, Other, SEO tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.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.

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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use 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 Category Scraper — Extract All Categories

<p align="center">
  <a href="https://morkerr.com">
    <img src="https://img.shields.io/badge/🛒_Mercari_Scraper_Chrome_Extension-Free_Download-morkerr.com?style=for-the-badge&logo=googlechrome&logoColor=white&color=FF6B35" alt="Mercari Scraper Chrome Extension">
  </a>
  &nbsp;
  <a href="https://morkerr.com">
    <img src="https://img.shields.io/badge/🔧_Mercari_Product_Scraper-Get_Started-4A90D9?style=for-the-badge" alt="Mercari Product Scraper">
  </a>
  &nbsp;
  <a href="https://morkerr.com">
    <img src="https://img.shields.io/badge/📊_Mercari_Price_Tracker-Learn_More-00B4D8?style=for-the-badge" alt="Mercari Price Tracker">
  </a>
</p>

---

<br>

> ### 🛒 Try the Free Mercari Scraper Chrome Extension
>
> **Inspect any Mercari page — categories, products, prices, seller data — right inside your browser.**
>
> | What you get | Why it helps |
> |---|---|
> | 🔍 **One-click category inspection** | See hidden IDs, URLs, and metadata on any Mercari page |
> | 📋 **Export any page as JSON/CSV** | Grab product data without writing a single line of code |
> | ⚡ **Works alongside this actor** | Use the extension to spot-check while the actor handles bulk extraction |
>
> → **[Download for Free at morkerr.com »](https://morkerr.com)**

<br>

Extract Mercari.com's complete 3-level category hierarchy — including category IDs, names, and URLs for Main Categories (L1) and Sub Categories (L2/L3) — in one clean, structured dataset.

<br>

<p align="center">
  <b>Built by <a href="https://morkerr.com">morkerr.com</a></b> — marketplace automation tools for developers, dropshippers, and e-commerce pros.
</p>

---

### What This Actor Does

Most Mercari scrapers (product scrapers, listing scrapers, price trackers) require a category URL as their starting input. Finding and copying hundreds of category URLs manually is slow and error-prone.

This actor solves that problem. It crawls Mercari.com and extracts every category across all three levels of its taxonomy, giving you a ready-to-use dataset of category URLs, IDs, and names. Feed the output directly into other scrapers to automate category-based scraping across the entire site, or use it to build your own category-to-product pipeline.

---

### Output Data

Each result includes:

| Column | Description | Example |
|--------|-------------|---------|
| `mainCategoryNameL1` | Name of the top-level category | `Women` |
| `mainCategoryUrlL1` | Direct URL to the top-level category page | `https://www.mercari.com/us/category/women-1/` |
| `mainCategoryIdL1` | Unique ID of the top-level category | `1` |
| `subCategoryNameL2` | Name of the second-level subcategory | `Women's Handbags` |
| `subCategoryUrlL2` | Direct URL to the second-level subcategory page | `https://www.mercari.com/us/category/women-s-handbags-21/` |
| `subCategoryIdL2` | Unique ID of the second-level subcategory | `21` |
| `subCategoryNameL3` | Name of the third-level subcategory | `Shoulder Bags` |
| `subCategoryUrlL3` | Direct URL to the third-level subcategory page | `https://www.mercari.com/us/category/shoulder-bags-217/` |
| `subCategoryIdL3` | Unique ID of the third-level subcategory | `217` |

Data is available in JSON, CSV, Excel, or HTML table format, and can be accessed via the Apify API for direct integration into your own workflows.

---

### Who This Is For

- Developers building Mercari product/listing scrapers who need category URLs as input
- Market researchers analyzing Mercari's category structure and taxonomy
- Businesses building category-based monitoring, pricing, or resale tools
- Anyone automating a full-site crawl of Mercari that needs to loop through every category systematically

---

### How To Use

1. Click **Run** — no input configuration required. The actor uses residential proxy via Apify and a headless Playwright browser to load the page.
2. The actor loads `https://www.mercari.com/us/browse-categories/` and extracts the full category tree (3,183+ categories) from Mercari's internal cached data — no tedious page-by-page crawling.
3. Download the results from the **Dataset** tab or connect the output directly to another actor/scraper as its input source.

---

### Why Use This Actor Instead of Scraping Categories Yourself

- Saves hours of manual URL collection
- Captures the full 3-level hierarchy in one run, not just top-level categories
- Structured, consistent output ready to plug into other pipelines
- Regularly maintained to reflect Mercari's current category structure

---

### Use Cases

- **Pipeline seeding** — Use category URLs as input for a Mercari product scraper to extract listings at scale
- **Full-site scraping** — Loop through every returned category URL to scrape the entire marketplace systematically
- **Market research** — Analyze how Mercari organizes and segments its marketplace
- **Competitive monitoring** — Track category structure changes over time

---

### FAQ

**Does this actor scrape product listings or prices?**  
No. This actor extracts category structure only (IDs, names, URLs). For product/listing data, use a dedicated Mercari product scraper with the category URLs from this actor as input.

**Do I need any input to run this?**  
No input is required by default — the actor will crawl and return the full category tree automatically.

**Can I get only specific categories?**  
Yes, the actor supports filtering to a specific starting category if you don't need the full hierarchy.

**How often is category data updated?**  
Category structures rarely change, but the actor is maintained to stay in sync with Mercari.com's live site.

---

<br>

<p align="center">
  <a href="https://morkerr.com">
    <img src="https://img.shields.io/badge/🛒_Mercari_Scraper_Chrome_Extension-Free_Download-morkerr.com?style=for-the-badge&logo=googlechrome&logoColor=white&color=FF6B35" alt="Mercari Scraper Chrome Extension">
  </a>
</p>

<p align="center">
  <b>More from <a href="https://morkerr.com">morkerr.com</a></b>
</p>

| Tool | What it does | Link |
|------|-------------|------|
| 🛒 **Mercari Scraper Chrome Extension** | Inspect categories & products directly in your browser — free | [Download →](https://morkerr.com) |
| 🔧 **Custom Mercari Product Scraper** | Full product-level scraping with search, filters, pricing, images, seller data | [Learn more →](https://morkerr.com) |
| 📊 **Mercari Price Tracker** | Monitor price changes, set alerts, track historical trends across categories | [Learn more →](https://morkerr.com) |
| 🤖 **Multi-Platform Automation** | Schedule runs, webhooks, Slack/Telegram alerts for Mercari + other marketplaces | [Contact us →](https://morkerr.com) |

<br>

---

<p align="center">
  <b>Built by <a href="https://morkerr.com">morkerr.com</a></b><br>
  <i>Marketplace data tools for developers and e-commerce pros.</i>
</p>

# Actor input Schema

## `proxy` (type: `object`):

Use Apify proxy to avoid blocking

## Actor input object example

```json
{
  "proxy": {
    "useApifyProxy": true
  }
}
````

# Actor output Schema

## `mainCategoryNameL1` (type: `string`):

Top-level main category name (e.g., Women, Men, Kids, Electronics)

## `mainCategoryUrlL1` (type: `string`):

Full URL to the L1 category page on Mercari

## `mainCategoryIdL1` (type: `string`):

Numeric ID of the L1 category used in Mercari's API and URLs

## `subCategoryNameL2` (type: `string`):

Second-level subcategory name (e.g., Women's Handbags, Men's Sneakers)

## `subCategoryUrlL2` (type: `string`):

Full URL to the L2 category page on Mercari

## `subCategoryIdL2` (type: `string`):

Numeric ID of the L2 subcategory

## `subCategoryNameL3` (type: `string`):

Leaf-level category name (e.g., Shoulder Bags, Running Shoes). Empty if no L3 exists.

## `subCategoryUrlL3` (type: `string`):

Full URL to the L3 leaf category page. Empty if no L3 exists.

## `subCategoryIdL3` (type: `string`):

Numeric ID of the L3 leaf category

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("morkerr/mercari-category-url").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("morkerr/mercari-category-url").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 '{}' |
apify call morkerr/mercari-category-url --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Mercari Category URL Scraper",
        "description": "Extract every Mercari US category with name, URL, and ID across all 3 levels (L1, L2, L3). Perfect for building sitemaps, product feeds, category-based scraping, and marketplace analytics. Powered by Playwright with residential proxy support.",
        "version": "1.0",
        "x-build-id": "svNAfXGI09CmMQFSx"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/morkerr~mercari-category-url/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-morkerr-mercari-category-url",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/morkerr~mercari-category-url/runs": {
            "post": {
                "operationId": "runs-sync-morkerr-mercari-category-url",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/morkerr~mercari-category-url/run-sync": {
            "post": {
                "operationId": "run-sync-morkerr-mercari-category-url",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "proxy": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Use Apify proxy to avoid blocking",
                        "default": {
                            "useApifyProxy": true
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
