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

Scrape Facebook Marketplace by keyword, category and city: prices, locations, sellers, photos, descriptions and vehicle data, plus new-listing and price-drop alerts. $1 per 1,000, usage included; failed pages and duplicates are free.

- **URL**: https://apify.com/ragnum/facebook-marketplace-scraper.md
- **Developed by:** [Ragnum](https://apify.com/ragnum) (community)
- **Features:** Limited permissions
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.70 / 1,000 listings

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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Facebook Marketplace Scraper — Listings, Prices & Price Drops

Scrape **Facebook Marketplace** listings by keyword, category and location, and get clean, flat rows: price as a number, ISO currency, city and state, delivery options, listing date, seller name, and the listing URL and photo. Turn on **details** to add the description, all photos, exact coordinates with distance from your search point, the item condition, attributes and full **vehicle data** (make, model, year, mileage, transmission, fuel, colors, title status). Turn on **monitoring** to get only **new listings and price drops** on every scheduled run.

**$1.00 per 1,000 listings, $2.50 per 1,000 with details, plus $0.003 per run. Platform usage is included, and failed pages, duplicates and unchanged listings are free.**

### What you can do with it

- **Find deals and resale stock:** search "iphone", "standing desk" or "sofa" in any city and sort by newest or lowest price.
- **Track prices:** run a schedule in monitoring mode and get a row only when a listing is new or its price changed, with `previousPrice` for price-drop alerts.
- **Research a local market:** browse whole categories (furniture, electronics, bicycles, …) per city and compare prices across locations.
- **Used-car research:** search "honda civic" with details on and use the **Vehicles** view: year, make, model, trim, odometer, transmission and title status.
- **Feed AI agents and spreadsheets:** every row has the same keys, numbers are numbers, dates are ISO 8601, missing values are `null`.

### How it works

The scraper reads only what Facebook shows to logged-out visitors. It never logs in and uses no account or cookies. Each location is searched from its own country (included in the price), so results and prices are local.

### Input examples

**Search a few things in a few cities**

```json
{
    "queries": ["standing desk", "office chair"],
    "locations": ["nyc", "chicago", "toronto"],
    "maxItemsPerSearch": 100,
    "maxPagesPerSearch": 5,
    "sortBy": "newest",
    "maxPrice": 300
}
```

**Browse a category**

```json
{
    "categories": ["furniture"],
    "locations": ["london"],
    "conditions": ["used_like_new", "used_good"],
    "daysSinceListed": "7",
    "maxItemsPerSearch": 200,
    "maxPagesPerSearch": 10
}
```

**A search or category URL straight from your browser, or single listings**

```json
{
    "startUrls": [
        { "url": "https://www.facebook.com/marketplace/nyc/search?query=bike&maxPrice=300" },
        { "url": "https://www.facebook.com/marketplace/london/furniture" },
        { "url": "https://www.facebook.com/marketplace/item/1234567890123456/" }
    ]
}
```

Listing URLs return full detail rows.

**Cars with details, only within 30 km**

```json
{
    "queries": ["honda civic", "toyota corolla"],
    "locations": ["la"],
    "includeDetails": true,
    "radiusKm": 30,
    "strictRadius": true,
    "maxItemsPerSearch": 50,
    "maxPagesPerSearch": 3
}
```

**Monitoring: only new listings and price changes (run it on a schedule)**

```json
{
    "queries": ["macbook pro"],
    "locations": ["sanfrancisco"],
    "sortBy": "newest",
    "incremental": true,
    "newListingsOnly": true,
    "maxItemsPerSearch": 100,
    "maxPagesPerSearch": 5
}
```

The first run returns everything as `NEW` (your baseline). Later runs return only listings that are `NEW`, `PRICE_CHANGED` (with `previousPrice`) or `STATUS_CHANGED` (pending/sold, seen with details). Unchanged listings are skipped and not charged.

Two settings make a monitor precise:

- **`sortBy: "newest"`**. Facebook shows logged-out visitors a limited set of results, and that set changes from run to run. Sorting by newest makes every run look at the latest listings.
- **`newListingsOnly: true`**. Without it, `NEW` means "new to this monitor": a listing posted days ago can show up for the first time because it rotated into the results. With it, `NEW` listings posted before the previous run started are skipped (and not charged), so you get only listings that were actually posted since your last run, plus every price and status change.

The monitor's memory is kept in your account's key-value store `facebook-marketplace-scraper-state`. Its key comes from your input, or set `monitorName` yourself. Listings that disappear from results are not reported as sold, for the same reason: the logged-out result set is limited.

**Coordinates instead of a city slug**

```json
{
    "queries": ["kayak"],
    "latitude": 44.9778,
    "longitude": -93.265,
    "radiusKm": 50,
    "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"], "apifyProxyCountry": "US" }
}
```

#### Locations

`locations` are Facebook's own location slugs, the part after `/marketplace/` in a Marketplace URL: `nyc`, `la`, `chicago`, `houston`, `sanfrancisco`, `seattle`, `miami`, `london`, `manchester`, `toronto`, `vancouver`, `sydney`, `melbourne` and many more. The proxy country is picked automatically for well-known slugs in the US, UK, Canada, Australia, New Zealand and several EU countries. For any other place, use the slug from your browser's Marketplace URL and set the proxy country under **Advanced**, or search by `latitude`/`longitude`.

#### Filters and sorting

| Input | Values |
|---|---|
| `minPrice` / `maxPrice` | Local currency of the location |
| `conditions` | `new`, `used_like_new`, `used_good`, `used_fair` |
| `daysSinceListed` | `any`, `1`, `7`, `30` |
| `sortBy` | `relevance`, `newest`, `price_asc`, `price_desc`, `distance` |
| `radiusKm` | 1–500 (Facebook treats it as a hint; see `distanceKm` and `strictRadius`) |
| `categories` | `apparel`, `bicycles`, `classifieds`, `electronics`, `entertainment`, `family`, `free`, `furniture`, `garden`, `hobbies`, `home`, `home-improvements`, `instruments`, `office-supplies`, `pets`, `sports`, `toys` |

#### How many listings you get

Each search (one query or category at one location, or one start URL) stops at whichever comes first:

- `maxItemsPerSearch` unique listings
- `maxPagesPerSearch` result pages: the first page has about 12–15 listings, each further page about 24–29
- the end of the results

For about 250 listings per search, set `maxItemsPerSearch: 250` and `maxPagesPerSearch: 10`. A page that fails is retried up to `maxRetriesPerPage` times. A page that fails for good ends that search; the summary tells you which page.

### Pricing

Pay per event, with platform usage (compute, proxy, storage) **included**:

| Event | Price | When |
|---|---|---|
| `listing` | **$0.001** ($1.00 per 1,000) | A listing row without details is saved |
| `listing-detail` | **$0.0025** ($2.50 per 1,000) | A listing row with details is saved (charged instead of `listing`, never both) |
| `apify-actor-start` | **$0.003** per run | Once when a run starts (default memory; one charge per started GB) |

- **Monitoring tip:** every run pays the start fee, even when nothing new turned up. Running every 15–30 minutes catches new listings almost as fast as every 5 minutes and costs a fraction in start fees.
- **Never charged:** failed or blocked pages, empty pages, duplicates, listings over your limits, listings dropped by `strictRadius` or the price filter, and, in monitoring mode, unchanged listings and (with `newListingsOnly`) listings posted before your last run.
- If a detail page can't be read, the listing is still delivered as a normal row and charged as `listing`.
- Set a **maximum total charge** for the run in Console; the scraper stops cleanly when it is reached.

### Output

One row per listing. Every row has every field; values that don't apply are `null`. Dataset views: **Overview**, **Details** and **Vehicles**.

```json
{
    "marketplace": "facebook-marketplace",
    "productId": "1159869563163053",
    "title": "Men’s bicycle",
    "url": "https://www.facebook.com/marketplace/item/1159869563163053/",
    "imageUrl": "https://scontent-….fbcdn.net/v/t39.84726-6/…jpg",
    "price": 120,
    "originalPrice": null,
    "discountPercent": null,
    "currency": "USD",
    "currencyMismatch": false,
    "keyword": "bicycle",
    "page": 1,
    "position": 1,
    "scrapedAt": "2026-11-08T00:27:25.769Z",
    "priceText": "$120",
    "isFree": false,
    "locationText": "New York, NY",
    "city": "New York",
    "state": "NY",
    "countryCode": "US",
    "latitude": 40.712585449219,
    "longitude": -74.009399414062,
    "distanceKm": 0.3,
    "searchLocation": "nyc",
    "categoryId": "1658310421102081",
    "categoryName": null,
    "condition": "used_good",
    "deliveryTypes": ["IN_PERSON"],
    "isLive": true,
    "isPending": false,
    "isSold": false,
    "publishedAt": "2026-11-07T21:19:12.000Z",
    "sellerName": "…",
    "sellerId": "pfbid0…",
    "description": null,
    "photoUrls": ["https://scontent-….fbcdn.net/…jpg"],
    "attributes": { "Condition": "Used - Good" },
    "vehicle": null,
    "detailFetched": true,
    "changeType": null,
    "previousPrice": null,
    "firstSeenAt": null
}
```

| Field | Type | Description |
|---|---|---|
| `marketplace` | string | Always `facebook-marketplace` |
| `productId` | string | Listing ID |
| `title` | string | null | Listing title |
| `url` | string | Listing URL |
| `imageUrl` | string | null | Main photo URL (Facebook CDN links expire after some days; not downloaded) |
| `price` | number | null | Asking price in `currency`; 0 for free items |
| `originalPrice` | number | null | Crossed-out earlier price, when the seller lowered it |
| `discountPercent` | number | null | Drop from `originalPrice` to `price`, in % |
| `currency` | string | null | ISO code. Without details: from the price symbol and the location's market; with details: Facebook's own code |
| `currencyMismatch` | boolean | Currency differs from the location's usual currency |
| `keyword` | string | null | Query that found the listing |
| `page` / `position` | integer | null | Result page, and 1-based position across the search |
| `scrapedAt` | string | ISO 8601 |
| `priceText` | string | null | Price as shown ("$1,200", "£45", "FREE") |
| `isFree` | boolean | null | Price is 0 |
| `locationText`, `city`, `state` | string | null | Listing location |
| `countryCode` | string | null | Country of the search location |
| `latitude`, `longitude` | number | null | Listing coordinates (details) |
| `distanceKm` | number | null | Distance from the search point (details) |
| `searchLocation` | string | null | Slug or "lat,lng" searched |
| `categoryId` | string | null | Marketplace category ID |
| `categoryName` | string | null | Reserved; the logged-out listing data carries the category ID only |
| `condition` | string | null | `new`, `used_like_new`, `used_good`, `used_fair` (details) |
| `deliveryTypes` | string\[] | `IN_PERSON`, `DOOR_PICKUP`, `PUBLIC_MEETUP`, `DOOR_DROPOFF`, `SHIPPING` |
| `isLive`, `isPending`, `isSold` | boolean | null | Listing status |
| `publishedAt` | string | null | When the listing was created, ISO 8601 |
| `sellerName`, `sellerId` | string | null | Seller's public display name and profile ID, as logged-out visitors see them |
| `description` | string | null | Description (details) |
| `photoUrls` | string\[] | null | All photo URLs (details) |
| `attributes` | object | null | Attributes Facebook shows, e.g. `{"Condition": "Used - Good"}` (details) |
| `vehicle` | object | null | `make`, `model`, `trim`, `year`, `odometerValue`, `odometerUnit`, `transmission`, `fuelType`, `exteriorColor`, `interiorColor`, `titleStatus`, `vin`, `sellerType` (details, vehicle listings). `year` is read from Facebook's vehicle title ("2003 Honda Civic …") |
| `detailFetched` | boolean | Row has details (charged as `listing-detail`) |
| `changeType` | string | null | Monitoring: `NEW`, `PRICE_CHANGED`, `STATUS_CHANGED` |
| `previousPrice` | number | null | Monitoring: earlier price |
| `firstSeenAt` | string | null | Monitoring: first time this monitor saw the listing |

The core fields (`marketplace`, `productId`, `title`, `url`, `imageUrl`, `price`, `originalPrice`, `discountPercent`, `currency`, `currencyMismatch`, `keyword`, `page`, `position`, `scrapedAt`) have the same names and types as in Ragnum's other marketplace scrapers (Alibaba, AliExpress, DHgate), so you can merge their datasets directly.

### Run summary (`RUN_SUMMARY`)

Every run writes a `RUN_SUMMARY` record to its key-value store (also linked in the run's **Output** tab):

- per search: pages attempted, succeeded and failed, attempts, blocks, cards parsed and taken, and **why the search stopped** (`maxItemsPerSearch`, `maxPagesPerSearch`, `end-of-results`, `page-N-failed`, …)
- details and item pages: attempted, succeeded, failed, photo failures
- rows pushed per charged event, and rows **not** charged per reason: `duplicate`, `overSearchCap`, `priceFilter`, `strictRadius`, `unchanged`, `olderThanLastRun`, `chargeLimit`
- monitoring counts: new, price changed, status changed, unchanged, older listings skipped (`newListingsOnly`), listings known to the monitor, previous run start
- currency breakdown and `currencyMismatchRows`
- field fill rates
- warnings: `STRUCTURE_CHANGE_SUSPECTED` when a page loads but has no usable data, or when a required field falls below 90% fill; and `CHARGE_LIMIT_REACHED`

The run's status message gives the totals at a glance, e.g. `128 listings from 6/6 pages (incremental: 9 new, 2 price changes, …)`.

### Use with AI agents (Apify MCP)

Add the scraper to Claude, Cursor or any MCP client with:

```
https://mcp.apify.com?tools=ragnum/facebook-marketplace-scraper
```

Agents can call it with plain inputs (`queries`, `locations`, `maxItemsPerSearch`) and get flat, typed rows back. For example: "find standing desks under $200 posted this week in Chicago, nearest first".

### Your responsibilities

This scraper collects data that Facebook shows publicly to logged-out visitors. You are responsible for how you use it: comply with Facebook's terms and with data-protection law such as the **GDPR** and **CCPA**. Listings are posted by private individuals; seller names, descriptions and locations can be personal data. Have a lawful basis before you store or process them, keep only what you need, and honor deletion requests. Photos are linked, not copied; respect the rights of their owners.

### FAQ

**Why did I get fewer listings than `maxItemsPerSearch`?** The page limit came first (raise `maxPagesPerSearch`), the search ran out of results, or a page failed for good. `RUN_SUMMARY.searches[…].stoppedBy` says which.

**Why are some listings farther away than my radius?** Facebook uses the radius as a hint. Turn on details to get `distanceKm` for every listing, and add `strictRadius` to drop the far ones (they are not charged).

**Why is `sellerName` empty on some rows?** Facebook doesn't show a seller on every listing to logged-out visitors.

**Can I get listings from several countries in one run?** Yes, list locations from different countries; each search uses a proxy in its own country.

# Actor input Schema

## `queries` (type: `array`):

What to search for, e.g. "bicycle" or "honda civic". Each query runs once per location. Leave empty when you only use categories or start URLs. With no queries, categories or start URLs at all, the scraper searches "bicycle".

## `locations` (type: `array`):

Facebook Marketplace location slugs: the part after /marketplace/ in a Marketplace URL, e.g. nyc, la, chicago, london, toronto, sydney. Each query and category runs once per location. The proxy country follows the location (US, UK, Canada, Australia and more are built in), so results and prices are local. For any other place, use latitude/longitude, or set the proxy country under Advanced.

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

Search around these coordinates instead of a location slug (give longitude too). Example: 41.8781 for Chicago. Set the proxy country under Advanced to the coordinates' country for local results and currency.

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

Longitude for the coordinates search, e.g. -87.6298 for Chicago.

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

Search radius sent to Facebook. Facebook treats it as a hint and can return listings further away; every detail row carries distanceKm so you can filter, or turn on "Strict radius".

## `strictRadius` (type: `boolean`):

Drop listings whose distance from the search point is larger than the radius. Needs listing coordinates, which come with details: works together with "Include details". Dropped listings are not charged.

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

Facebook Marketplace URLs to scrape as they are: searches (https://www.facebook.com/marketplace/nyc/search?query=bike\&maxPrice=300), categories (https://www.facebook.com/marketplace/london/furniture) and single listings (https://www.facebook.com/marketplace/item/1234567890/). Listing URLs return full detail rows.

## `categories` (type: `array`):

Browse whole categories at each location (no query needed). Each category runs once per location.

## `minPrice` (type: `number`):

Lowest price, in the local currency of the location (e.g. dollars in nyc, pounds in london).

## `maxPrice` (type: `number`):

Highest price, in the local currency of the location.

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

Only listings in these conditions. Leave empty for any condition.

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

Only listings posted within this many days.

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

Order of results, as on Facebook.

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

Also read each listing's detail page: description, all photos, exact coordinates and distanceKm, condition, attributes, and vehicle data (make, model, year, mileage, transmission, fuel, colors, title status). A row with details is charged as one "listing-detail" event instead of a "listing" event.

## `incremental` (type: `boolean`):

Compare with earlier runs of the same search and return only NEW listings, PRICE_CHANGED listings (with previousPrice) and STATUS_CHANGED listings. Unchanged listings are skipped and not charged. Ideal for schedules and price-drop alerts. Removals are not reported: listings that drop out of results are not necessarily sold.

## `newListingsOnly` (type: `boolean`):

Monitoring: skip NEW listings that were posted before the previous run started. Facebook shows logged-out visitors a limited set of results that changes between runs, so older listings can appear for the first time; with this on you only get listings that are actually new, plus price and status changes. Skipped listings are not charged. The first run returns everything as a baseline. Turns on monitoring automatically. Works best with "Sort by: Newest first".

## `monitorName` (type: `string`):

Name of the saved state used by monitoring mode. By default it is derived from your queries, locations, categories and filters, so the same input continues the same monitor. Set it to share one monitor between slightly different inputs, or to start a fresh one.

## `maxItemsPerSearch` (type: `integer`):

Stop each search (one query or category at one location, or one start URL) after this many unique listings.

## `maxPagesPerSearch` (type: `integer`):

Hard cap on result pages read per search. The first page has about 12–15 listings, each further page about 24–29. Raise it together with "Max listings per search" (e.g. 10 pages for ~250 listings).

## `maxRetriesPerPage` (type: `integer`):

How often a page that fails (blocked, timeout) is retried before it is given up. Failed attempts are never charged.

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

Managed for you, with the country matched to each location (included in the price). Set a country here to use it for every search, e.g. for latitude/longitude searches or locations outside the built-in list.

## Actor input object example

```json
{
  "queries": [
    "bicycle"
  ],
  "locations": [
    "nyc"
  ],
  "radiusKm": 40,
  "strictRadius": false,
  "daysSinceListed": "any",
  "sortBy": "relevance",
  "includeDetails": false,
  "incremental": false,
  "newListingsOnly": false,
  "maxItemsPerSearch": 20,
  "maxPagesPerSearch": 3,
  "maxRetriesPerPage": 6,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

No description

## `runSummary` (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 = {
    "queries": [
        "bicycle"
    ],
    "locations": [
        "nyc"
    ],
    "maxItemsPerSearch": 20,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("ragnum/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 = {
    "queries": ["bicycle"],
    "locations": ["nyc"],
    "maxItemsPerSearch": 20,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("ragnum/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 '{
  "queries": [
    "bicycle"
  ],
  "locations": [
    "nyc"
  ],
  "maxItemsPerSearch": 20,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call ragnum/facebook-marketplace-scraper --silent --output-dataset

```

## MCP server setup

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