# Facebook Marketplace Scraper — Listings, Prices & Vehicles (`crawloop/facebook-marketplace-scraper`) Actor

Scrape Facebook Marketplace by keyword or URL. Export title, price, location, photos, vehicle specs, and listing status. Privacy-safe mode, monitoring, batch keywords. Fast curl\_cffi HTTP scraper with residential proxy support.

- **URL**: https://apify.com/crawloop/facebook-marketplace-scraper.md
- **Developed by:** [Andrej Kiva](https://apify.com/crawloop) (community)
- **Categories:** E-commerce, Developer tools, Automation
- **Stats:** 5 total users, 2 monthly users, 90.2% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 marketplace listings

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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 — Listings, Prices, Vehicles & Monitoring

> **Disclaimer:** Unofficial tool — not affiliated with, sponsored by, or endorsed by Meta or its affiliates. Data is read from publicly accessible pages only. No login. You are responsible for complying with applicable law (including GDPR where personal data appears) and the site’s terms. No warranty on accuracy or availability. Provided for informational and research use.

> **Contact-data controls:** Seller identity and phones/emails are excluded by the default privacy-safe mode. Authenticated cookies are not accepted. Any contact-field examples below assume that explicit opt-in; otherwise those fields are absent.

Scrape **Facebook Marketplace listings** by **keyword** or **search URL** — no login required. Export **title**, **price**, **location**, **photos**, **vehicle specs** (make, model, mileage, transmission), **listing status**, and **date listed** as clean JSON or CSV. Built for **resale arbitrage**, **used-car research**, **price monitoring**, **lead alerts**, and **marketplace data pipelines**.

**Privacy-safe by default** — seller identity, precise coordinates, VIN, and contact info in descriptions are stripped or redacted before export.

> **Crawloop Marketplace Suite** — classifieds and marketplace scrapers for local listings intelligence.

| Facebook Marketplace | Kleinanzeigen | Marktplaats | Mobile.de |
| :--- | :--- | :--- | :--- |
| **Facebook Marketplace Scraper** ◄── you are here | [Kleinanzeigen Scraper](https://apify.com/crawloop/kleinanzeigen-scraper) | [Marktplaats Scraper](https://apify.com/crawloop/marktplaats-scraper) | [Mobile.de Scraper](https://apify.com/crawloop/mobile-de-scraper) |

***

### Key Features

- **Keyword search** — pass `searchQuery` + `marketplaceLocation`; the Actor builds the Marketplace search URL
- **Batch keywords** — `searchQueries` array for larger pulls with automatic deduplication
- **Direct URLs** — scrape Marketplace search pages or individual item URLs via `startUrls`
- **Vehicle data** — structured `vehicle` object: make, model, odometer, transmission, fuel type when exposed by the listing
- **Fast HTTP scraping** — `curl_cffi` Chrome TLS impersonation; no headless browser overhead
- **Dynamic GraphQL doc\_id harvester** — refreshes internal query IDs from Facebook JS bundles on session warmup
- **Monitoring mode** — emit only new listings since the previous run (Key-Value store deduplication)
- **Privacy-safe output** — `privacySafeMode` on by default: no seller profile, no lat/lng, no VIN, PII redacted in descriptions
- **Optional detail enrichment** — `includeSeller` visits each item page for full description and photo gallery
- **eBay arbitrage add-on** — `compareWithEbay` attaches sold-price margin metrics per unique keyword
- **Residential proxy ready** — geo-targeted Apify RESIDENTIAL proxy for stable US Marketplace access

***

### When to use this Actor

- **Resale & arbitrage** — track underpriced listings, compare ask prices, monitor new inventory
- **Used-car research** — extract make, model, mileage, and price for vehicles, trucks, and RVs
- **Price monitoring** — scheduled runs with `monitoringMode` for new-listing alerts
- **Market research** — bulk JSON/CSV export by city, category, price band, and condition filters
- **Data pipelines** — feed datasets into dashboards, databases, and automation workflows

### When not to use this Actor

- **Seller contact or messaging** — reads public listing data only; no Messenger or profile scraping
- **Private groups or non-Marketplace pages** — Marketplace search and item URLs only
- **Seller identity or private profiles** — public guest pages only; seller identity remains excluded
- **Unlimited deep pagination** — public guest sessions may cap results per query; use batch keywords instead

***

### Quick Start

**Basic — keyword search in Phoenix:**

```json
{
  "searchQuery": "used trucks",
  "marketplaceLocation": "phoenix",
  "maxItems": 50,
  "privacySafeMode": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"],
    "apifyProxyCountry": "US"
  }
}
```

**Large pull — multiple keywords:**

```json
{
  "searchQuery": "used",
  "searchQueries": ["furniture", "electronics", "tools", "car"],
  "marketplaceLocation": "phoenix",
  "maxItems": 150,
  "sortBy": "creation_time_descend",
  "privacySafeMode": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"],
    "apifyProxyCountry": "US"
  }
}
```

***

### Input Parameters

| Parameter | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| `searchQuery` | String | — | Primary keyword (e.g. `used trucks`, `iphone`) |
| `searchQueries` | Array | — | Extra keywords; deduplicated across the run |
| `startUrls` | Array | — | Marketplace search or item URLs |
| `marketplaceLocation` | String | `phoenix` | City slug (`phoenix`, `nyc`, `la`, `chicago`, …) |
| `radiusKm` | Integer | `65` | Search radius in kilometers |
| `minPrice` / `maxPrice` | Integer | — | Price filters in local currency |
| `daysSinceListed` | String | — | `1`, `7`, or `30` (last 24h / 7d / 30d) |
| `itemCondition` | String | — | `new,used_like_new,used_good,used_fair` |
| `categoryId` | String | — | Category slug (`vehicles`, `electronics`, `free`, …) |
| `sortBy` | String | `best_match` | `creation_time_descend`, `distance_ascend`, `price_ascend`, `price_descend` |
| `maxItems` | Integer | `50` | Maximum listings to collect per run |
| `includeSeller` | Boolean | `false` | Fetch detail page for description, photos, attributes |
| `flattenOutput` | Boolean | `false` | Flatten nested objects for spreadsheet export |
| `monitoringMode` | Boolean | `false` | Only new listings vs previous runs |
| `compareWithEbay` | Boolean | `false` | Attach eBay sold-price arbitrage metrics |
| `privacySafeMode` | Boolean | `true` | Strip seller data, redact PII, remove coordinates & VIN |
| `proxyConfiguration` | Object | Residential | Apify Proxy — **required on cloud runs** |

***

### Output Format

Each dataset row is one Marketplace listing.

| Field | Type | Description |
| :--- | :--- | :--- |
| `listingId` | String | Unique Marketplace listing ID |
| `listingTitle` | String | Listing title |
| `description` | String | Full description when `includeSeller` is enabled |
| `price` | Object | `formatted`, `value`, `currency` |
| `location` | Object | `city`, `state`, `text` (coordinates removed in privacy mode) |
| `listingPhotos` | Array | Photo URLs |
| `listingUrl` | String | Direct item page URL |
| `status` | String | `live`, `pending`, or `sold` |
| `dateListed` | String | ISO 8601 creation date when available |
| `vehicle` | Object | Make, model, odometer, transmission (vehicles only) |
| `ebayArbitrage` | Object | Sold-price margin metrics when `compareWithEbay` is on |
| `searchQuery` | String | Keyword that produced this listing |
| `scrapedAt` | String | UTC scrape timestamp |

#### Output Example

```json
{
  "listingId": "1656134792124906",
  "listingTitle": "2009 Nissan Altima · 2.5 S Sedan 4D",
  "price": {
    "formatted": "$5,900",
    "value": 5900,
    "currency": "USD"
  },
  "location": {
    "text": "Phoenix, Arizona",
    "city": "Phoenix",
    "state": "AZ"
  },
  "listingPhotos": ["…"],
  "status": "live",
  "vehicle": {
    "make": "Nissan",
    "model": "Altima",
    "odometer": "85K miles"
  },
  "searchQuery": "used",
  "scrapedAt": "2026-07-15T11:30:06+00:00"
}
```

***

### Supported Locations

Pre-mapped US city slugs include **phoenix**, **nyc**, **la**, **sanfrancisco**, **chicago**, **austin**, **boston**, **seattle**, **atlanta**, **miami**, **portland**, **denver**, **dallas**, **houston**, **philadelphia**, and **lasvegas**. Pass any Marketplace city slug via `marketplaceLocation` or embed it in `startUrls`.

***

### Privacy & Personal Data

**`privacySafeMode` is enabled by default.** The Actor scrapes public listing pages but the saved dataset excludes sensitive fields:

- Seller name, profile ID, and profile URL are **never written** to the dataset
- Emails, phone numbers, and messenger links in descriptions are **redacted**
- Precise latitude and longitude are **removed** (city and state remain)
- Vehicle VIN is **removed**

The Actor uses only a public guest session and does not accept authenticated cookies.

Set `privacySafeMode: false` only if you have a documented lawful basis to collect seller identity, coordinates, or VIN.

***

### Integration examples

#### Node.js

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('crawloop/facebook-marketplace-scraper').call({ searchQuery: 'used trucks', marketplaceLocation: 'phoenix', maxItems: 20, privacySafeMode: true, proxyConfiguration: { useApifyProxy: true, apifyProxyGroups: ['RESIDENTIAL'], apifyProxyCountry: 'US' } });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.slice(0, 5));
```

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient(token)
run = client.actor("crawloop/facebook-marketplace-scraper").call(
    run_input={"searchQuery": "used trucks", "marketplaceLocation": "phoenix", "maxItems": 20, "privacySafeMode": True, "proxyConfiguration": {"useApifyProxy": True, "apifyProxyGroups": ["RESIDENTIAL"], "apifyProxyCountry": "US"}}
)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item.get("listingTitle"), item.get("price"), item.get("location"))
```

#### cURL

```bash
curl "https://api.apify.com/v2/acts/crawloop~facebook-marketplace-scraper/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"searchQuery":"used trucks","marketplaceLocation":"phoenix","maxItems":20,"privacySafeMode":true,"proxyConfiguration":{"useApifyProxy":true,"apifyProxyGroups":["RESIDENTIAL"],"apifyProxyCountry":"US"}}'
```

### MCP and AI assistants

Use this Actor from AI tools via [Apify MCP](https://docs.apify.com/platform/integrations/mcp). Connect your Apify account, then call `crawloop/facebook-marketplace-scraper`.

Example prompts:

- "Run Facebook Marketplace Scraper for used trucks in phoenix, max 20, return listingTitle, price, location"
- "Monitor Facebook Marketplace for new furniture listings in Austin"
- "Chain Facebook Marketplace then eBay Sold Listings Scraper for arbitrage comps"

### Suite next step

For sold-price comps, use [eBay Sold Listings Scraper](https://apify.com/crawloop/ebay-sold-listings-scraper). For EU classifieds, use [Kleinanzeigen Scraper](https://apify.com/crawloop/kleinanzeigen-scraper) or [Marktplaats Scraper](https://apify.com/crawloop/marktplaats-scraper).

### FAQ

#### Do I need a Facebook account?

No. The Actor runs in public guest mode only and does not accept authenticated cookies. Seller data remains excluded when privacy mode is on.

#### How do I scrape only new listings?

Enable `monitoringMode` and run on a schedule. Listing IDs from previous runs are stored in the Key-Value Store; only new IDs are emitted.

#### How do I get vehicle make, model, and mileage?

Vehicle listings include a `vehicle` sub-object when Facebook exposes the data. Enable `includeSeller` for the fullest attribute set from the detail page.

#### How do I collect more than one page of results?

Use `searchQueries` with multiple keywords or increase `maxItems`. Residential proxies matched to the target country are required on Apify Cloud.

#### Does this Actor collect seller names or phone numbers?

Not by default. Privacy-safe mode strips seller fields and redacts contact patterns in descriptions.

***

### Limitations

- Facebook rotates internal GraphQL query IDs; the Actor harvests them dynamically with fallback values
- Guest sessions may return fewer listings per query than authenticated sessions
- Automating Marketplace may conflict with Meta platform terms — use responsibly and lawfully
- Datacenter proxies are often blocked; residential proxies geo-matched to the target region are required on cloud

***

**Crawloop Marketplace Suite**

# Actor input Schema

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

Keyword to search on Facebook Marketplace. The actor builds the search URL for you.

## `searchQueries` (type: `array`):

Optional extra keywords. Combined with searchQuery for larger result sets; listings are deduplicated across queries.

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

Direct Facebook Marketplace search or item URLs. Each URL is scraped independently.

## `marketplaceLocation` (type: `string`):

City slug or name (e.g. phoenix, nyc, los angeles). Used when searchQuery is set without a start URL.

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

Search radius in kilometers around the marketplace location.

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

Minimum listing price filter in local currency.

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

Maximum listing price filter in local currency.

## `daysSinceListed` (type: `string`):

Only return listings posted within this period.

## `itemCondition` (type: `string`):

Comma-separated condition filter: new, used\_like\_new, used\_good, used\_fair.

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

Optional Marketplace category slug (e.g. vehicles, electronics, free).

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

Marketplace search sort order.

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

Maximum number of listings to scrape per search or URL.

## `includeSeller` (type: `boolean`):

Visit each listing detail page for full description, all photos, attributes, seller data, and vehicle specs.

## `flattenOutput` (type: `boolean`):

Flatten nested objects (vehicle, seller, location) into top-level fields for spreadsheets.

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

Emit only listings not seen in previous runs of the same search configuration.

## `compareWithEbay` (type: `boolean`):

Attach eBay sold-price arbitrage metrics (median sold price, margin, demand score) per unique keyword.

## `privacySafeMode` (type: `boolean`):

Recommended default. Strips seller identity, redacts emails/phones in descriptions, and removes precise coordinates and VIN from output.

## `excludeSellerData` (type: `boolean`):

Remove seller name and profile from output. Ignored when privacySafeMode is enabled.

## `redactDescriptionPii` (type: `boolean`):

Mask emails, phone numbers, and messenger links found in listing descriptions. Ignored when privacySafeMode is enabled.

## `excludeCoordinates` (type: `boolean`):

Remove latitude and longitude from output (city and state are kept). Ignored when privacySafeMode is enabled.

## `excludeVin` (type: `boolean`):

Remove vehicle VIN from output. Ignored when privacySafeMode is enabled.

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

Apify Proxy settings. Residential proxies geo-matched to the target marketplace country are required for stable access.

## Actor input object example

```json
{
  "searchQuery": "used trucks",
  "startUrls": [
    {
      "url": "https://www.facebook.com/marketplace/phoenix/search/?query=used%20trucks"
    }
  ],
  "marketplaceLocation": "phoenix",
  "radiusKm": 65,
  "daysSinceListed": "",
  "sortBy": "best_match",
  "maxItems": 50,
  "includeSeller": false,
  "flattenOutput": false,
  "monitoringMode": false,
  "compareWithEbay": false,
  "privacySafeMode": true,
  "excludeSellerData": true,
  "redactDescriptionPii": true,
  "excludeCoordinates": true,
  "excludeVin": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# Actor output Schema

## `results` (type: `string`):

Default dataset items.

# 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 = {
    "searchQuery": "used trucks",
    "startUrls": [
        {
            "url": "https://www.facebook.com/marketplace/phoenix/search/?query=used%20trucks"
        }
    ],
    "marketplaceLocation": "phoenix",
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "US"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("crawloop/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 = {
    "searchQuery": "used trucks",
    "startUrls": [{ "url": "https://www.facebook.com/marketplace/phoenix/search/?query=used%20trucks" }],
    "marketplaceLocation": "phoenix",
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "US",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("crawloop/facebook-marketplace-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "searchQuery": "used trucks",
  "startUrls": [
    {
      "url": "https://www.facebook.com/marketplace/phoenix/search/?query=used%20trucks"
    }
  ],
  "marketplaceLocation": "phoenix",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}' |
apify call crawloop/facebook-marketplace-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,crawloop/facebook-marketplace-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/KgwHlCItvMhtNB1xd/builds/Is54PEJgdfERcdgjq/openapi.json
