# Facebook Marketplace Scraper (`worshipful_knife/facebook-marketplace-scraper`) Actor

Reliable Facebook Marketplace scraper. Works without login — extracts titles, prices, full descriptions, GPS, photos, and category attributes (vehicle make/year/mileage, property bedrooms). Built-in monitoring mode for incremental scraping. Multi-source SSR JSON parser handles FB shape changes.

- **URL**: https://apify.com/worshipful\_knife/facebook-marketplace-scraper.md
- **Developed by:** [kata Kuri](https://apify.com/worshipful_knife) (community)
- **Categories:** E-commerce, Real estate, Automation
- **Stats:** 2 total users, 1 monthly users, 66.7% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 record scrapeds

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.md):

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.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/platform/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

## Facebook Marketplace Scraper

Reliable, no-login Facebook Marketplace scraper. Returns clean JSON with title, price, full description, photos, GPS coordinates, condition, category, and category-specific attributes (vehicle make/model/year/mileage, property bedrooms/bathrooms, etc.).

> **Works without cookies for 90%+ of public listings.** Most other scrapers go silent the moment Facebook rotates its SSR shape — this one walks the inlined JSON and merges every sibling target node, so you don't lose half the fields when FB changes things.

---

### Why this scraper

| | This actor | Typical alternative |
|---|---|---|
| **Anonymous mode** | ✓ default — no cookies needed | Often "required", silently fails |
| **Login wall handling** | Content-aware: serves through soft overlays | Hard-fails on `/login` redirect |
| **Description, GPS, photos** | Extracted from inlined SSR JSON anonymously | Often null without cookies |
| **SSR shape changes** | Multi-source merge from every sibling target node | Returns partial / null when FB rotates |
| **Honest completeness flag** | `_completeness: "basic" \| "full"` | Marks partial data as full |
| **Cross-run dedup** | Built-in monitoring mode | Add-on / missing |
| **Incremental "since X"** | `untilDate` filter | Missing |
| **Strict keyword match** | `strictMatch: true` removes broad-match noise | Missing |
| **Auto same-country proxy** | Picks US / GB / DE / FR / etc. from city | Manual config |
| **Pricing (full detail, 1K)** | $1.51 (Starter+), $2.72 (Free) — pay-per-event | $2.60–$44 / 1K + subscriptions |

---

### Quickstart

#### 1. Search by keyword + city

```json
{
  "searchQuery": "iphone 15",
  "city": "newyork",
  "maxResults": 50,
  "scrapeDetails": true,
  "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"] }
}
````

#### 2. Browse a category

```json
{
  "city": "losangeles",
  "category": "furniture",
  "maxResults": 100,
  "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"] }
}
```

#### 3. Drop in raw Marketplace URLs

```json
{
  "searchUrls": [
    "https://www.facebook.com/marketplace/sanfrancisco/cars?minPrice=10000&maxPrice=30000",
    "https://www.facebook.com/marketplace/seattle/electronics"
  ],
  "scrapeDetails": true,
  "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"] }
}
```

#### 4. Incremental "what's new since yesterday"

```json
{
  "searchQuery": "macbook pro",
  "city": "austin",
  "scrapeDetails": true,
  "monitoringMode": true,
  "monitoringStoreName": "fb-macbook-austin",
  "untilDate": "2026-04-25",
  "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"] }
}
```

Schedule this hourly; you'll only ever pay for net-new listings.

***

### Inputs

#### Search

| Field | Type | Default | Description |
|---|---|---|---|
| `searchUrls` | `string[]` | — | Paste any Marketplace URL: `/marketplace/<city>/`, `/marketplace/<city>/<category>`, `/marketplace/<city>/search?query=...`. Combinable with the search-builder fields. |
| `searchQuery` | `string` | — | Keyword. Combined with `city` / `category` to build a URL. |
| `city` | `string` | — | City slug. Use Facebook's slug (e.g. `newyork`, `losangeles`, `london`, `paris`, `berlin`). The actor ships shortcuts for the most common spellings. |
| `category` | `enum` | — | `vehicles`, `cars`, `phones`, `furniture`, `clothing`, `property-rentals`, `appliances`, etc. (full list in input schema). |
| `sortBy` | `enum` | best-match | `newest`, `price-low`, `price-high`, `distance`, `best-match`. |
| `condition` | `enum` | — | `new`, `used-like-new`, `used-good`, `used-fair`. |
| `minPrice` / `maxPrice` | `int` | — | Price filter (in the city's local currency). |
| `radiusKm` | `int` | FB default | Search radius from city center, max 100 km. |

#### Scope and cost control

| Field | Type | Default | Description |
|---|---|---|---|
| `maxResults` | `int` | unlimited | Hard cap on listings returned. The crawler stops as soon as this is hit. |
| `scrapeDetails` | `bool` | `true` | Visit each listing's detail page for description, GPS, full photo set, condition, category attributes. Cheaper to leave off if you only need card data. |
| `maxConcurrency` | `int` | `3` | Parallel browser tabs (1–10). Keep low (2–3) to stay under FB's bot-detection threshold. |

#### Filters

| Field | Type | Default | Description |
|---|---|---|---|
| `strictMatch` | `bool` | `false` | When `searchQuery` is set, drop any listing whose title doesn't contain every word of the query (accent-insensitive). Filters out FB's broad-match noise — e.g. `"iphone 15"` no longer returns chargers and cases. |
| `untilDate` | `string` | — | ISO date (`2026-04-25` or `2026-04-25T00:00:00Z`). Skip listings posted before this date. Only applied when detail-scraping captures `publishedAt`. |

#### Incremental scraping

| Field | Type | Default | Description |
|---|---|---|---|
| `monitoringMode` | `bool` | `false` | Track listing IDs across runs in a named Key-Value store. Skip any IDs already pushed in earlier runs. Combine with a schedule for an incremental feed. |
| `monitoringStoreName` | `string` | `fb-marketplace-seen` | Name of the KV store. Use different names to keep separate watchlists (`fb-iphones-nyc`, `fb-cars-austin`, …). |

#### Authentication (optional)

| Field | Type | Default | Description |
|---|---|---|---|
| `cookieState` | `string` | — | Optional Facebook session cookies as JSON. **Anonymous works for public card and detail data**; supply cookies only if you need seller name/profile (FB hides those server-side anonymously). |

#### Infrastructure

| Field | Type | Default | Description |
|---|---|---|---|
| `proxyConfiguration` | `object` | — | Standard Apify proxy config. **Residential strongly recommended** — datacenter IPs are blocked by Facebook. If you set a `city` and use residential without a `countryCode`, the actor auto-picks a same-country proxy for you (e.g. `US` for New York, `GB` for London, `DE` for Berlin). |

***

### Output schema

Each row in the dataset:

```json
{
  "listingId": "1279908470484354",
  "title": "iPhone 12 Pro Max - Mint condition",
  "price": 425,
  "currency": "USD",
  "condition": "Used - Like New",
  "category": "807311116002614",
  "description": "Selling my iPhone 12 Pro Max, 256GB, mint condition. Battery health 89%. No scratches. Comes with original box and charger…",
  "city": "Austin",
  "location": "Austin, TX",
  "latitude": 30.267153,
  "longitude": -97.743057,
  "images": [
    "https://scontent…/photo1.jpg",
    "https://scontent…/photo2.jpg",
    "..."
  ],
  "sellerName": null,
  "sellerProfileUrl": null,
  "deliveryType": "IN_PERSON",
  "listingUrl": "https://www.facebook.com/marketplace/item/1279908470484354/",
  "publishedAt": "2026-04-30T23:00:11.000Z",
  "scrapedAt": "2026-05-02T08:00:00.000Z",
  "attributes": {
    "subtitles": ["256 GB", "Like new"]
  },
  "isSold": false,
  "isPending": false,
  "_completeness": "full"
}
```

**Vehicle listings** additionally fill `attributes.vehicleMake`, `vehicleModel`, `vehicleYear`, `mileage`, `mileageUnit`, `transmission`, `fuelType`, `exteriorColor`, `interiorColor`, `vehicleSellerType`, `vin`.

**Property listings** additionally fill `attributes.bedrooms`, `bathrooms`, `areaSize`, `areaUnit`, `propertyType`, `yearBuilt`.

`_completeness` is `"basic"` when only card-level data was captured (search-only run, or detail page didn't return a usable SSR blob). `"full"` means detail-page enrichment landed.

`sellerName` and `sellerProfileUrl` are `null` in anonymous mode — Facebook hides seller PII server-side without login.

***

### Pricing

Pay-per-event with automatic Apify-plan discounts. You pay only for what's scraped — no subscription, no minimums.

| Event | Free | Starter | Scale | Business |
|---|---:|---:|---:|---:|
| **Record scraped** (per 1,000) | $0.70 | $0.50 | $0.50 | $0.50 |
| **Detail-enriched listing** (per 1,000) — fires when full description, GPS, photos, and category attributes are extracted | $2.00 | $1.00 | $1.00 | $1.00 |
| **Actor start** (per run) | $0.02 | $0.01 | $0.009 | $0.008 |

> Higher Apify plans (Starter / Scale / Business) automatically receive the discounted rates — nothing to configure.

#### What a typical run costs

| Mode | Free plan | Starter / Scale / Business |
|---|---:|---:|
| Search-only (1,000 listings, `scrapeDetails: false`) | **$0.72** | **$0.51** |
| Full detail (1,000 listings, default) | **$2.72** | **$1.51** |
| Search-only (10,000 listings) | **$7.02** | **$5.01** |
| Full detail (10,000 listings) | **$27.02** | **$15.01** |

Plus standard Apify residential-proxy traffic, billed to your account separately.

#### Cost vs alternatives

| Scraper | Full-detail 1K listings | Subscription |
|---|---:|---|
| **This actor (Starter+)** | **$1.51** | none |
| apify/facebook-marketplace-scraper | $2.60 | none |
| memo23/facebook-marketplace-cheerio | usage-based | $25/mo |
| datavoyantlab/facebook-marketplace-scraper | $0.45–$4.00 | $28/mo |
| webdatalabs/deal-finder | $44.00 (deals only) | none |

***

### How it stays reliable

Three defensive layers, in priority order:

1. **Inlined SSR JSON** — Facebook ships every page with multiple `<script type="application/json">` blobs containing the full GraphQL responses. The actor scans every script, walks the JSON tree (up to 20 levels deep), and **merges sibling target nodes** (`target` carries description, `marketplace_listing_renderable_target` carries condition, separate blob carries the photo array). Other scrapers grab the first match and miss half the data.
2. **Live `/api/graphql` interceptor** — when the page actually fires GraphQL calls (logged-in sessions or client-side re-fetches), those payloads are parsed too. Same parser, same field set.
3. **Open Graph meta tags** — `og:title`, `og:description` (truncated), `og:image` are always populated even if FB rotates its SSR shape.

Plus:

- **Per-context warm-up** — visit `/marketplace/` once before the real navigation, so FB's bot detector sees a "browser that browsed first" instead of a clean context jumping into a deep search URL.
- **Content-aware block detection** — only fail on `/login` redirects when there's no marketplace data on the page; FB often serves the full data with a login overlay on top.
- **ID-matching guard** — fields are only merged from items whose `id` matches the target listing, so the "Similar items" sidebar can't leak into your row.

***

### Common scenarios

#### Build a price-tracking feed

```json
{
  "searchQuery": "iphone 15",
  "city": "newyork",
  "scrapeDetails": false,
  "monitoringMode": true,
  "monitoringStoreName": "fb-iphone15-nyc-prices"
}
```

Schedule hourly. Each run only pushes listings you haven't seen — perfect for a `(timestamp, listingId, price)` time series.

#### Monitor a niche category

```json
{
  "city": "boston",
  "category": "musical-instruments",
  "monitoringMode": true,
  "monitoringStoreName": "fb-instruments-boston",
  "untilDate": "2026-04-01",
  "scrapeDetails": true
}
```

You only get instruments posted in April or later, never re-fetched once seen.

#### Strict comparison shopping

```json
{
  "searchQuery": "macbook pro 14",
  "city": "sanfrancisco",
  "strictMatch": true,
  "scrapeDetails": true
}
```

`strictMatch` drops any listing whose title doesn't contain both `"macbook"` and `"pro"` — no chargers, no docks, no accessories.

#### Used-car research

```json
{
  "city": "dallas",
  "category": "cars",
  "minPrice": 5000,
  "maxPrice": 25000,
  "condition": "used-good",
  "sortBy": "newest",
  "scrapeDetails": true,
  "maxResults": 200
}
```

Returns full vehicle attributes (`vehicleMake`, `vehicleModel`, `vehicleYear`, `mileage`, `transmission`, `fuelType`) for each listing.

***

### FAQ

**Q: Why does anonymous mode work? Other scrapers say login is required.**
Facebook serves Marketplace card and detail data anonymously to keep the page indexable by Google. The data is in inlined JSON blobs alongside the rendered HTML. Most scrapers only listen to live `/api/graphql` calls (which require login on detail pages) and miss the inlined version. This actor reads the inlined version directly.

**Q: When do I need cookies?**
Only if you need `sellerName` or `sellerProfileUrl`. Facebook hides those fields server-side from anonymous viewers regardless of how you scrape.

**Q: How do I supply cookies?**
Export your session as JSON (using the `EditThisCookie` browser extension, or Playwright's `context.storageState()`) and paste into `cookieState`. Format: `{ "cookies": [...] }`.

**Q: Why residential proxy and not datacenter?**
Facebook blocks datacenter IPs aggressively (CAPTCHA, login redirect, empty pages). Residential proxies look like normal home users and pass through.

**Q: Why is `price` sometimes `0` even when the listing isn't free?**
Some sellers leave the price field blank, and Facebook displays "$0" or "Free" placeholder text. The actor reflects what FB shows. Filter `price > 0` if you want priced-only.

**Q: What does `_completeness` mean?**

- `"basic"` — only card-level data (title, price, location, cover image, listing URL).
- `"full"` — detail-page enrichment landed (description, full photo array, GPS, category attributes).

**Q: My run failed with "Blocked: login-required" — what now?**
Rare since the content-aware block detection update. If it does happen, switch the proxy country (e.g. `proxyConfiguration.countryCode: "GB"`) or rerun with `maxConcurrency: 1`. FB's bot detection occasionally flags specific IPs.

**Q: Can I scrape sold listings?**
Yes. Look at `isSold` and `isPending` in the output — both come through on detail pages.

**Q: Does this work outside the US?**
Yes — anywhere Facebook Marketplace is available. Use Facebook's city slug in `city` (e.g. `london`, `paris`, `berlin`, `sydney`, `toronto`, `mexico`) or paste the full Marketplace URL into `searchUrls`. The actor knows 60+ city → country mappings for auto-proxy selection; for unlisted cities, set `proxyConfiguration.countryCode` manually.

**Q: How do I run incremental scrapes?**
Set `monitoringMode: true` and pick a `monitoringStoreName`. The actor stores seen listing IDs in an Apify Key-Value store and skips them on subsequent runs. Combine with a schedule (Apify Schedules tab) to build a hands-off feed of net-new listings.

***

### Issues / contact

Open an issue on this actor's page on Apify Store, or contact the maintainer through the Apify console.

# Actor input Schema

## `searchUrls` (type: `array`):

One or more Facebook Marketplace search or category URLs to scrape. Example: https://www.facebook.com/marketplace/newyork/search?query=laptop

## `searchQuery` (type: `string`):

Search keyword (e.g. 'iPhone 15', 'gaming laptop'). Used with city/category to build a search URL.

## `city` (type: `string`):

City slug for the search. Use Facebook's URL slug — e.g. newyork, losangeles, sanfrancisco, chicago, london, paris, berlin, sydney, toronto, mexico. Most spellings work as-is.

## `category` (type: `string`):

Category slug to filter results.

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

Sort order for search results.

## `condition` (type: `string`):

Filter by item condition.

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

Minimum price filter.

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

Maximum price filter.

## `radiusKm` (type: `integer`):

Search radius from the city center, in kilometers. Facebook caps this around 80 km. Leave empty for FB's default.

## `maxResults` (type: `integer`):

Maximum number of listings to scrape. Leave empty for unlimited.

## `strictMatch` (type: `boolean`):

When set with a Search Keyword, only return listings whose title contains every word of the query. Filters out Facebook's broad-match noise (e.g. "iphone 15" no longer returns chargers).

## `untilDate` (type: `string`):

Skip any listing posted before this date. Useful for incremental "what's new since yesterday" runs. Format: "2026-04-01" or "2026-04-01T00:00:00Z". Only applied when detail-page scraping captures a publish date.

## `monitoringMode` (type: `boolean`):

Track listing IDs across runs in a named Key-Value store and skip any IDs already pushed in earlier runs. Combine with a schedule to build an incremental feed. Set monitoringStoreName to use multiple independent watchlists.

## `monitoringStoreName` (type: `string`):

Name of the Apify Key-Value store used to remember seen IDs. Use different names to keep separate watchlists (e.g. "fb-iphones-nyc" vs "fb-cars-austin").

## `scrapeDetails` (type: `boolean`):

Visit each listing's detail page for full description, all images, seller info, and condition. Slower but much richer data.

## `maxConcurrency` (type: `integer`):

Number of parallel browser tabs (1-10). Higher = faster but more memory. Keep low (2-3) to avoid detection.

## `cookieState` (type: `string`):

Optional Facebook session cookies as JSON. Anonymous scraping works for public card data; supply cookies only to unlock detail-page fields (description, seller name, full image set). Export with EditThisCookie or Playwright's storageState(). See README.

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

Residential proxies strongly recommended. Datacenter IPs are blocked by Facebook.

## Actor input object example

```json
{
  "strictMatch": false,
  "monitoringMode": false,
  "monitoringStoreName": "fb-marketplace-seen",
  "scrapeDetails": true,
  "maxConcurrency": 3
}
```

# Actor output Schema

## `datasetUrl` (type: `string`):

Open the dataset to view, filter, or export the scraped listings.

## `csvUrl` (type: `string`):

Download the dataset as CSV.

## `consoleUrl` (type: `string`):

Browse, filter, and export the dataset in the Apify console.

# 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("worshipful_knife/facebook-marketplace-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("worshipful_knife/facebook-marketplace-scraper").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 worshipful_knife/facebook-marketplace-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=worshipful_knife/facebook-marketplace-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Facebook Marketplace Scraper",
        "description": "Reliable Facebook Marketplace scraper. Works without login — extracts titles, prices, full descriptions, GPS, photos, and category attributes (vehicle make/year/mileage, property bedrooms). Built-in monitoring mode for incremental scraping. Multi-source SSR JSON parser handles FB shape changes.",
        "version": "1.0",
        "x-build-id": "ERIA6ML4wcM4ODRO4"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/worshipful_knife~facebook-marketplace-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-worshipful_knife-facebook-marketplace-scraper",
                "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/worshipful_knife~facebook-marketplace-scraper/runs": {
            "post": {
                "operationId": "runs-sync-worshipful_knife-facebook-marketplace-scraper",
                "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/worshipful_knife~facebook-marketplace-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-worshipful_knife-facebook-marketplace-scraper",
                "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": {
                    "searchUrls": {
                        "title": "Search URLs",
                        "type": "array",
                        "description": "One or more Facebook Marketplace search or category URLs to scrape. Example: https://www.facebook.com/marketplace/newyork/search?query=laptop",
                        "items": {
                            "type": "string"
                        }
                    },
                    "searchQuery": {
                        "title": "Search Keyword",
                        "type": "string",
                        "description": "Search keyword (e.g. 'iPhone 15', 'gaming laptop'). Used with city/category to build a search URL."
                    },
                    "city": {
                        "title": "City",
                        "type": "string",
                        "description": "City slug for the search. Use Facebook's URL slug — e.g. newyork, losangeles, sanfrancisco, chicago, london, paris, berlin, sydney, toronto, mexico. Most spellings work as-is."
                    },
                    "category": {
                        "title": "Category",
                        "enum": [
                            "vehicles",
                            "cars",
                            "motorcycles",
                            "trucks",
                            "boats",
                            "property-rentals",
                            "property-sales",
                            "electronics",
                            "phones",
                            "computers",
                            "tablets",
                            "tvs",
                            "video-games",
                            "cameras",
                            "furniture",
                            "home-garden",
                            "appliances",
                            "clothing",
                            "shoes",
                            "accessories",
                            "jewelry",
                            "sports",
                            "musical-instruments",
                            "books",
                            "toys-games",
                            "baby-kids",
                            "pet-supplies",
                            "office-supplies",
                            "free-stuff",
                            "garage-sale",
                            "miscellaneous"
                        ],
                        "type": "string",
                        "description": "Category slug to filter results."
                    },
                    "sortBy": {
                        "title": "Sort By",
                        "enum": [
                            "best-match",
                            "newest",
                            "price-low",
                            "price-high",
                            "distance"
                        ],
                        "type": "string",
                        "description": "Sort order for search results."
                    },
                    "condition": {
                        "title": "Condition",
                        "enum": [
                            "new",
                            "used-like-new",
                            "used-good",
                            "used-fair"
                        ],
                        "type": "string",
                        "description": "Filter by item condition."
                    },
                    "minPrice": {
                        "title": "Min Price",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Minimum price filter."
                    },
                    "maxPrice": {
                        "title": "Max Price",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Maximum price filter."
                    },
                    "radiusKm": {
                        "title": "Search Radius (km)",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Search radius from the city center, in kilometers. Facebook caps this around 80 km. Leave empty for FB's default."
                    },
                    "maxResults": {
                        "title": "Max Results",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of listings to scrape. Leave empty for unlimited."
                    },
                    "strictMatch": {
                        "title": "Strict keyword match",
                        "type": "boolean",
                        "description": "When set with a Search Keyword, only return listings whose title contains every word of the query. Filters out Facebook's broad-match noise (e.g. \"iphone 15\" no longer returns chargers).",
                        "default": false
                    },
                    "untilDate": {
                        "title": "Only listings since (ISO date)",
                        "type": "string",
                        "description": "Skip any listing posted before this date. Useful for incremental \"what's new since yesterday\" runs. Format: \"2026-04-01\" or \"2026-04-01T00:00:00Z\". Only applied when detail-page scraping captures a publish date."
                    },
                    "monitoringMode": {
                        "title": "Monitoring mode (skip already-seen)",
                        "type": "boolean",
                        "description": "Track listing IDs across runs in a named Key-Value store and skip any IDs already pushed in earlier runs. Combine with a schedule to build an incremental feed. Set monitoringStoreName to use multiple independent watchlists.",
                        "default": false
                    },
                    "monitoringStoreName": {
                        "title": "Monitoring store name",
                        "type": "string",
                        "description": "Name of the Apify Key-Value store used to remember seen IDs. Use different names to keep separate watchlists (e.g. \"fb-iphones-nyc\" vs \"fb-cars-austin\").",
                        "default": "fb-marketplace-seen"
                    },
                    "scrapeDetails": {
                        "title": "Scrape Detail Pages",
                        "type": "boolean",
                        "description": "Visit each listing's detail page for full description, all images, seller info, and condition. Slower but much richer data.",
                        "default": true
                    },
                    "maxConcurrency": {
                        "title": "Max Concurrency",
                        "minimum": 1,
                        "maximum": 10,
                        "type": "integer",
                        "description": "Number of parallel browser tabs (1-10). Higher = faster but more memory. Keep low (2-3) to avoid detection.",
                        "default": 3
                    },
                    "cookieState": {
                        "title": "Browser Cookie State (JSON, optional)",
                        "type": "string",
                        "description": "Optional Facebook session cookies as JSON. Anonymous scraping works for public card data; supply cookies only to unlock detail-page fields (description, seller name, full image set). Export with EditThisCookie or Playwright's storageState(). See README."
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Residential proxies strongly recommended. Datacenter IPs are blocked by Facebook."
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
