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

Browse public Facebook Marketplace listings, optionally by category, with titles, prices, locations, images and links. Optionally attach each listing's full detail record.

- **URL**: https://apify.com/thenetaji/facebook-marketplace-scraper.md
- **Developed by:** [The Netaji](https://apify.com/thenetaji) (community)
- **Categories:** E-commerce, Marketing
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.48 / 1,000 results

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

The Actor reads public Facebook Marketplace listings exactly as a logged-out visitor browsing Marketplace's own feed sees them. No Facebook account, login, or session cookie is used at any point.

### Accepted input

`category` is an optional category slug, such as `vehicles` or `electronics`; left empty, the Actor reads the general Marketplace feed. `maxItems` trims how many of the returned listings are saved.

```json
{
  "category": "electronics",
  "maxItems": 20
}
```

### Result fields

Each row carries `id`, `title`, `price`, `location`, `url`, `imageUrl`, and `raw`. The example below illustrates field shapes; it is not captured from a live run.

```json
{
  "id": "1234567890123456",
  "title": "iPhone 13 Pro, 256GB, unlocked",
  "price": "$450",
  "location": "Austin, TX",
  "url": "https://www.facebook.com/marketplace/item/1234567890123456/",
  "imageUrl": "https://scontent.xx.fbcdn.net/v/..."
}
```

`price` is the formatted string Facebook displays on the card, currency symbol included, rather than a parsed number and currency code.

**Marketplace browsing returns roughly 20 listings per request, and there is no logged-out pagination beyond that batch.** Facebook serves an anonymous visitor a single flat page of listings rather than a connection with a next-page cursor, so a `maxItems` value above the returned count does not produce more rows — it can only trim the batch down. Results are also regional: what the feed serves depends on where the request is understood to be browsing from, so the same category can return a different set of listings between runs.

### Fetching each listing's full detail

`addonListingDetails` (default `false`) is opt-in. When set, each browsed listing's full detail record — the same record a targeted lookup returns — is attached under `listingDetails` on that row.

This costs one extra request per row, billed as an additional event at $0.0008 per row, on top of the Actor's usual per-result price. It is charged only for a row that is actually enriched; a lookup that fails is not billed. It defaults to off, so a plain browse run is not charged for it.

```json
{
  "category": "electronics",
  "addonListingDetails": true,
  "maxItems": 20
}
```

### Behaviour on empty results

A browse request that returns no listings for the category or region is logged as a warning, and the run ends with no records rather than an error. This is a normal outcome for a narrow or unpopulated category in a given region, not a failure to be retried.

### Public, logged-out data only

Everything returned here is visible to a Marketplace visitor who is not signed in. There is no logged-out Marketplace search: this Actor covers the browse feed, not a keyword search across listings.

### Frequently asked questions

**Why did a run return fewer than `maxItems` listings?**
Facebook serves a fixed batch — around 20 — to a single anonymous browse request, with no further page available without a login. `maxItems` can only trim that batch down; it cannot request more of it.

**Why do two runs in the same category return different listings?**
Marketplace's browse feed is regional. It reflects the location the request is understood to be browsing from, so results vary between runs rather than representing one fixed, stable feed.

**Is Marketplace search supported?**
No. Facebook does not serve Marketplace search results to an anonymous visitor; only the browse feed is available without a login.

**Can a listing found while browsing be looked up for full detail?**
Yes, two ways: turn on `addonListingDetails` to attach each row's full detail record directly in this run, or feed the row's `id` into the [Facebook Marketplace Item Scraper](https://apify.com/thenetaji/facebook-marketplace-item-scraper)'s `itemId` input for a standalone lookup.

**Is a Facebook account or login required?**
No. Only the Marketplace browse feed that Facebook already shows to a logged-out visitor is read.

### What this is useful for

Price research and comparison shopping across a Marketplace category; sampling what a region's Marketplace feed is currently showing for a category of interest; and a first, cheap pass over a category before looking up specific listings in full detail.

### Related Actors

| Actor | Purpose |
| --- | --- |
| [Facebook Marketplace Item Scraper](https://apify.com/thenetaji/facebook-marketplace-item-scraper) | Full detail for specific listings by ID or URL |
| [Facebook Page Scraper](https://apify.com/thenetaji/facebook-page-scraper) | Profile, About and Transparency details for a Page |
| [Facebook Posts Scraper](https://apify.com/thenetaji/facebook-posts-scraper) | Timeline posts for a Page |

# Actor input Schema

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

Optional Marketplace category slug, for example `vehicles` or `electronics`. Leave empty to browse everything.

## `addonListingDetails` (type: `boolean`):

Attach each browsed Marketplace listing's full detail record. Adds one request and a billable event per listing.

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

Maximum listings to save. Facebook returns roughly twenty per browse request.

## Actor input object example

```json
{
  "addonListingDetails": false,
  "maxItems": 20
}
```

# Actor output Schema

## `dataset` (type: `string`):

All records scraped by this run

# 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 = {
    "category": "",
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("thenetaji/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 = {
    "category": "",
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("thenetaji/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 '{
  "category": "",
  "maxItems": 20
}' |
apify call thenetaji/facebook-marketplace-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,thenetaji/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/CxuSCDOWnX5IdtHva/builds/0XpDj2yU26byHGzXd/openapi.json
