# Facebook Marketplace Listings Scraper (`automation-lab/facebook-marketplace-public-listings-scraper`) Actor

Extract public Facebook Marketplace listing IDs, titles, prices, locations, images, conditions, and canonical URLs from supplied search or city URLs. No login.

- **URL**: https://apify.com/automation-lab/facebook-marketplace-public-listings-scraper.md
- **Developed by:** [Stas Persiianenko](https://apify.com/automation-lab) (community)
- **Categories:** E-commerce, Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
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 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 Listings Scraper

Extract anonymous public **Facebook Marketplace listings** from supplied city, category, or search URLs into a structured Apify dataset.

Use the Actor to build repeatable resale inventory and asking-price snapshots without a Facebook login. Each accepted row includes a stable listing ID, title, displayed price, location, image, available condition/category signals, and canonical listing URL.

The Actor only reads cards Facebook exposes publicly. It does not log in, contact sellers, scrape private content, or promise seller contact details.

### What can you do with Facebook Marketplace Listings Scraper?

- Collect local resale inventory for a one-time market analysis.
- Schedule recurring runs and compare listing IDs or prices downstream.
- Combine several city or query URLs into one deduplicated dataset.
- Export public listing cards to CSV, Excel, JSON, a database, or a data pipeline.
- Track category supply without manually copying search results.

The Actor preserves the filters encoded in each supplied Marketplace URL. It stops at `maxItems` accepted unique listings.

### Who is this Actor for?

**Resale operators** can review local asking prices and available inventory.

**Marketplace analysts** can create comparable snapshots across cities or product searches.

**Data teams** can feed normalized public listing records into dashboards and warehouses.

**Developers** can call the Actor from scheduled workflows instead of maintaining Facebook SSR parsing and residential proxy sessions.

This Actor is not intended for seller outreach, private-profile enrichment, messaging, or account automation.

### Why use this Facebook Marketplace extractor?

Facebook's anonymous Marketplace page delivery varies by network identity. A normal server request often reaches a login shell instead of listings.

This Actor uses bounded US residential HTTP sessions and parses structured data embedded in the public server-rendered response. It avoids browser rendering and media downloads, keeping the workflow smaller and more predictable.

The extraction route:

1. validates every URL before any request;
2. requests the public Marketplace page through a US residential session;
3. rejects login, challenge, and unrecognized response shapes;
4. rotates the session up to a bounded retry limit;
5. normalizes and deduplicates recognized listing cards;
6. charges only rows written to the dataset.

### What Facebook Marketplace data is extracted?

| Field | Type | Meaning |
| --- | --- | --- |
| `listingId` | string | Stable Facebook Marketplace listing identifier |
| `title` | string | Public listing title |
| `price` | string or null | Price exactly as displayed |
| `priceAmount` | number or null | Numeric amount when it can be parsed |
| `currency` | string or null | Currency inferred from the displayed symbol |
| `location` | string or null | Public display location |
| `city` | string or null | Public city signal |
| `state` | string or null | Public state/region signal |
| `imageUrl` | string or null | Primary public listing image URL |
| `condition` | string or null | Condition when present in the public card |
| `categoryId` | string or null | Facebook category identifier when present |
| `isSold` | boolean | Public sold-state signal |
| `deliveryTypes` | string\[] | Public delivery options in the card |
| `listingUrl` | string | Canonical Marketplace item URL |
| `sourceUrl` | string | Marketplace URL that produced the row |
| `scrapedAt` | string | UTC extraction timestamp |

Nullable fields remain `null` when Facebook does not include them. The Actor does not guess missing values.

### How to scrape Facebook Marketplace listings

1. Open the Actor input page in Apify Console.
2. Add one or more public `facebook.com/marketplace/...` URLs.
3. Keep `maxItems` small for an initial run.
4. Click **Start**.
5. Open the default dataset when the run succeeds.
6. Export the overview as JSON, CSV, Excel, XML, or RSS.
7. For monitoring, schedule the same input and compare `listingId`, `priceAmount`, or `isSold` in your destination.

A useful first input is:

```json
{
  "startUrls": [
    {
      "url": "https://www.facebook.com/marketplace/nyc/search?query=bicycle"
    }
  ],
  "maxItems": 10
}
```

### Input parameters

#### `startUrls`

Required array of one to 20 public Facebook Marketplace URLs.

Supported forms include city roots, category paths, and search URLs under `/marketplace/`. Query parameters and filters already encoded in the URL are preserved.

Examples:

```text
https://www.facebook.com/marketplace/nyc/search?query=bicycle
https://www.facebook.com/marketplace/seattle/search?query=furniture
https://www.facebook.com/marketplace/losangeles/search?query=used%20car
```

Non-Facebook domains and Facebook paths outside `/marketplace/` fail validation. Login credentials are neither accepted nor required.

#### `maxItems`

Optional integer from 1 to 500. The default is 50.

This is a run-wide cap across all supplied URLs, after deduplication. It is not a promise that Facebook will expose that many public cards.

### Output example

A current normalized dataset row has this shape:

```json
{
  "listingId": "123456789012345",
  "title": "Road bicycle",
  "price": "$180",
  "priceAmount": 180,
  "currency": "USD",
  "location": "New York, New York",
  "city": "New York",
  "state": "New York",
  "imageUrl": "https://scontent.example.fbcdn.net/example.jpg",
  "condition": null,
  "categoryId": "807311116002614",
  "isSold": false,
  "deliveryTypes": ["IN_PERSON"],
  "listingUrl": "https://www.facebook.com/marketplace/item/123456789012345/",
  "sourceUrl": "https://www.facebook.com/marketplace/nyc/search?query=bicycle",
  "scrapedAt": "2026-08-12T19:52:31.000Z"
}
```

The identifier and image above are redacted examples; actual runs return current public source values.

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

The Actor uses pay per event pricing:

- **Start:** $0.005 once per run.
- **Listing item:** tiered by Apify plan; BRONZE is currently $0.0032 per accepted dataset row.

At the BRONZE tier, 10 accepted listings cost about **$0.037**, 100 cost about **$0.325**, and 500 cost about **$1.605**. The start fee is included in these examples.

Only accepted unique listing rows trigger the item event. Retries, rejected payloads, duplicates, and missing optional fields do not create extra item charges.

Your Apify plan determines the active tier. Check the pricing panel for the exact tiered event rate before a large run.

### Monitoring and integration workflows

#### Scheduled inventory snapshots

Schedule a city/query input daily or weekly. Store each run's dataset and compare stable `listingId` values to identify newly exposed or removed cards.

#### Asking-price analysis

Load `priceAmount`, `currency`, `city`, and `categoryId` into a spreadsheet or warehouse. Keep `price` as the source display value for auditability.

#### Multi-city comparison

Supply several URLs in one run. The Actor writes a single deduplicated dataset and retains `sourceUrl` so rows can be grouped by search.

#### Webhooks and downstream automation

Use an Apify webhook after `ACTOR.RUN.SUCCEEDED` to trigger a Make, Zapier, n8n, or custom ingestion workflow.

### Run with the Apify API

Replace `YOUR_TOKEN` with an Apify API token.

#### cURL

```bash
curl -X POST \
  "https://api.apify.com/v2/acts/automation-lab~facebook-marketplace-public-listings-scraper/runs?token=YOUR_TOKEN&waitForFinish=300" \
  -H "Content-Type: application/json" \
  -d '{"startUrls":[{"url":"https://www.facebook.com/marketplace/nyc/search?query=bicycle"}],"maxItems":10}'
```

#### JavaScript

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('automation-lab/facebook-marketplace-public-listings-scraper').call({
    startUrls: [{ url: 'https://www.facebook.com/marketplace/nyc/search?query=bicycle' }],
    maxItems: 10,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient(token="YOUR_TOKEN")
run = client.actor("automation-lab/facebook-marketplace-public-listings-scraper").call(
    run_input={
        "startUrls": [{"url": "https://www.facebook.com/marketplace/nyc/search?query=bicycle"}],
        "maxItems": 10,
    }
)
items = client.dataset(run["defaultDatasetId"]).list_items().items
print(items)
```

### Use with MCP and AI agents

#### Claude Code setup

Add the Actor to Claude Code through Apify MCP:

```bash
claude mcp add --transport http apify \
  "https://mcp.apify.com?tools=automation-lab/facebook-marketplace-public-listings-scraper"
```

#### Claude Desktop, Cursor, and VS Code setup

Claude Desktop, Cursor, and VS Code clients can use the equivalent HTTP MCP configuration:

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com?tools=automation-lab/facebook-marketplace-public-listings-scraper"
    }
  }
}
```

Example prompts:

- “Run the Facebook Marketplace listings scraper for this NYC bicycle search and return a price summary.”
- “Collect these Seattle and Los Angeles Marketplace searches, then group records by source URL.”
- “Schedule this input weekly and compare listing IDs with the previous dataset.”

### Reliability, retries, and limits

Facebook can change anonymous page delivery and embedded data structures without notice.

The Actor rotates residential sessions only after a verified HTTP, login, challenge, or empty-shape failure. After three unsuccessful attempts for a URL, it fails the run rather than returning a misleading empty success.

Current scope is the listing cards included in the initial public server-rendered page. The Actor does not promise exhaustive GraphQL pagination, listing detail descriptions, seller profiles, seller contact information, or historical changes.

`maxItems` is capped at 500. Public inventory may be sparse or differ by geography and time.

### Troubleshooting

#### Why did the run fail with a login or public-listing error?

Retry once later with the same valid public Marketplace URL. Facebook may temporarily serve a login/challenge response to all bounded sessions. Do not add credentials; this Actor is anonymous by design.

#### Why are there fewer records than `maxItems`?

`maxItems` is a ceiling. Facebook may expose fewer cards in its initial public SSR response, and duplicates across supplied URLs count once.

#### Why is a field null?

Facebook does not include every field on every public listing card. The Actor preserves missing values as `null` instead of inferring them.

#### Why was my URL rejected?

Use an HTTPS Facebook URL whose path begins with `/marketplace/`. Profile, group, login, short-link, and third-party URLs are intentionally unsupported.

### Responsible use and legality

Scrape only public information you are authorized to collect and use.

You are responsible for complying with Facebook's terms, applicable privacy and database laws, intellectual-property rights, and local regulations. Avoid attempts to identify private individuals, build sensitive profiles, contact sellers without a lawful basis, or circumvent access controls.

The Actor does not bypass login, access private content, or accept user credentials. Remove or minimize personal data in downstream systems when it is not needed for your legitimate purpose.

### Related Automation Lab Actors

- [OfferUp Marketplace Listings Scraper](https://apify.com/automation-lab/offerup-marketplace-listings-scraper) for public US OfferUp inventory.
- [Wallapop Marketplace Scraper](https://apify.com/automation-lab/wallapop-marketplace-scraper) for public Spanish resale listings.
- [Facebook Page Recommendations Scraper](https://apify.com/automation-lab/facebook-page-recommendations-scraper) for public Page recommendation records rather than Marketplace inventory.

These Actors are separate products and do not combine datasets automatically.

### FAQ

#### Does it require a Facebook account?

No. The Actor retrieves only listing cards Facebook exposes to anonymous public US residential sessions.

#### Can it scrape seller phone numbers or send messages?

No. Seller contact and messaging are outside the product scope.

#### Can I monitor new and changed listings?

Yes, by scheduling recurring runs and comparing datasets downstream. The Actor emits stable IDs and timestamps; it does not maintain a built-in history or send change alerts.

#### Does it download listing images?

No. It returns the public primary image URL when present, which reduces transfer and runtime.

#### Can I scrape several cities in one run?

Yes. Add up to 20 Marketplace URLs. Results are deduplicated by listing ID and retain their source URL.

#### Is every Facebook Marketplace listing included?

No. Results are limited to the public cards Facebook includes in the server-rendered response at run time.

#### Can I use the dataset in Excel or Google Sheets?

Yes. Export the default dataset as CSV or Excel, or connect it to your preferred integration.

#### What happens when Facebook blocks all attempts?

The run fails non-zero with a clear message after bounded session recovery. This prevents an access failure from being mistaken for a legitimate empty market.

# Actor input Schema

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

One to 20 public facebook.com/marketplace city, category, or search URLs. Search filters already present in each URL are preserved.

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

Stop after saving this many unique listings across all supplied URLs. Facebook may expose fewer public cards.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.facebook.com/marketplace/nyc/search?query=bicycle"
    }
  ],
  "maxItems": 10
}
```

# Actor output Schema

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

Open the default dataset overview containing IDs, titles, prices, locations, images, and canonical listing URLs.

# 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 = {
    "startUrls": [
        {
            "url": "https://www.facebook.com/marketplace/nyc/search?query=bicycle"
        }
    ],
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation-lab/facebook-marketplace-public-listings-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 = {
    "startUrls": [{ "url": "https://www.facebook.com/marketplace/nyc/search?query=bicycle" }],
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("automation-lab/facebook-marketplace-public-listings-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 '{
  "startUrls": [
    {
      "url": "https://www.facebook.com/marketplace/nyc/search?query=bicycle"
    }
  ],
  "maxItems": 10
}' |
apify call automation-lab/facebook-marketplace-public-listings-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,automation-lab/facebook-marketplace-public-listings-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/Rjs96gjJGfv2jdZpy/builds/BuNIGf17jy7nay0Xx/openapi.json
