# Facebook Marketplace \[$0.9💰] Scraper (`blackfalcondata/facebook-marketplace-scraper`) Actor

Scrape facebook.com Marketplace listings by keyword + location with price, condition, radius & detail enrichment. Incremental new-listing monitoring, MCP export, no login required.

- **URL**: https://apify.com/blackfalcondata/facebook-marketplace-scraper.md
- **Developed by:** [Black Falcon Data](https://apify.com/blackfalcondata) (community)
- **Categories:** E-commerce, Lead generation, Automation
- **Stats:** 8 total users, 6 monthly users, 93.1% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.90 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

### What does Facebook Marketplace Scraper do?

Facebook Marketplace Scraper extracts structured listing data from [facebook.com](https://facebook.com) — including price, condition, full descriptions, photos, exact coordinates, and location. It supports keyword and location search within a radius, plus price, condition, recency, and category filters, so you can run the same query consistently over time.

### How to use this actor

- 👉 **Register for a free Apify account** — no credit card required.
- 🎉 Just click **[Sign up free on Apify →](https://console.apify.com/sign-up?fpr=1h3gvi&fp_sid=ctarich)** and complete a quick signup.
- 💰 A free Apify account includes $5 in monthly credits — enough to test this actor.
- ⏳ Scrape during the free trial, with no commitment or upfront payment required.

### Key features

<!-- KEY_FEATURES:START -->
- **📋 Full listing detail** — enrich each listing with its full description, attributes (condition, type), category, post date, photos, and exact map coordinates. Toggle off for speed.
- **💵 Structured pricing** — price, currency, and the original (strikethrough) price when an item is marked down — spot deals and track price changes.
- **🎯 Batch searches** — pass a JSON array of keywords or locations to run many searches in one run — one dataset, deduplicated by listing id, a single Actor-Start charge.
- **🔗 Paste-mode** — build the search you want in your browser (keyword, price, condition, recency), copy the URL, and paste it in. Each pasted URL runs as its own search with its own filters — mix several in one run; results merge and dedupe by listing id.
- **🔔 Notifications** — Telegram, Slack, Discord, WhatsApp Cloud API, and generic webhook out of the box. Pair with incremental for daily new-listing alerts without pipeline glue.
- **📦 Compact mode** — AI-agent and MCP-friendly payloads with core fields only.
- **✂️ Description truncation** — cap description length with `descriptionMaxLength` to control LLM prompt cost and dataset size — set 0 for full descriptions, or any char-limit to trim.
- **♻️ Incremental mode** — recurring runs return only NEW and UPDATED listings since last run — ideal for "newest listings" monitoring without re-paying for the whole feed.
- **📤 Export anywhere** — Download the dataset as JSON, CSV, or Excel from the Apify Console, or stream live via the Apify API and integrations (Make, Zapier, Google Sheets, n8n, …).
- **🔌 MCP connectors** — export your results into Notion via Apify's MCP connectors — a clean run-summary page, no glue code. Opt-in via the App connector field; deterministic field-mapping, no AI. Built on Apify's connector framework, so more destinations open up as their catalog grows.
<!-- KEY_FEATURES:END -->

### What data can you extract from Facebook Marketplace?

Each result includes Core listing fields (`listingId`, `title`, `priceText`, `priceValue`, `priceCurrency`, `strikethroughPriceText`, `condition`, and `attributes`, and more) and detail fields when enrichment is enabled (`description` and `detailFetched`). In standard mode, all fields are always present — unavailable data points are returned as `null`, never omitted. In compact mode, only core fields are returned.

Enable detail enrichment in the input to get richer fields such as full descriptions where the source provides them.

### Input

The main inputs are a search keyword, an optional location filter, and a result limit. Additional filters and options are available in the input schema.

Key parameters:

- **`query`** — What to search for (e.g. "used bicycle", "iphone 15"). Paste a JSON array like ["bike","scooter"] to run several searches in one go. Leave empty only if you turn on "Browse without a query" below — otherwise an empty query is a no-op.
- **`startUrls`** — Paste one or more Facebook Marketplace search URLs. Build the search you want in your browser (keyword, price, condition, recency), copy the URL from the address bar, and paste it here. Each URL runs as its own search with its filters, and results from multiple URLs are merged and deduplicated. Paste a search-results URL, not an individual listing URL. Takes precedence over Search keyword and the filters below. Tip: Facebook hides the city behind an internal location code in the URL — if a pasted URL has no readable city, also set the Location below so results are anchored correctly. The legacy field name `searchUrls` is also accepted. (default: `[]`)
- **`location`** — City or area to search around (e.g. "Seattle, WA", "Austin, Texas"). Required unless you provide coordinates below.
- **`radiusKm`** — How far around the location to search, in kilometers. (default: `65`)
- **`latitude`** — Optional. Exact latitude to search around — overrides Location. Pair with Longitude.
- **`longitude`** — Optional. Exact longitude to search around. Pair with Latitude.
- **`minPrice`** — Only listings priced at or above this amount (in the marketplace's local currency).
- **`maxPrice`** — Only listings priced at or below this amount.
- **`conditions`** — Only listings in the selected condition(s). Leave empty for any condition. (default: `[]`)
- **`daysSinceListed`** — Only listings posted within the last N days. Leave empty for any time.
- **`categoryId`** — Optional Facebook Marketplace category ID to restrict results.
- **`strictQueryMatch`** — Drop listings whose title is missing your search terms. Facebook ranks loosely (a "4002019" search can return "4002017"), so this keeps results on-topic. Turn off to get Facebook's full fuzzy ranking, including loosely related items. (default: `true`)
- ...and 22 more parameters

### Input examples

**Basic search** — Keyword-driven search scoped to a city with a tight radius.

→ Full payload per result — all standard fields populated where the source provides them.

```json
{
  "query": "used bicycle",
  "location": "Seattle, WA",
  "radiusKm": 25,
  "maxResults": 50
}
````

**Incremental tracking** — Only emit listings that changed since the previous run with this `stateKey`.

→ First run builds the baseline state. Subsequent runs emit only records that are new or whose tracked content changed. Set `emitUnchanged: true` to include unchanged records as well.

```json
{
  "query": "used bicycle",
  "maxResults": 200,
  "incrementalMode": true,
  "stateKey": "used-bicycle-tracker"
}
```

**Compact output for AI agents** — Return only core fields for AI-agent and MCP workflows.

→ Small payload with the most important fields — ideal for piping into LLMs without token overhead.

```json
{
  "query": "used bicycle",
  "maxResults": 50,
  "compact": true
}
```

### Output

Each run produces a dataset of structured listing records. Results can be downloaded as JSON, CSV, or Excel from the Dataset tab in Apify Console.

### Example listing record

```json
{
  "listingId": "1716449899487434",
  "title": "Bicycle",
  "description": "Nice riding  geared bike good tires and seat ready to ride in burien",
  "priceText": "$20",
  "priceValue": 20,
  "priceCurrency": "USD",
  "condition": "Used - Good",
  "attributes": [
    "Condition: Used - Good"
  ],
  "category": "Bicycles",
  "categoryId": "1658310421102081",
  "locationText": "Seattle, Washington",
  "city": "Seattle",
  "state": "WA",
  "latitude": 47.590026855469,
  "longitude": -122.31628417969,
  "imageUrl": "https://scontent-atl3-3.xx.fbcdn.net/v/t39.84726-6/727559713_875778768328207_3397236749704177900_n.jpg?stp=c0.42.261.261a_dst-jpg_p261x260_tt6&_nc_cat=111&ccb=1-7&_nc_sid=92e707&_nc_ohc=MiaCnvh8bccQ7k...",
  "galleryUrls": [
    "https://scontent-atl3-3.xx.fbcdn.net/v/t39.84726-6/727559713_875778768328207_3397236749704177900_n.jpg?stp=dst-jpg_s960x960_tt6&_nc_cat=111&ccb=1-7&_nc_sid=92e707&_nc_ohc=MiaCnvh8bccQ7kNvwEMz_uf&_nc_o...",
    "https://scontent-atl3-1.xx.fbcdn.net/v/t45.5328-4/726405186_952313127862889_9210454913705857801_n.jpg?stp=dst-jpg_s960x960_tt6&_nc_cat=103&ccb=1-7&_nc_sid=247b10&_nc_ohc=5h3GHUL0Zc0Q7kNvwGN_1aD&_nc_oc...",
    "https://scontent-atl3-3.xx.fbcdn.net/v/t45.5328-4/727518638_1009013258519502_2102461878453193289_n.jpg?stp=dst-jpg_s960x960_tt6&_nc_cat=107&ccb=1-7&_nc_sid=247b10&_nc_ohc=00pJggRjgkkQ7kNvwFV25CO&_nc_o...",
    "https://scontent-atl3-3.xx.fbcdn.net/v/t45.5328-4/726420440_37421054290814947_558415698593534919_n.jpg?stp=dst-jpg_s960x960_tt6&_nc_cat=110&ccb=1-7&_nc_sid=247b10&_nc_ohc=OvnRXyGacCYQ7kNvwEAGUsn&_nc_o..."
  ],
  "deliveryTypes": [
    "IN_PERSON"
  ],
  "isLive": true,
  "isPending": false,
  "isSold": false,
  "publishedAt": "2026-06-13T16:08:58.000Z",
  "publishedAtEpoch": 1781366938,
  "url": "https://www.facebook.com/marketplace/item/1716449899487434/",
  "searchQuery": "bicycle",
  "resolvedLocation": "Seattle, King County, Washington, United States",
  "contentQuality": "full",
  "detailFetched": true,
  "scrapedAt": "2026-06-20T13:45:30.269Z",
  "source": "facebook.com"
}
```

### Incremental fields

When incremental mode is on, each record also carries:

- `changeType` — one of `NEW`, `UPDATED`, `UNCHANGED`, `REAPPEARED`, `EXPIRED`. Default output covers `NEW` / `UPDATED` / `REAPPEARED`; set `emitUnchanged: true` to opt into the others.

### How to scrape Facebook Marketplace

1. Go to [Facebook Marketplace Scraper](https://apify.com/blackfalcondata/facebook-marketplace-scraper?fpr=1h3gvi) in Apify Console.
2. Enter a search keyword and optional location filter.
3. Set `maxResults` to control how many results you need.
4. Enable `includeDetails` if you need full descriptions.
5. Click **Start** and wait for the run to finish.
6. Export the dataset as JSON, CSV, or Excel.

### Use cases

- Extract listing data from Facebook Marketplace for market research and competitive analysis.
- Track pricing trends across regions and categories over time.
- Monitor new and changed listings on scheduled runs without processing the full dataset every time.
- Use structured location data for regional analysis, mapping, and geo-targeting.
- Feed structured data into AI agents, MCP tools, and automated pipelines using compact mode.
- Export clean, structured data to dashboards, spreadsheets, or data warehouses.

### How much does it cost to scrape Facebook Marketplace?

Facebook Marketplace Scraper uses [pay-per-event](https://docs.apify.com/platform/actors/paid-actors/pay-per-event) pricing. You pay a small fee when the run starts and then for each result that is actually produced.

- **Run start:** $0.005 per run
- **Per result:** $0.0009 per listing record

Example costs:

- 10 results: **$0.014**
- 25 results: **$0.028**
- 100 results: **$0.095**
- 200 results: **$0.18**
- 500 results: **$0.46**

#### Example: recurring monitoring savings

These examples compare full re-scrapes with incremental runs at different churn rates. Churn is the share of listings that are new or whose tracked content changed since the previous run. Actual churn depends on your query breadth, source activity, and polling frequency — the scenarios below are examples, not predictions.

Example setup: 200 results per run, daily polling (30 runs/month). Event-pricing examples scale linearly with result count.

| Churn rate | Full re-scrape run cost | Incremental run cost | Savings vs full re-scrape | Monthly cost after baseline |
|---|---:|---:|---:|---:|
| 5% — stable niche query | $0.18 | $0.01 | $0.17 (92%) | $0.42 |
| 15% — moderate broad query | $0.18 | $0.03 | $0.15 (83%) | $0.96 |
| 30% — high-volume aggregator | $0.18 | $0.06 | $0.13 (68%) | $1.77 |

Full re-scrape monthly cost at daily polling: $5.55. First month with incremental costs $0.59 / $1.11 / $1.90 for the 5% / 15% / 30% scenarios because the first run builds baseline state at full cost before incremental savings apply.

Platform usage (compute and proxies) is billed separately by Apify based on actual consumption. Incremental runs consume less on result processing, though fixed per-run overhead stays the same.

### FAQ

#### How many results can I get from Facebook Marketplace?

The number of results depends on the search query and available listings on Facebook Marketplace. Use the `maxResults` parameter to control how many results are returned per run.

#### Does Facebook Marketplace Scraper support recurring monitoring?

Yes. Enable incremental mode to only receive new or changed listings on subsequent runs. This is ideal for scheduled monitoring where you want to track changes over time without re-processing the full dataset.

#### Can I integrate Facebook Marketplace Scraper with other apps?

Yes. Facebook Marketplace Scraper works with Apify's [integrations](https://apify.com/integrations?fpr=1h3gvi) to connect with tools like Zapier, Make, Google Sheets, Slack, and more. You can also use webhooks to trigger actions when a run completes.

#### Can I use Facebook Marketplace Scraper with the Apify API?

Yes. You can start runs, manage inputs, and retrieve results programmatically through the [Apify API](https://docs.apify.com/api/v2). Client libraries are available for JavaScript, Python, and other languages.

#### Can I use Facebook Marketplace Scraper through an MCP Server?

Yes. Apify provides an [MCP Server](https://apify.com/apify/actors-mcp-server?fpr=1h3gvi) that lets AI assistants and agents call this actor directly. Use compact mode and `descriptionMaxLength` to keep payloads manageable for LLM context windows.

#### Is it legal to scrape Facebook Marketplace?

This actor extracts publicly available data from Facebook Marketplace. Web scraping of public information is generally considered legal, but you should always review the target site's terms of service and ensure your use case complies with applicable laws and regulations, including GDPR where relevant.

#### Your feedback

If you have questions, need a feature, or found a bug, please [open an issue](https://apify.com/blackfalcondata/facebook-marketplace-scraper/issues?fpr=1h3gvi) on the actor's page in Apify Console. Your feedback helps us improve.

### You might also like

- [🚗 mobile.de \[$1/1K💰\] Fast Scraper · Finance · Dealer GPS](https://apify.com/blackfalcondata/mobile-de-scraper?fpr=1h3gvi) — Scrape mobile.de — Germany's largest car marketplace (1.4M+ listings) at $1 / 1,000 results. Full.
- [AutoScout24 Scraper — European Car Listings with Dealer Data](https://apify.com/blackfalcondata/autoscout24-scraper?fpr=1h3gvi) — Scrape autoscout24.com — Europe's largest used-car marketplace with 770K+ listings across 8.
- [Autotrader AU \[$0.9💰\] Car & Caravan Scraper 🇦🇺](https://apify.com/blackfalcondata/autotrader-au-scraper?fpr=1h3gvi) — Scrape autotrader.com.au car & caravan listings — advertised + previous price with a computed.
- [Autotrader Canada Scraper — Car & Truck Listings + Dealers](https://apify.com/blackfalcondata/autotrader-ca-scraper?fpr=1h3gvi) — Scrape autotrader.ca — Canada's largest car marketplace. Get structured make/model/year/price.
- [Autotrader UK \[$0.75💰/1K\] - Car Scraper, Full Detail](https://apify.com/blackfalcondata/autotrader-uk-scraper?fpr=1h3gvi) — Scrape UK car listings from Auto Trader by make, model, price, year, mileage, fuel, and body type..
- [Bilbasen Scraper - Denmark’s Car Marketplace](https://apify.com/blackfalcondata/bilbasen-scraper?fpr=1h3gvi) — Scrape bilbasen.dk, Denmark’s largest car marketplace, with full vehicle specs, seller contacts,.
- [Bilka Scraper - Danish Grocery Products & Prices](https://apify.com/blackfalcondata/bilka-scraper?fpr=1h3gvi) — Scrape Bilka (Salling Group), Denmark's largest hypermarket chain. Get the full product catalog.
- [Coches.net Scraper — Used Cars, Vans & Motorbikes in Spain](https://apify.com/blackfalcondata/coches-scraper?fpr=1h3gvi) — Coches.net Scraper — scrape car, van, motorhome, classic & motorcycle listings from Spain's largest.

### Getting started with Apify

New to Apify? [Create a free account with $5 credit](https://console.apify.com/sign-up?fpr=1h3gvi\&fp_sid=ctarich) — no credit card required.

1. Sign up — $5 platform credit included
2. Open this actor and configure your input
3. Click **Start** — export results as JSON, CSV, or Excel

Need more later? [See Apify pricing](https://apify.com/pricing?fpr=1h3gvi).

# Actor input Schema

## `query` (type: `string`):

What to search for (e.g. "used bicycle", "iphone 15"). Paste a JSON array like \["bike","scooter"] to run several searches in one go. Leave empty only if you turn on "Browse without a query" below — otherwise an empty query is a no-op.

## `startUrls` (type: `array`):

Paste one or more Facebook Marketplace search URLs. Build the search you want in your browser (keyword, price, condition, recency), copy the URL from the address bar, and paste it here. Each URL runs as its own search with its filters, and results from multiple URLs are merged and deduplicated. Paste a search-results URL, not an individual listing URL. Takes precedence over Search keyword and the filters below. Tip: Facebook hides the city behind an internal location code in the URL — if a pasted URL has no readable city, also set the Location below so results are anchored correctly. The legacy field name `searchUrls` is also accepted.

## `location` (type: `string`):

City or area to search around (e.g. "Seattle, WA", "Austin, Texas"). Required unless you provide coordinates below.

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

How far around the location to search, in kilometers.

## `latitude` (type: `number`):

Optional. Exact latitude to search around — overrides Location. Pair with Longitude.

## `longitude` (type: `number`):

Optional. Exact longitude to search around. Pair with Latitude.

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

Only listings priced at or above this amount (in the marketplace's local currency).

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

Only listings priced at or below this amount.

## `conditions` (type: `array`):

Only listings in the selected condition(s). Leave empty for any condition.

## `daysSinceListed` (type: `integer`):

Only listings posted within the last N days. Leave empty for any time.

## `categoryId` (type: `string`):

Optional Facebook Marketplace category ID to restrict results.

## `strictQueryMatch` (type: `boolean`):

Drop listings whose title is missing your search terms. Facebook ranks loosely (a "4002019" search can return "4002017"), so this keeps results on-topic. Turn off to get Facebook's full fuzzy ranking, including loosely related items.

## `browseWithoutQuery` (type: `boolean`):

Allow running with an empty search keyword to pull the whole location feed. Off by default, because an empty query otherwise returns thousands of unrelated listings. Only turn this on if you deliberately want to browse everything near a location.

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

Maximum number of listings to return (0 = as many as available).

## `includeDetails` (type: `boolean`):

Fetch each listing's full description, attributes (condition, type…) and post date. Turn off for faster, cheaper, lighter results.

## `descriptionMaxLength` (type: `integer`):

Truncate descriptions to N characters (0 = no truncation). Useful for AI/agent workflows.

## `compact` (type: `boolean`):

Return only the core fields — ideal for AI agents and MCP workflows.

## `incrementalMode` (type: `boolean`):

Track listings across runs and only return NEW and UPDATED ones since last run. Perfect for monitoring new listings.

## `stateKey` (type: `string`):

Optional stable identifier for the tracked search. Leave empty to auto-generate from your search inputs.

## `emitUnchanged` (type: `boolean`):

When incremental mode is on, also return listings that haven't changed since last run.

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

Proxy configuration. Residential US is recommended and used by default.

## `telegramToken` (type: `string`):

Telegram bot token (from @BotFather). Required for Telegram notifications.

## `telegramChatId` (type: `string`):

Telegram chat or channel ID. Required when a Telegram token is set.

## `discordWebhookUrl` (type: `string`):

Discord incoming webhook URL.

## `slackWebhookUrl` (type: `string`):

Slack incoming webhook URL.

## `whatsappAccessToken` (type: `string`):

WhatsApp Cloud API access token. Recipient must have messaged the business number within the last 24h.

## `whatsappPhoneNumberId` (type: `string`):

Your WhatsApp Business phone-number ID. Required when a WhatsApp token is set.

## `whatsappTo` (type: `string`):

Recipient phone in E.164 format without + (e.g. "14155552671").

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

Receives a JSON POST with {metadata, items} after each run. Works with n8n / Make / Zapier / custom backends.

## `webhookHeaders` (type: `object`):

Optional JSON object of custom headers (e.g. {"Authorization":"Bearer ..."}).

## `notificationLimit` (type: `integer`):

Maximum listings included in each notification message (1–20).

## `notifyOnlyChanges` (type: `boolean`):

In incremental mode, only notify for NEW and UPDATED listings.

## `appConnector` (type: `string`):

Optional. Pick a connected app under Settings → API & Integrations (Notion, Slack, Google Sheets, Linear…) to receive your results.

## `mcpIssueTeam` (type: `string`):

Only when the connected app is an issue tracker: the team the summary issue is created under, if required.

## Actor input object example

```json
{
  "query": "used bicycle",
  "startUrls": [],
  "location": "Seattle, WA",
  "radiusKm": 65,
  "conditions": [],
  "strictQueryMatch": true,
  "browseWithoutQuery": false,
  "maxResults": 5,
  "includeDetails": true,
  "descriptionMaxLength": 0,
  "compact": false,
  "incrementalMode": false,
  "emitUnchanged": false,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  },
  "notificationLimit": 5,
  "notifyOnlyChanges": false
}
```

# Actor output Schema

## `results` (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 = {
    "query": "used bicycle",
    "startUrls": [],
    "location": "Seattle, WA",
    "maxResults": 5,
    "proxy": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "US"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("blackfalcondata/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 = {
    "query": "used bicycle",
    "startUrls": [],
    "location": "Seattle, WA",
    "maxResults": 5,
    "proxy": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "US",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("blackfalcondata/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 '{
  "query": "used bicycle",
  "startUrls": [],
  "location": "Seattle, WA",
  "maxResults": 5,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}' |
apify call blackfalcondata/facebook-marketplace-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Facebook Marketplace [$0.9💰] Scraper",
        "description": "Scrape facebook.com Marketplace listings by keyword + location with price, condition, radius & detail enrichment. Incremental new-listing monitoring, MCP export, no login required.",
        "version": "0.1",
        "x-build-id": "GomGUmBiHuvqTgwAB"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/blackfalcondata~facebook-marketplace-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-blackfalcondata-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/blackfalcondata~facebook-marketplace-scraper/runs": {
            "post": {
                "operationId": "runs-sync-blackfalcondata-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/blackfalcondata~facebook-marketplace-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-blackfalcondata-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": {
                    "query": {
                        "title": "🔍 Search keyword",
                        "type": "string",
                        "description": "What to search for (e.g. \"used bicycle\", \"iphone 15\"). Paste a JSON array like [\"bike\",\"scooter\"] to run several searches in one go. Leave empty only if you turn on \"Browse without a query\" below — otherwise an empty query is a no-op."
                    },
                    "startUrls": {
                        "title": "🔗 Start URLs (paste-mode)",
                        "type": "array",
                        "description": "Paste one or more Facebook Marketplace search URLs. Build the search you want in your browser (keyword, price, condition, recency), copy the URL from the address bar, and paste it here. Each URL runs as its own search with its filters, and results from multiple URLs are merged and deduplicated. Paste a search-results URL, not an individual listing URL. Takes precedence over Search keyword and the filters below. Tip: Facebook hides the city behind an internal location code in the URL — if a pasted URL has no readable city, also set the Location below so results are anchored correctly. The legacy field name `searchUrls` is also accepted.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "location": {
                        "title": "📍 Location",
                        "type": "string",
                        "description": "City or area to search around (e.g. \"Seattle, WA\", \"Austin, Texas\"). Required unless you provide coordinates below."
                    },
                    "radiusKm": {
                        "title": "📏 Search radius (km)",
                        "minimum": 1,
                        "maximum": 500,
                        "type": "integer",
                        "description": "How far around the location to search, in kilometers.",
                        "default": 65
                    },
                    "latitude": {
                        "title": "🌐 Latitude (advanced)",
                        "minimum": -90,
                        "maximum": 90,
                        "type": "number",
                        "description": "Optional. Exact latitude to search around — overrides Location. Pair with Longitude."
                    },
                    "longitude": {
                        "title": "🌐 Longitude (advanced)",
                        "minimum": -180,
                        "maximum": 180,
                        "type": "number",
                        "description": "Optional. Exact longitude to search around. Pair with Latitude."
                    },
                    "minPrice": {
                        "title": "💵 Minimum price",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Only listings priced at or above this amount (in the marketplace's local currency)."
                    },
                    "maxPrice": {
                        "title": "💵 Maximum price",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Only listings priced at or below this amount."
                    },
                    "conditions": {
                        "title": "🏷️ Condition",
                        "type": "array",
                        "description": "Only listings in the selected condition(s). Leave empty for any condition.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "new",
                                "used_like_new",
                                "used_good",
                                "used_fair"
                            ],
                            "enumTitles": [
                                "New",
                                "Used – like new",
                                "Used – good",
                                "Used – fair"
                            ]
                        },
                        "default": []
                    },
                    "daysSinceListed": {
                        "title": "🕒 Listed within (days)",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Only listings posted within the last N days. Leave empty for any time."
                    },
                    "categoryId": {
                        "title": "🗂️ Category ID (advanced)",
                        "type": "string",
                        "description": "Optional Facebook Marketplace category ID to restrict results."
                    },
                    "strictQueryMatch": {
                        "title": "🎯 Strict query match",
                        "type": "boolean",
                        "description": "Drop listings whose title is missing your search terms. Facebook ranks loosely (a \"4002019\" search can return \"4002017\"), so this keeps results on-topic. Turn off to get Facebook's full fuzzy ranking, including loosely related items.",
                        "default": true
                    },
                    "browseWithoutQuery": {
                        "title": "🌊 Browse without a query",
                        "type": "boolean",
                        "description": "Allow running with an empty search keyword to pull the whole location feed. Off by default, because an empty query otherwise returns thousands of unrelated listings. Only turn this on if you deliberately want to browse everything near a location.",
                        "default": false
                    },
                    "maxResults": {
                        "title": "💯 Max results",
                        "minimum": 0,
                        "maximum": 2000,
                        "type": "integer",
                        "description": "Maximum number of listings to return (0 = as many as available).",
                        "default": 50
                    },
                    "includeDetails": {
                        "title": "📋 Include full details",
                        "type": "boolean",
                        "description": "Fetch each listing's full description, attributes (condition, type…) and post date. Turn off for faster, cheaper, lighter results.",
                        "default": true
                    },
                    "descriptionMaxLength": {
                        "title": "✂️ Description max length",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Truncate descriptions to N characters (0 = no truncation). Useful for AI/agent workflows.",
                        "default": 0
                    },
                    "compact": {
                        "title": "📦 Compact output",
                        "type": "boolean",
                        "description": "Return only the core fields — ideal for AI agents and MCP workflows.",
                        "default": false
                    },
                    "incrementalMode": {
                        "title": "♻️ Incremental mode",
                        "type": "boolean",
                        "description": "Track listings across runs and only return NEW and UPDATED ones since last run. Perfect for monitoring new listings.",
                        "default": false
                    },
                    "stateKey": {
                        "title": "🔑 State key (advanced)",
                        "type": "string",
                        "description": "Optional stable identifier for the tracked search. Leave empty to auto-generate from your search inputs."
                    },
                    "emitUnchanged": {
                        "title": "🔁 Include unchanged",
                        "type": "boolean",
                        "description": "When incremental mode is on, also return listings that haven't changed since last run.",
                        "default": false
                    },
                    "proxy": {
                        "title": "🌐 Proxy",
                        "type": "object",
                        "description": "Proxy configuration. Residential US is recommended and used by default.",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ],
                            "apifyProxyCountry": "US"
                        }
                    },
                    "telegramToken": {
                        "title": "🔑 Telegram bot token",
                        "type": "string",
                        "description": "Telegram bot token (from @BotFather). Required for Telegram notifications."
                    },
                    "telegramChatId": {
                        "title": "💬 Telegram chat ID",
                        "type": "string",
                        "description": "Telegram chat or channel ID. Required when a Telegram token is set."
                    },
                    "discordWebhookUrl": {
                        "title": "🎮 Discord webhook URL",
                        "type": "string",
                        "description": "Discord incoming webhook URL."
                    },
                    "slackWebhookUrl": {
                        "title": "💼 Slack webhook URL",
                        "type": "string",
                        "description": "Slack incoming webhook URL."
                    },
                    "whatsappAccessToken": {
                        "title": "📱 WhatsApp access token",
                        "type": "string",
                        "description": "WhatsApp Cloud API access token. Recipient must have messaged the business number within the last 24h."
                    },
                    "whatsappPhoneNumberId": {
                        "title": "📞 WhatsApp phone number ID",
                        "type": "string",
                        "description": "Your WhatsApp Business phone-number ID. Required when a WhatsApp token is set."
                    },
                    "whatsappTo": {
                        "title": "📲 WhatsApp recipient",
                        "type": "string",
                        "description": "Recipient phone in E.164 format without + (e.g. \"14155552671\")."
                    },
                    "webhookUrl": {
                        "title": "🪝 Webhook URL",
                        "type": "string",
                        "description": "Receives a JSON POST with {metadata, items} after each run. Works with n8n / Make / Zapier / custom backends."
                    },
                    "webhookHeaders": {
                        "title": "📋 Webhook headers",
                        "type": "object",
                        "description": "Optional JSON object of custom headers (e.g. {\"Authorization\":\"Bearer ...\"})."
                    },
                    "notificationLimit": {
                        "title": "📊 Max listings per notification",
                        "minimum": 1,
                        "maximum": 20,
                        "type": "integer",
                        "description": "Maximum listings included in each notification message (1–20).",
                        "default": 5
                    },
                    "notifyOnlyChanges": {
                        "title": "🔄 Notify only new/updated",
                        "type": "boolean",
                        "description": "In incremental mode, only notify for NEW and UPDATED listings.",
                        "default": false
                    },
                    "appConnector": {
                        "title": "Send results to a connected app",
                        "type": "string",
                        "description": "Optional. Pick a connected app under Settings → API & Integrations (Notion, Slack, Google Sheets, Linear…) to receive your results."
                    },
                    "mcpIssueTeam": {
                        "title": "Issue tracker team",
                        "type": "string",
                        "description": "Only when the connected app is an issue tracker: the team the summary issue is created under, if required."
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
