# Mercari Scraper – Live Thrift Resale Data (`b2b_leads/mercari-real-time-data-scraper`) Actor

Live Mercari resale intelligence for thrift, vintage & streetwear resellers. Keyword search, full listing details, closet inventory, seller stats, sold comps & URL scrape — streamed as structured JSON in real time. Free plan: 2 results per run; paid plans unlimited.

- **URL**: https://apify.com/b2b\_leads/mercari-real-time-data-scraper.md
- **Developed by:** [Emmanuel](https://apify.com/b2b_leads) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 1 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.

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 Real-Time Data — live resale market intelligence, thrift price comps, closet inventory, and vintage deal finder

**Mercari Real-Time Data** turns Mercari into a live pricing feed for fashion resellers. Search any thrift, vintage, or streetwear keyword and stream structured, ready-to-analyze data — prices, brands, sizes, condition, likes, seller stats, sold comps — straight into your dataset in real time. Whether you flip vintage single-stitch tees, hunt gorpcore fleece under retail, or run pricing models across marketplaces, this Actor gives you the market picture in seconds.

> ⚠️ **Free plan notice:** on a free Apify plan, runs are limited to **2 items** per run. Upgrade to any paid Apify plan (Bronze or higher) for unlimited exports. See [Free plan vs paid plans](#-free-plan-vs-paid-plans) for details.

***

### 👥 Who is this for?

- **Vintage & thrift resellers** sourcing undervalued inventory for Poshmark, eBay, Depop, and Mercari cross-listing
- **Resale arbitrageurs** hunting under-retail deals: vintage single-stitch tees, designer denim, gorpcore, Y2K, grail sneakers
- **Consignment shop owners** monitoring competitor closet inventory and sell-through
- **Fashion market researchers** and pricing intelligence teams tracking brand-level trends
- **AI agents & automation builders** wiring live resale data into Claude, LangChain, Zapier, Make, or custom pricing bots

### 🎯 What you can do with it

- **Find undervalued thrift & vintage inventory** — search "vintage 90s levis 501" with a max price and stream every hit with likes and condition to spot steals before anyone else
- **Price comps & sell-through analysis** — pull completed and sold listings for a brand or seller, compute average sold price, sell-through rate, and resale margins
- **Closet inventory monitoring** — track top competitors' or consignment closets' stock, pricing moves, and listing cadence
- **Instant Slack / Discord deal alerts** — every scraped row can be pushed live to a webhook, so newly listed steals hit your phone in seconds
- **Multi-platform pricing sync** — export clean JSON/CSV to feed cross-listing, repricing, and inventory pipelines
- **AI agent feeds** — plug the Actor into the Apify MCP server and ask your assistant market questions directly (see below)

### ✨ Feature matrix

| Feature | What it does | Output (`featureType`) |
|---|---|---|
| 🔍 **Listing Search** | Live keyword search with brand, size, condition, and min/max price filters. Defaults to 10 results per keyword for instant demo runs. | `listing_search` |
| 🧬 **Full Details Enrichment** | Optional toggle on Listing Search: each search row is **enriched in place** with description, fabric/material tags, style tags, full image gallery, and seller shipping discounts. Same row, `details_fetched: true` — never duplicates, never filters items out. | `listing_search` |
| 📦 **Listing Details** | Full listing records for specific Mercari URLs or listing IDs. | `listing_details` |
| 🏬 **Closet Listings** | Scrape any reseller/thrift closet inventory to track competitor stock. | `closet_listings` |
| 👤 **Seller Profile** | Reseller stats: love notes (ratings), items sold, closet size, verification, bio details. | `seller_profile` |
| 🧾 **Sold Item Comps / History** | Completed and sold listings to calculate real market comps, resale margins, and sell-through rates. | `sold_history` |
| 🔗 **Scrape By URL** | Direct Mercari URL processing: search URLs, closet URLs, item pages, category pages, brand feeds. | `scrape_by_url` |

***

### 🚀 Quick start

1. Click **Start** — the input is prefilled with three thrift keywords and **10 results max**, so your first run finishes in seconds.
2. Watch results stream into the dataset row by row.
3. (Optional) Enable **Enrich with full listing details** for deeper rows, or add a **Webhook URL** for instant alerts.

#### Example searches that work well

| Goal | Keywords | Filters |
|---|---|---|
| Vintage denim flips | `vintage 90s levis 501`, `wrangler cowboy cut` | Max price 60 |
| Gorpcore sourcing | `patagonia fleece`, `arcteryx gamma mx` | Condition: like new |
| Workwear grails | `carhartt detroit jacket`, `carhartt single knee` | — |
| Y2K / streetwear | `y2k baby tee`, `stussy 90s` | — |
| Sneaker comps | `jordan 1 chicago 1985` | Sort: price high → low |

***

### 📥 Input parameters

#### 🌍 Region

| Field | Type | Default | Description |
|---|---|---|---|
| **Region** | select | `US` | Mercari market: `US` (USD) or `JP` (JPY). Affects currency and the recommended connection region. |

#### 🔍 Listing Search (on by default)

| Field | Type | Default | Description |
|---|---|---|---|
| **Search keywords** | string list | 3 thrift examples | One or more search terms. Required when Listing Search is on. |
| **Max results per keyword** | integer (1–200) | `10` | Listings per keyword. Defaults to 10 for instant first runs. |
| **Sort order** | select | `created_time` | Relevance, newest, price low→high, price high→low, most liked. |
| **Brand filter** | text | — | e.g. `Carhartt`, `Levi's`, `Patagonia`. |
| **Size filter** | text | — | e.g. `M`, `L`, `32`. |
| **Condition filter** | string list | — | Condition IDs: `1` New, `2` Like new, `3` Hardly used, `4` Lightly used, `5` Used, `6` Damaged. |
| **Min / Max price** | integer | — | Price window in region currency — perfect for under-retail hunts. |
| **Listing status filter** | string list | `STATUS_ON_SALE` | `STATUS_ON_SALE` for live, `STATUS_SOLD_OUT` for sold. |
| **Category ID** | text | — | Optional numeric category ID. |
| **Enrich with full listing details** | checkbox | `false` | Enriches each search row in place with description, fabric/material tags, style tags, full image gallery, and seller shipping discounts. Same row (`featureType: listing_search`, `details_fetched: true`). Adds a little extra time per listing to enrich full product details. |

#### 📦 Listing Details

| Field | Type | Default | Description |
|---|---|---|---|
| **Listing IDs** | string list | — | 24-character Mercari listing IDs. |
| **Listing URLs** | string list | — | Full product URLs. |

#### 🏬 Closet Listings / 👤 Seller Profile / 🧾 Sold Item Comps

| Field | Type | Default | Description |
|---|---|---|---|
| **Seller IDs** | string list | — | Mercari seller IDs. Shared by Closet Listings, Seller Profile, and Sold Comps. |
| **Seller usernames** | string list | — | Alternative to seller IDs. |
| **Max listings per closet** | integer (1–500) | `30` | Active listings per closet. |
| **Max sold items per seller** | integer (1–200) | `30` | Sold listings per seller. |

#### 🔗 Scrape By URL

| Field | Type | Default | Description |
|---|---|---|---|
| **Mercari URLs** | string list | — | Any Mercari search, closet, item, category, or brand URL. Auto-detects the page type. |
| **Max pages per URL** | integer (1–20) | `3` | How many result pages to browse per URL. |

#### ✨ Output options

| Field | Type | Default | Description |
|---|---|---|---|
| **Include description** | checkbox | `true` | Keep seller-written description text. |
| **Include shipping details** | checkbox | `true` | Keep shipping cost, method, and origin. |
| **Include seller details** | checkbox | `true` | Keep seller rating, counts, and location on item rows. |

#### ⚙️ Run limits & delivery

| Field | Type | Default | Description |
|---|---|---|---|
| **Global max items** | integer (1–10000) | — | Hard cap across all features. |
| **Webhook URL** | text | — | Optional real-time push of every row (see [Webhooks](#-webhook-integration)). |
| **Webhook format** | select | `json` | `json` (full record) or `slack` (Slack message). |

#### 🌐 Connection

| Field | Type | Default | Description |
|---|---|---|---|
| **Proxy settings** | proxy | Apify Residential, US | Residential proxies recommended. Match the country to the Region. |

***

### 📤 Output fields (dataset schema)

Every row carries `featureType`, `country`, `scrapedAt`, and `url`, plus the fields below depending on the feature.

#### Pricing

| Field | Type | Notes |
|---|---|---|
| `current_price` | number | Current asking (or sold) price. |
| `currency` | string | `USD` / `JPY`. |
| `original_price` | number | Seller's original price when discounted. |
| `discount_percentage` | number | Computed markdown %. |
| `shipping_cost` | number | `0` = free shipping. |
| `shipping_payer` | string | Who pays shipping (seller-paid discounts show here). |
| `free_shipping` | boolean | |
| `accepts_offers` / `price_is_negotiable` | boolean | Negotiation signals. |
| `lowest_offer_accepted` | number | When exposed by the seller. |

#### Product

| Field | Type | Notes |
|---|---|---|
| `title`, `description` | string | Description filled on details/enriched rows. |
| `brand`, `brand_id` | string | e.g. `Carhartt`. |
| `size` | string | |
| `condition` | string | `new`, `like_new`, `good`, `fair`, `poor`. |
| `condition_description` | string | Seller's damage/notes text. |
| `category`, `subcategory`, `category_path` | string/array | Full hierarchy. |
| `color`, `material`, `gender` | string | Fabric/material when exposed. |
| `style_tags`, `hashtags` | array | Style & thrift tags. |
| `item_specifics` | object | Extra structured specifics when available. |
| `is_vintage`, `is_handmade`, `is_authentic` | boolean | Vintage & authenticity flags. |
| `main_image_url`, `additional_image_urls` | string/array | Full gallery on enriched rows. |

#### Engagement & timing

| Field | Type | Notes |
|---|---|---|
| `likes_count`, `comments_count`, `views_count` | integer | Demand signals. |
| `number_of_offers` | integer | |
| `is_promoted`, `is_featured` | boolean | |
| `created_at`, `updated_at`, `sold_at` | string | ISO timestamps. |
| `time_since_listed` | string | e.g. `2d 4h`. |
| `is_newly_listed` | boolean | Listed in the last 24 h — instant-deal-alert bait. |
| `is_sold`, `status` | | Availability. |

#### Seller

| Field | Type | Notes |
|---|---|---|
| `seller_username`, `seller_id`, `seller_display_name` | string | |
| `seller_rating`, `seller_ratings_count` | | Love notes. |
| `seller_items_sold`, `seller_items_listed` | integer | Sales history & closet size. |
| `seller_verified`, `seller_response_rate` | | Trust signals. |
| `seller_location`, `seller_join_date`, `seller_last_active` | string | |

#### Shipping & location

| Field | Type |
|---|---|
| `item_location`, `ships_from`, `ships_to`, `shipping_method`, `local_pickup_available` | string / array / boolean |

#### Row metadata

| Field | Type | Notes |
|---|---|---|
| `featureType` | string | Which feature produced the row. |
| `position` | integer | Search rank. |
| `details_fetched` | boolean | `true` when the search row was enriched in place. |
| `pageType` | string | `scrape_by_url` rows only. |

***

### 🔔 Webhook integration

Every row is always saved to the run dataset. Optionally, each row is **also POSTed in real time** to your webhook — perfect for instant alerts when a rare thrift item or low-priced comp drops.

**Setup:**

1. Put your webhook URL into **Webhook URL** (Slack, Discord, Zapier, Make, n8n, or your own pricing bot).
2. Choose **Webhook format**:
   - `json` — the full dataset record as JSON (Slack: use with Incoming Webhooks + a formatter; Discord/Zapier/Make: consume directly).
   - `slack` — a ready-to-post Slack message payload (`{"text": "…"}`), just paste a Slack Incoming Webhook URL.
3. Start the run — alerts arrive as rows stream, not at the end.

**Slack payload example:**

```json
{
  "text": ":shopping_bags: *Carhartt Detroit Jacket Vintage Brown*  •  *Price:* $85  •  *Brand:* Carhartt  •  *Condition:* good\n*Seller:* thriftking92\n<https://www.mercari.com/us/item/m12345678901/|Open on Mercari>"
}
```

**JSON payload:** the full dataset record (all fields from the Output section above).

### 🤖 MCP / AI Agent usage

Plug this Actor into Claude Desktop, Cursor, or LangChain via the [Apify MCP Server](https://docs.apify.com/platform/integrations/mcp-server):

1. In Claude Desktop / Cursor, add the Apify MCP server and sign in with your Apify token.
2. Enable this Actor for the assistant.
3. Ask natural-language questions like:
   - *"What is the average sold price for a 90s Carhartt J97 jacket on Mercari?"*
   - *"Find Patagonia fleece under $40 with more than 10 likes."*
   - *"Watch this closet and alert me when new vintage Levi's 501s drop."*

The Actor returns clean, structured rows your AI agent can aggregate, chart, or reason over directly.

***

### 🔒 Free plan vs paid plans

| Plan | Behavior |
|---|---|
| **Free (no paid plan)** | Runs are capped at **2 items** per run. A clear log line explains the cap and the run exits gracefully — no errors. |
| **Any paid plan (Bronze+)** | `Paying user — full output.` Unlimited results, all features, no caps. |

- The cap applies to the **whole run** (all features combined) and is visible in the run's `OUTPUT` summary under `paywall`.
- Owners can tune the free cap (`FREE_TIER_MAX_ITEMS`) or block free runs entirely (`FREE_TIER_MODE=block`) via Actor environment variables in the Apify Console.
- Pay-per-event charges apply per collected result on paid plans.

### ❓ FAQ

**Does this need my Mercari login or account?**
No. The Actor collects publicly available catalog data — no accounts, no logins, nothing to configure.

**Do I need proxies?**
No setup needed — the Actor defaults to Apify Residential proxies (US) automatically, and the input lets you switch regions. Residential connections give the most reliable results at scale.

**Why do I only get 2 results?**
You're on a free Apify plan. Free runs are capped at 2 items so you can try before you buy. Upgrade to any paid plan for unlimited exports.

**How fast is a run?**
A prefilled 10-result search finishes in seconds. Full-details enrichment adds a little extra time per listing to enrich full product details. Large runs (10,000+ items) stream row by row, so memory stays flat and the run remains stable for hours (runs support up to 10,000 seconds).

**How often can I run it?**
As often as you like. For continuous monitoring, schedule the Actor (e.g. every 15 minutes with a webhook) and diff dataset rows by `created_at` / `is_newly_listed` for new-drop alerts.

**Is there rate limiting?**
The Actor automatically paces requests with small randomized pauses, rotates connections, and retries transient hiccups on your behalf. You don't need to configure anything — just keep result volumes within your plan's budget.

**Can I get the raw internal payloads?**
No — output is a clean, stable, structured catalog schema. This keeps your pipelines from breaking when internal formats change.

**Which regions are supported?**
US and JP markets. Currency and language adapt automatically.

***

### 🧾 Notes

- One listing = one dataset row. Full-details enrichment merges into the same row (`details_fetched: true`) — never duplicates, never filters items out.
- Every discovered item goes to the dataset, even when deep attributes are unavailable — those rows simply carry `null` in the missing fields.
- Structured catalog intelligence only: stable field names, no internal payloads, no brittle formats.

*Keywords this Actor shines with: thrift flips, vintage finds, streetwear, gorpcore, Y2K, resale arbitrage, market comps, sell-through, closet monitoring, Poshmark / eBay / Depop / Mercari cross-listing.*

# Actor input Schema

## `country` (type: `string`):

Marketplace region. Affects currency, catalog language, and the recommended connection region.

## `enableListingSearch` (type: `boolean`):

Search Mercari by keyword and optional filters. On by default — prefilled so you can click Start immediately.

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

One or more search terms (e.g. carhartt detroit jacket, vintage 90s levis 501, patagonia fleece). Required when Listing Search is on.

## `searchMaxResults` (type: `integer`):

Maximum listings to return for each keyword (1–200). Defaults to 10 for fast instant demo runs.

## `searchSort` (type: `string`):

How to order search results.

## `searchBrand` (type: `string`):

Limit results to a brand name (e.g. Carhartt, Levi's, Patagonia, The North Face).

## `searchSize` (type: `string`):

e.g. M, L, XL, 32, 34.

## `searchItemCondition` (type: `array`):

Filter by item condition IDs (1 = New, 2 = Like new, 3 = Hardly used, 4 = Lightly used, 5 = Used, 6 = Damaged). Leave empty for any.

## `searchMinPrice` (type: `integer`):

Minimum price in the selected region currency.

## `searchMaxPrice` (type: `integer`):

Maximum price in the selected region currency — great for under-retail hunts.

## `searchStatus` (type: `array`):

STATUS\_ON\_SALE for live listings, STATUS\_SOLD\_OUT for sold ones. Defaults to on-sale listings.

## `searchCategoryId` (type: `string`):

Optional numeric Mercari category ID to narrow the search.

## `searchFetchFullDetails` (type: `boolean`):

When on, each search result is the SAME row enriched with full product fields (description, fabric/material tags, style tags, full image gallery, seller shipping discounts). Still featureType listing\_search with detailsFetched=true — never a second row, and nothing is filtered out. Adds a little extra time per listing to enrich full product details.

## `enableListingDetails` (type: `boolean`):

Fetch full product data for specific listing IDs or URLs.

## `itemIds` (type: `array`):

Mercari listing IDs (24-character codes).

## `itemUrls` (type: `array`):

Full Mercari product URLs (https://www.mercari.com/us/item/…).

## `enableClosetListings` (type: `boolean`):

Collect a reseller's or thrift closet's full active inventory to track competitor stock.

## `enableSellerProfile` (type: `boolean`):

Extract reseller stats: love notes (ratings), items sold, closet size, verification, bio details.

## `enableSoldHistory` (type: `boolean`):

Collect completed and sold listings to calculate real market comps, resale margins, and sell-through rates.

## `sellerIds` (type: `array`):

Mercari seller (user) IDs. Shared by Closet Listings, Seller Profile, and Sold Item Comps.

## `sellerUsernames` (type: `array`):

Alternative to seller IDs — merged automatically when IDs are empty.

## `sellerMaxListings` (type: `integer`):

Maximum active listings to collect per closet (1–500).

## `soldMaxItems` (type: `integer`):

Maximum sold listings to collect per seller (1–200).

## `enableScrapeByUrl` (type: `boolean`):

Paste any Mercari URL — search, closet, item, category, or brand feed.

## `scrapeUrls` (type: `array`):

Any Mercari search, closet, item, category, or brand URL.

## `scrapeMaxPages` (type: `integer`):

How many result pages to browse per URL (1–20).

## `includeDescription` (type: `boolean`):

Include the seller-written listing description when available in fast search cards.

## `includeShippingDetails` (type: `boolean`):

Include shipping cost, method, and origin when present.

## `includeSellerDetails` (type: `boolean`):

Include seller rating, counts, and location fields on item rows.

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

Hard cap across all features for this run. Leave empty for no global cap.

## `webhookUrl` (type: `string`):

Optional. Every record is always saved to the run dataset — this webhook is an ADDITIONAL real-time push. Each new row is also POSTed to this URL (Slack, Discord, Zapier, Make, n8n, custom pricing bot).

## `webhookFormat` (type: `string`):

json = full record object; slack = Slack-friendly message payload.

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

Residential proxy recommended. Match country to the Region above (US / JP).

## Actor input object example

```json
{
  "country": "US",
  "enableListingSearch": true,
  "searchKeywords": [
    "carhartt detroit jacket",
    "vintage 90s levis 501",
    "patagonia fleece"
  ],
  "searchMaxResults": 10,
  "searchSort": "created_time",
  "searchBrand": "",
  "searchSize": "",
  "searchItemCondition": [],
  "searchStatus": [
    "STATUS_ON_SALE"
  ],
  "searchCategoryId": "",
  "searchFetchFullDetails": false,
  "enableListingDetails": false,
  "itemIds": [],
  "itemUrls": [],
  "enableClosetListings": false,
  "enableSellerProfile": false,
  "enableSoldHistory": false,
  "sellerIds": [],
  "sellerUsernames": [],
  "sellerMaxListings": 30,
  "soldMaxItems": 30,
  "enableScrapeByUrl": false,
  "scrapeUrls": [
    "https://www.mercari.com/search/?keyword=vintage%20levis"
  ],
  "scrapeMaxPages": 3,
  "includeDescription": true,
  "includeShippingDetails": true,
  "includeSellerDetails": true,
  "webhookUrl": "",
  "webhookFormat": "json",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# Actor output Schema

## `allResults` (type: `string`):

Full dataset for this run (every featureType).

## `overview` (type: `string`):

Core fields across features, including details\_fetched for search rows.

## `search` (type: `string`):

featureType=listing\_search only. One product = one row; full details are merged when enrichment is enabled.

## `details` (type: `string`):

featureType=listing\_details — only from the Listing Details feature (specific IDs/URLs).

## `closet_listings` (type: `string`):

No description

## `seller_profile` (type: `string`):

No description

## `sold_history` (type: `string`):

No description

## `scrape_by_url` (type: `string`):

No description

# 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 = {
    "country": "US",
    "enableListingSearch": true,
    "searchKeywords": [
        "carhartt detroit jacket",
        "vintage 90s levis 501",
        "patagonia fleece"
    ],
    "searchMaxResults": 10,
    "searchSort": "created_time",
    "searchItemCondition": [],
    "searchStatus": [
        "STATUS_ON_SALE"
    ],
    "searchFetchFullDetails": false,
    "enableListingDetails": false,
    "itemIds": [],
    "itemUrls": [],
    "enableClosetListings": false,
    "enableSellerProfile": false,
    "enableSoldHistory": false,
    "sellerIds": [],
    "sellerUsernames": [],
    "sellerMaxListings": 30,
    "soldMaxItems": 30,
    "enableScrapeByUrl": false,
    "scrapeUrls": [
        "https://www.mercari.com/search/?keyword=vintage%20levis"
    ],
    "scrapeMaxPages": 3,
    "includeDescription": true,
    "includeShippingDetails": true,
    "includeSellerDetails": true,
    "webhookFormat": "json",
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "US"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("b2b_leads/mercari-real-time-data-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 = {
    "country": "US",
    "enableListingSearch": True,
    "searchKeywords": [
        "carhartt detroit jacket",
        "vintage 90s levis 501",
        "patagonia fleece",
    ],
    "searchMaxResults": 10,
    "searchSort": "created_time",
    "searchItemCondition": [],
    "searchStatus": ["STATUS_ON_SALE"],
    "searchFetchFullDetails": False,
    "enableListingDetails": False,
    "itemIds": [],
    "itemUrls": [],
    "enableClosetListings": False,
    "enableSellerProfile": False,
    "enableSoldHistory": False,
    "sellerIds": [],
    "sellerUsernames": [],
    "sellerMaxListings": 30,
    "soldMaxItems": 30,
    "enableScrapeByUrl": False,
    "scrapeUrls": ["https://www.mercari.com/search/?keyword=vintage%20levis"],
    "scrapeMaxPages": 3,
    "includeDescription": True,
    "includeShippingDetails": True,
    "includeSellerDetails": True,
    "webhookFormat": "json",
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "US",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("b2b_leads/mercari-real-time-data-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 '{
  "country": "US",
  "enableListingSearch": true,
  "searchKeywords": [
    "carhartt detroit jacket",
    "vintage 90s levis 501",
    "patagonia fleece"
  ],
  "searchMaxResults": 10,
  "searchSort": "created_time",
  "searchItemCondition": [],
  "searchStatus": [
    "STATUS_ON_SALE"
  ],
  "searchFetchFullDetails": false,
  "enableListingDetails": false,
  "itemIds": [],
  "itemUrls": [],
  "enableClosetListings": false,
  "enableSellerProfile": false,
  "enableSoldHistory": false,
  "sellerIds": [],
  "sellerUsernames": [],
  "sellerMaxListings": 30,
  "soldMaxItems": 30,
  "enableScrapeByUrl": false,
  "scrapeUrls": [
    "https://www.mercari.com/search/?keyword=vintage%20levis"
  ],
  "scrapeMaxPages": 3,
  "includeDescription": true,
  "includeShippingDetails": true,
  "includeSellerDetails": true,
  "webhookFormat": "json",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}' |
apify call b2b_leads/mercari-real-time-data-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,b2b_leads/mercari-real-time-data-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/IsO2D0RckezdbBVUZ/builds/rxCajiIZSjx0lQbfE/openapi.json
