# Grailed Scraper — Live Resale & Sold Comps Data (`b2b_leads/grailed-real-time-data-scraper`) Actor

Live Grailed resale intelligence for thrift and vintage resellers: keyword search with full-details enrichment, sold comps for pricing, closet inventory tracking, seller stats, and instant Slack/Discord deal alerts. Clean structured JSON, streamed in real time.

- **URL**: https://apify.com/b2b\_leads/grailed-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, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

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

## Grailed Real-Time Data

**Live resale market intelligence from Grailed — thrift price comps, closet inventory, seller stats, and a vintage deal finder — as clean structured JSON.**

Built for **vintage & thrift resellers** (Poshmark, eBay, Depop, Mercari cross-listers), consignment shop owners, resale arbitrageurs, fashion market researchers, pricing intelligence teams, and AI agents. Enable only the features you need, click **Start**, and stream results to your dataset, webhook, or LLM pipeline.

> ⚠️ **Free-tier notice:** Free Apify accounts get a **2-result trial per run**. Upgrade to any paid Apify plan for unlimited exports. See [Free tier limits](#free-tier-limits).

***

### Why teams use this Actor

| | Grailed Real-Time Data | Typical browser scraper |
|---|------------------------|-------------------------|
| **Speed** | Fast per-item collection | Often seconds per page |
| **Memory** | **512 MB** default, streams row-by-row | 2–4 GB+ |
| **Setup** | Checkbox UI, prefilled test input | Fragile & high-maintenance |
| **Cost** | Low compute | High |
| **Output** | Structured JSON, LLM-ready | Often messy HTML |
| **Scale** | 10,000+ item runs without ballooning RAM | Memory-heavy buffers |
| **Delivery** | Dataset + optional real-time webhook | Export-only |

***

### Feature matrix

| Feature | Default | What it does |
|---------|---------|--------------|
| 🔍 **Listing Search** | **ON** | Live keyword search for thrift brands, streetwear, and vintage finds with brand, size, condition, and min/max price filters |
| ✨ **Enrich with full listing details** | off | Adds description, fabric/material tags, style tags, full image gallery, and seller shipping discounts **to the same search row** |
| 📦 **Listing Details** | off | Full records for specific listing IDs or Grailed URLs |
| 👚 **Closet Listings** | off | Full active inventory of any reseller/thrift closet — track competitor stock |
| 👤 **Seller Profile** | off | Reseller stats: love notes, items sold, closet size, verification, bio |
| 🧾 **Sold Item Comps / History** | off | Completed and sold listings to calculate real market comps, resale margins, and sell-through rates |
| 🔗 **Scrape By URL** | off | Paste any Grailed URL — listings, search URLs, closets, category pages, brand feeds |

**All defaults are set to 10 results** so your first run finishes in seconds. Raise the caps once you've confirmed the output shape.

***

### Use cases

- **Finding undervalued thrift & vintage inventory** — hunt vintage single-stitch tees, designer denim, gorpcore, and Y2K with price ceilings (e.g. `vintage 90s levis 501` under $40).
- **Pricing comps & sell-through analysis** — pull completed and sold listings for any keyword or seller to compute real market comps, average sold prices, and resale margins before you buy.
- **Closet inventory monitoring** — watch top competitors' and consignment sellers' active stock; get alerted the moment something new drops.
- **Instant Slack/Discord deal alerts** — pipe every new row through a webhook to Slack, Discord, Zapier, Make, n8n, or your own pricing bot for newly listed steals.
- **Multi-platform pricing sync & inventory feeds** — one JSON schema feeds your cross-listing, repricing, or catalog pipelines.
- **AI & agent workflows** — structured JSON ready for Claude, ChatGPT, LangChain, LlamaIndex, RAG, scoring, and alerts.

***

### What you get

Every record includes `featureType`, `url`, and `scrapedAt` so you can filter, join, and pipe into any workflow.

#### Listing Search (`featureType: "listing_search"`) — **one product = one row**

| Field | Description |
|-------|-------------|
| `listingId`, `title`, `url` | Identity and listing link |
| `price`, `originalPrice`, `discountPercent`, `priceDropped` | Pricing and markdown signals |
| `currency`, `shippingCost`, `freeShipping` | Cost context |
| `brand`, `designers[]`, `size`, `condition`, `color` | Attributes |
| `category`, `subCategory`, `department`, `marketTier` | Catalog placement (grails / hype / sartorial / basic) |
| `likes`, `views`, `numberOfOffers` | Demand signals |
| `sellerUsername`, `sellerLocation`, `sellerVerified` | Seller context |
| `imageUrl`, `imageUrls[]` | Cover photo and gallery |
| `postedAt`, `timeSinceListed`, `isNewlyListed` | Freshness — critical for deal sniping |
| `position`, `keyword` | Search context |
| `detailsFetched` | `false` = search card; `true` = full fields merged into **this same row** |

**With "Enrich with full listing details" on**, the Actor does **not** create a second row and **never drops partial items**. It enriches the search row in place with:

| Extra fields when `detailsFetched: true` | |
|------------------------------------------|--|
| `description` | Full listing text |
| `materialTags`, `material` | Fabric / material tags |
| `styleTags`, `hashtags`, `tags` | Style taxonomy |
| `imageUrls[]` | Full image gallery |
| `sellerShippingDiscounts` | Seller shipping-discount signals |
| `measurements[]`, `itemSpecifics[]` | Garment measurements and specifics |

Example: `searchMaxResults: 10` + enrichment on → **10 dataset rows**, not 20, and nothing filtered out.

#### Listing Details (`featureType: "listing_details"`)

Full product rows **only** when you enable the **Listing Details** feature and pass listing IDs / URLs. Search enrichment merges into `listing_search` instead.

#### Closet Listings (`featureType: "closet_listings"`)

One row per active listing in a seller's closet — price, brand, size, condition, photos, and freshness.

#### Seller Profile (`featureType: "seller_profile"`)

Username, display name, bio, verification, rating, reviews, items sold, closet size, response rate, and recent love notes (feedback) when available.

#### Sold Item Comps (`featureType: "sold_comps"`)

Completed and sold listings by seller **or by keyword** — sold price, sold date, brand, size — the raw material for market comps and margin math.

#### Scrape By URL (`featureType: "scrape_by_url"`)

Paste any Grailed URL. The Actor auto-detects the page type (`listing`, `search`, `seller`, `brand`, `category`) and returns structured rows.

***

### Full input reference

Enable only what you need. **Listing Search is on by default** with thrift-ready sample keywords.

There is **no separate global cap** — the run's total volume is simply the sum of the section caps you set (keywords × max per keyword, sellers × max per closet, etc.), so you control everything from the feature sections.

> **Free plan:** a 2-result per-run trial cap applies on top of your section caps — see [Free tier limits](#free-tier-limits).

| Input | Type | Default | Description |
|-------|------|---------|-------------|
| **Listing Search** | | | |
| `enableListingSearch` | boolean | `true` | Live keyword search |
| `searchKeywords` | string\[] | carhartt / levis / patagonia samples | Search terms |
| `searchMaxResults` | integer | `10` | Max per keyword (1–200) |
| `searchDepartment` | enum | any | menswear, womenswear |
| `searchDesigner` | string | — | Brand filter (e.g. Carhartt, Levi's, Patagonia, The North Face, Stussy) |
| `searchSize` | string | — | e.g. M, L, XL, 32, 34 |
| `searchCondition` | enum | any | new\_with\_tags, new\_without\_tags, gently\_used, well\_worn |
| `searchMinPrice` / `searchMaxPrice` | integer | — | USD price bounds — set a max for deal hunting |
| `searchStrata` | enum | any | grails, hype, sartorial, basic |
| `searchSort` | enum | relevance | relevance, newest, price-low, price-high, heat |
| `searchSoldOnly` | boolean | `false` | Search completed/sold items instead of live inventory |
| `searchFetchFullDetails` | boolean | `false` | Enrich each search row in place (same row, `detailsFetched: true`) |
| **Listing Details** | | | |
| `enableListingDetails` | boolean | `false` | Full product rows |
| `listingUrls` | string\[] | — | Listing URLs or bare numeric IDs |
| **Sellers** | | | |
| `enableClosetListings` | boolean | `false` | Closet inventory |
| `enableSellerProfile` | boolean | `false` | Profile + love notes |
| `enableSoldComps` | boolean | `false` | Sold comps by seller and/or keyword |
| `sellerUsernames` | string\[] | — | Without @ |
| `sellerMaxListings` | integer | `30` | Cap per closet (1–500) |
| `soldMaxItems` | integer | `30` | Cap sold items per seller/keyword (1–200) |
| `soldKeywords` | string\[] | — | Direct sold-market comp searches (e.g. carhartt j97, stussy 8 ball) |
| **URL** | | | |
| `enableScrapeByUrl` | boolean | `false` | Any Grailed URL |
| `scrapeUrls` | string\[] | — | Listing, search, seller, category, or brand URLs |
| `scrapeMaxPages` | integer | `3` | Depth for list-style URLs (1–20) |
| **Options & delivery** | | | |
| `includeRaw` | boolean | `false` | Extended structured block per row (larger output) |
| `webhookUrl` | string | — | Optional real-time POST per row |
| `webhookFormat` | enum | `json` | `json` (full record) or `slack` |
| `proxyConfiguration` | object | Residential US | Recommended — see [Proxy](#proxy) |

#### Practical thrift search examples

| Goal | Keywords + filters |
|------|--------------------|
| Vintage denim flips | `vintage 90s levis 501`, `levis 517 made in usa` + `searchMaxPrice: 60` |
| Workwear goldmines | `carhartt detroit jacket`, `carhartt double knee` + `condition: gently_used` |
| Gorpcore sourcing | `patagonia fleece`, `arc'teryx gamma` + `searchSort: price-low` |
| Streetwear steals | `stussy 8 ball`, `supreme box logo` + `searchMaxPrice: 120` |
| Sold comps before you buy | Sold comps with `soldKeywords: ["carhartt j97"]` |
| Y2K restock alerts | `vintage y2k` + webhook to Discord + `searchSort: newest` |

***

### Output & streaming

- **Every row is written to the dataset the moment it is ready** — long runs never hold the full result set in memory, so RAM stays flat even at 10,000+ items.
- **Parallel workers** process multiple keywords, sellers, details, and URLs concurrently with randomized pacing between chunks.
- **Spending limits** — set a max cost per run in the Console and the Actor **stops gracefully** with a summary when the limit is reached. No crashed runs, no overspend.
- Filter the dataset by `featureType`.
- Dataset views: **overview**, **search**, **listing\_details**, **closet\_listings**, **seller\_profile**, **sold\_comps**, **scrape\_by\_url**.
- Each run writes a summary object (counts per feature, paywall status) to the run's **OUTPUT**.

#### Row counts to expect

| What you enable | Dataset rows |
|-----------------|--------------|
| Listing Search, 10 results, enrichment **off** | **10** × `listing_search` (`detailsFetched: false`) |
| Listing Search, 10 results, enrichment **on** | **10** × `listing_search` (`detailsFetched: true`, richer fields on the same row) |
| Listing Details with 5 URLs | **5** × `listing_details` |
| Closet Listings, max 30 | Up to **30** × `closet_listings` per seller |
| Sold comps, max 30 per keyword | Up to **30** × `sold_comps` per keyword |

#### Sample search row (enriched)

```json
{
  "featureType": "listing_search",
  "listingId": "5123456",
  "title": "Vintage Carhartt Detroit Jacket Brown Duck Canvas",
  "price": 85,
  "originalPrice": 120,
  "discountPercent": 29,
  "currency": "USD",
  "brand": "Carhartt",
  "size": "L",
  "condition": "Gently Used",
  "marketTier": "basic",
  "likes": 34,
  "sellerUsername": "vintagevault",
  "detailsFetched": true,
  "description": "90s Carhartt J97 Detroit jacket…",
  "materialTags": ["cotton duck", "blanket lining"],
  "styleTags": ["workwear", "vintage"],
  "imageUrl": "https://…/cover.jpg",
  "imageUrls": ["https://…/1.jpg", "https://…/2.jpg"],
  "postedAt": "2026-09-20T14:03:00.000Z",
  "timeSinceListed": "6d 2h",
  "url": "https://www.grailed.com/listings/5123456",
  "scrapedAt": "2026-09-26T12:00:00.000Z"
}
```

***

### Webhook integration

Every record is **always saved to the dataset**. Optionally, each new row is also POSTed in real time to `webhookUrl` — perfect for instant deal alerts on rare thrift finds or low-priced comps.

#### JSON format

Full record object, identical to the dataset row. Point it at Discord, Zapier, Make, n8n, or your own pricing bot.

#### Slack format

A formatted message:

```
:shirt: *Vintage Carhartt Detroit Jacket Brown Duck Canvas*
*Type:* listing_search  •  *Price:* USD 85  •  *Brand:* Carhartt  •  *Size:* L
*Condition:* Gently Used  •  *Likes:* 34  •  *Seller:* vintagevault
<https://www.grailed.com/listings/5123456|Open on Grailed>
```

Setup: paste a Slack **Incoming Webhook** URL (or a Discord webhook using the `/slack` style URL) into **Webhook URL** and pick **Slack message** as the format. Webhook failures never interrupt the run or dataset writes.

***

### MCP / AI Agent usage

Output is **structured JSON** — ready for Claude Desktop, Cursor, LangChain, LlamaIndex, and custom agents via the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp):

1. Add the Apify MCP server to Claude Desktop / Cursor.
2. Expose this Actor to the MCP server.
3. Ask questions in natural language.

```
User: "What is the average sold price for a 90s Carhartt J97 jacket on Grailed?"
→ Agent runs the Actor with enableSoldComps=true, soldKeywords=["carhartt j97"], soldMaxItems=50
→ Agent reads the dataset
→ Agent answers: "Average sold price is $142 across 50 comps; median $120; sell-through concentrated in sizes L–XL."
```

Other agent-friendly prompts:

- *"Find 10 Patagonia fleece listings under $30 and rank by likes per dollar."*
- *"Monitor @thriftgod's closet daily and alert me on new Stussy items."*
- *"Compare sold comps for vintage 501s across the last 50 sales."*

#### API quick start

```bash
curl -X POST "https://api.apify.com/v2/acts/YOUR_ACTOR_ID/runs?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "enableListingSearch": true,
    "searchKeywords": ["carhartt detroit jacket"],
    "searchMaxResults": 10
  }'
```

Dataset items: `GET https://api.apify.com/v2/datasets/{datasetId}/items?format=json`

***

### Proxy

**Residential proxies recommended.** The Actor defaults to Apify Residential with a US exit, which you can change in the **Proxy settings** input (US, CA, GB, DE, AU, …). Match the country to where you want the marketplace to place you.

- Free-tier runs and paid runs use the same proxy configuration.
- Rotating residential sessions are used automatically for reliability at scale.
- Long runs (the Actor supports runs up to ~2h 46m of configured timeout) benefit from leaving the default settings untouched.

***

### Free tier limits

Apify injects plan signals into every run; this Actor uses them to keep the free funnel alive while reserving unlimited exports for paid plans:

| Plan | Behavior |
|------|----------|
| **Any paid plan** (Bronze → Diamond) | Normal run, full output, no caps — logged as `Paying user — full output.` |
| **Free plan** | Results capped at **2 items per run** (default), with a clear upgrade message. |
| **Free plan (block mode)** | Owners can set `FREE_TIER_MODE=block` so the Actor exports 0 items with a friendly message instead. |

Notes:

- The cap is transparent — it is stated here, in the input schema, and in the run logs; it is never presented as an error.
- Runs always exit gracefully; a capped run is a successful run.
- Owner-configurable via Console environment variables: `FREE_TIER_MODE` (`limit` default | `block`) and `FREE_TIER_MAX_ITEMS` (default `2`).

***

### FAQ

**Do I need code?**
No — use the Console UI. Developers can use the Apify API, schedules, and webhooks.

**Which proxy should I use?**
Residential, matching your target region. The default (Apify Residential, US) works for most thrift hunting.

**How fresh is the data?**
Records are collected live at run time — schedule runs as often as your plan allows for monitoring and alerts.

**How do I avoid rate limiting?**
Keep per-keyword caps reasonable, let the built-in randomized pacing do its job, and use residential proxies. For very large inventories, split runs by seller or keyword.

**What happens when I hit my spending limit?**
The Actor stops collecting, writes the summary, and exits cleanly — no partial or corrupted exports.

**Multiple features in one run?**
Yes — every row is tagged with `featureType`, so one run can search, enrich, pull closets, profiles, and sold comps together.

**Large runs?**
Rows stream continuously and work runs in parallel; memory stays flat even on 10,000+ item runs.

**Is the 2-item free cap really all I get?**
Yes — upgrade to any paid Apify plan to lift it. The cap is enforced transparently and never appears as an error.

**LLM / agents?**
Yes — structured JSON + Apify MCP for agent-driven runs. See the MCP section above.

***

### Contact / custom projects

Need something tailored? I build **custom scrapers, data pipelines, and web apps** of any kind — marketplaces, lead gen, internal tools, dashboards, and full-stack products.

- **Email:** <dubem115@gmail.com>
- **GitHub:** <https://github.com/DrunkCodes>

Open to project work, integrations, and ongoing data infrastructure.

# Actor input Schema

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

Live keyword search for thrift brands, streetwear, and vintage finds (e.g. carhartt detroit jacket, vintage 90s levis 501, patagonia fleece). 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). Default 10 for fast instant demo runs — raise it once you've confirmed the output shape.

## `searchDepartment` (type: `string`):

Limit results to a department.

## `searchDesigner` (type: `string`):

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

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

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

## `searchCondition` (type: `string`):

Filter by item condition.

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

Minimum price in USD.

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

Maximum price in USD — great for deal alerts (e.g. 60).

## `searchStrata` (type: `string`):

Grailed splits its marketplace into tiers — grails (high-end), hype (streetwear), sartorial, basic.

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

How to order search results.

## `searchSoldOnly` (type: `boolean`):

Search completed/sold items instead of live inventory — the core of price-comp research.

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

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

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

Fetch full product records for specific listing IDs or Grailed listing URLs.

## `listingUrls` (type: `array`):

Grailed listing URLs (https://www.grailed.com/listings/…) or bare numeric listing IDs.

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

Collect the full active inventory of any reseller/thrift closet to track competitor stock.

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

Grailed usernames without @. Shared by Closet Listings, Seller Profile, and Sold Comps.

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

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

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

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

## `enableSoldComps` (type: `boolean`):

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

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

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

## `soldKeywords` (type: `array`):

Search the sold market directly by keyword (e.g. carhartt j97, stussy 8 ball, stone island sweatshirt) instead of per-seller.

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

Process any Grailed URL — listing pages, search URLs, closet/seller pages, category pages, or brand feeds.

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

Any Grailed listing, search, seller/closet, category, or brand feed URL.

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

How deep to collect for search/closet/brand feed URLs (1–20).

## `includeRaw` (type: `boolean`):

Attach an extended structured data block on each record. Larger output — for advanced pipelines only.

## `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 / CA / GB / DE / AU).

## Actor input object example

```json
{
  "enableListingSearch": true,
  "searchKeywords": [
    "carhartt detroit jacket",
    "vintage 90s levis 501",
    "patagonia fleece"
  ],
  "searchMaxResults": 10,
  "searchDepartment": "",
  "searchDesigner": "",
  "searchSize": "",
  "searchCondition": "",
  "searchStrata": "",
  "searchSort": "relevance",
  "searchSoldOnly": false,
  "searchFetchFullDetails": false,
  "enableListingDetails": false,
  "listingUrls": [],
  "enableClosetListings": false,
  "sellerUsernames": [
    "grailed"
  ],
  "sellerMaxListings": 30,
  "enableSellerProfile": false,
  "enableSoldComps": false,
  "soldMaxItems": 30,
  "soldKeywords": [],
  "enableScrapeByUrl": false,
  "scrapeUrls": [
    "https://www.grailed.com/listings/1"
  ],
  "scrapeMaxPages": 3,
  "includeRaw": false,
  "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 detailsFetched for search rows.

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

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

## `listing_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_comps` (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 = {
    "enableListingSearch": true,
    "searchKeywords": [
        "carhartt detroit jacket",
        "vintage 90s levis 501",
        "patagonia fleece"
    ],
    "searchMaxResults": 10,
    "searchDepartment": "",
    "searchSort": "relevance",
    "searchSoldOnly": false,
    "searchFetchFullDetails": false,
    "enableListingDetails": false,
    "listingUrls": [],
    "enableClosetListings": false,
    "sellerUsernames": [
        "grailed"
    ],
    "sellerMaxListings": 30,
    "enableSellerProfile": false,
    "enableSoldComps": false,
    "soldMaxItems": 30,
    "soldKeywords": [],
    "enableScrapeByUrl": false,
    "scrapeUrls": [
        "https://www.grailed.com/listings/1"
    ],
    "scrapeMaxPages": 3,
    "includeRaw": false,
    "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/grailed-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 = {
    "enableListingSearch": True,
    "searchKeywords": [
        "carhartt detroit jacket",
        "vintage 90s levis 501",
        "patagonia fleece",
    ],
    "searchMaxResults": 10,
    "searchDepartment": "",
    "searchSort": "relevance",
    "searchSoldOnly": False,
    "searchFetchFullDetails": False,
    "enableListingDetails": False,
    "listingUrls": [],
    "enableClosetListings": False,
    "sellerUsernames": ["grailed"],
    "sellerMaxListings": 30,
    "enableSellerProfile": False,
    "enableSoldComps": False,
    "soldMaxItems": 30,
    "soldKeywords": [],
    "enableScrapeByUrl": False,
    "scrapeUrls": ["https://www.grailed.com/listings/1"],
    "scrapeMaxPages": 3,
    "includeRaw": False,
    "webhookFormat": "json",
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "US",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("b2b_leads/grailed-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 '{
  "enableListingSearch": true,
  "searchKeywords": [
    "carhartt detroit jacket",
    "vintage 90s levis 501",
    "patagonia fleece"
  ],
  "searchMaxResults": 10,
  "searchDepartment": "",
  "searchSort": "relevance",
  "searchSoldOnly": false,
  "searchFetchFullDetails": false,
  "enableListingDetails": false,
  "listingUrls": [],
  "enableClosetListings": false,
  "sellerUsernames": [
    "grailed"
  ],
  "sellerMaxListings": 30,
  "enableSellerProfile": false,
  "enableSoldComps": false,
  "soldMaxItems": 30,
  "soldKeywords": [],
  "enableScrapeByUrl": false,
  "scrapeUrls": [
    "https://www.grailed.com/listings/1"
  ],
  "scrapeMaxPages": 3,
  "includeRaw": false,
  "webhookFormat": "json",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}' |
apify call b2b_leads/grailed-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/grailed-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/3rtZtZ1FYgNJRDaiv/builds/XpoyQJY8jXI8Hr5fj/openapi.json
