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

Facebook Marketplace scraper: search listings by keyword and city with price, condition, radius, days-listed and delivery filters, or paste any Marketplace URL. Price, photos, condition, sold flag, creation time. No login, no seller data. Monitor mode alerts on new listings and price drops.

- **URL**: https://apify.com/datahamster/facebook-marketplace-scraper.md
- **Developed by:** [Viktor Dubnytskiy](https://apify.com/datahamster) (community)
- **Categories:** Social media, Lead generation
- **Features:** Limited permissions
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.82 / 1,000 result items

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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

Search Facebook Marketplace by keyword and city, or paste any Marketplace search, category or listing URL, and get one flat row per listing: title, price as a number with currency, the crossed-out original price when the seller lowered it, city and state, category, condition, photo, exact creation time, sold and pending flags, and delivery options. No Facebook account, no cookies, and no seller data. Monitor mode turns a saved search into an alert feed of new listings and price drops.

**Try it:** the prefilled example returns 20 rows in about 7 seconds and costs about $0.087 ($0.0868 in results plus about $0.0005 of Apify usage). Results cost $4.34 per 1,000 on the free plan, plus Apify usage of about $0.014 per 1,000 for searches or about $0.91 per 1,000 with listing details.

Coverage: public Marketplace listings as Facebook shows them to a visitor who is not logged in, 24 per page, up to 40 pages per search. A category feed without a keyword shows only its first page (15 to 24 listings) to logged-out visitors; add a keyword to page through a category. Seller names, profiles and ratings are never collected.

### Why this one

- **Filters as fields, no URL needed.** Keyword, location (city slug or `latitude,longitude`), min and max price, condition, radius, days since listed, delivery method, category and sort are input fields. The most-used Marketplace actor has three inputs (`startUrls`, `resultsLimit`, `includeListingDetails`, checked 2026-11-05): every search has to be built in the browser and pasted as a URL. Here both work, and every filter in a pasted URL is applied (test run 2026-11-05: `ps5` in Los Angeles, $100 to $600, used like new or good, last 7 days, 30 km, newest first returned 93 listings, all inside the price range and listed in the last 7 days).
- **New-listing and price-drop alerts (monitor mode).** Save the input as a scheduled task and each run returns only listings that are new for that search, or whose price, sold or pending status changed, with `changedFields` and the `previous` values. Facebook's own crossed-out price is in `originalPrice` and `priceDropped` on every row. The most-used Marketplace actor has no monitor mode. Monitor runs read Facebook's live 24-hour window to its end every time (up to 40 pages, 960 listings), because that window starts over with fresh listings further down instead of running strictly newest first. Test 2026-11-06: the baseline stored 1,148 listings for `bike` in NYC (40 pages, 82 s) and charged nothing for rows; the next run 2.5 minutes later read 1,078 listings in 66 s and returned 4 new ones, all created after the newest listing the baseline saw, while 171 older listings it had not served before were recorded silently. Listings posted in a gap longer than ~23 h between two runs are lost without notice (the run logs a warning and `gapHours`), so schedule every 1 to 12 hours.
- **Creation time on every row.** `createdAt` is the exact listing time (UTC, to the second) without a paid add-on; the most-used actor adds a time stamp only with its listing-details add-on.
- **Flat rows, prices as numbers.** `price: 300`, `currency: "USD"`, `city`, `state`, `isSold`, `shippingOffered`, instead of nested `listing_price.amount` strings, so a CSV export is usable as is.
- **No personal data.** Sellers on Marketplace are private people: no seller name, id, profile link, avatar or rating is written, and phone numbers and e-mails are removed from descriptions.
- **Price.** $0.00434 per listing on the free plan, Free to Gold 30% below the most-used Marketplace actor's same tier, and listing details at no extra event. That actor charges $0.0062 per listing on the free plan plus the same again for its details add-on, checked 2026-11-05; Apify platform usage is already included in its price, while here usage is billed on top (about $0.014 per 1,000 listings for searches, about $0.91 per 1,000 with details). For plain searches (usage about $0.000014 per listing) we are cheaper on Free to Gold; Apify caps Platinum and Diamond at the Gold price, so there we cost $0.00182 against that actor's $0.0015 and $0.0008. With details, usage adds about $0.0009 per listing, so on Platinum and Diamond our total ($0.0027) is close to that actor's listing plus details add-on ($0.003, $0.0016).

| Plan | This actor (per listing) | Most-used actor (per listing, + same for details) |
|---|---|---|
| Free | $0.00434 | $0.0062 |
| Bronze | $0.0035 | $0.005 |
| Silver | $0.00266 | $0.0038 |
| Gold | $0.00182 | $0.0026 |
| Platinum | $0.00182 | $0.0015 |
| Diamond | $0.00182 | $0.0008 |

On Platinum and Diamond we are dearer per listing than that actor, because Apify applies our Gold price there; with its details add-on ($0.0016 together on Diamond) the difference is small.

### What you get

Real rows from the example dataset (prefilled input `searchQueries: ["bike"]`, `location: "nyc"`, newest first):

| title | price | location | createdAt | delivery |
|---|---|---|---|---|
| Woom 3 16-inch Kids Bike + Woom Red Helmet + U Lock | $300 | Long Island City, NY | 2026-11-06T04:58:57Z | IN_PERSON, DOOR_PICKUP |
| Bycicle | $20 | Bala Cynwyd, PA | 2026-11-06T04:57:53Z | IN_PERSON, DOOR_PICKUP |
| Cheetah 48V Lithium-Ion E-Bike Battery | $160 | Bronx, NY | 2026-11-06T04:55:59Z | IN_PERSON |
| Lifetime Teton Pro 116 Angler Kayak BRAND NEW | $580 | Stamford, CT | 2026-11-06T04:51:00Z | IN_PERSON |

The example ran at 05:06 UTC; its newest listing was 7 minutes old.

One full row with `includeDetails: true` (photo URLs shortened):

```json
{
  "id": "1932917957676134",
  "url": "https://www.facebook.com/marketplace/item/1932917957676134/",
  "title": "Giant Revel 29er Mountain Bike",
  "price": 160,
  "priceText": "$160",
  "currency": "USD",
  "originalPrice": null,
  "priceDropped": false,
  "city": "Wading River",
  "state": "NY",
  "locationName": "Wading River, New York",
  "categoryId": "1658310421102081",
  "categoryName": "Bicycles",
  "condition": "Used - Fair",
  "conditionCode": "used_fair",
  "attributes": {"Bicycle Type": "Mountain Bike"},
  "description": "Aluminum Giant Revel mountain bike has a black and white frame with 29-inch wheels. It is equipped with mechanical disc brakes, a front suspension fork, and a Shimano drivetrain. ...",
  "photo": "https://scontent-phx1-1.xx.fbcdn.net/v/t39.84726-6/886895855_...",
  "photos": ["https://scontent-phx1-1.xx.fbcdn.net/...", "... 9 photos"],
  "createdAt": "2026-11-04T14:23:23Z",
  "isSold": false,
  "isPending": false,
  "deliveryTypes": ["IN_PERSON"],
  "shippingOffered": false,
  "localPickup": true,
  "latitude": 40.95,
  "longitude": -72.83,
  "detailsLoaded": true,
  "source": "search",
  "query": "bike",
  "searchLocation": "nyc",
  "page": 1,
  "rank": 2
}
```

`url` is the neutral listing link. `originalPrice` is the price Facebook shows crossed out after the seller lowered it, and `priceDropped` is true when it is higher than `price`. `latitude`/`longitude` (details only) are the approximate area Facebook shows on the map, rounded to about 1 km. `currency` comes from the price symbol and the search location; with details it is Facebook's own currency code.

### Use cases

- **Deal alerts.** A monitor task for `iphone 15` under $500 in your city, every hour: only new listings and price drops arrive, by webhook or Telegram.
- **Resale pricing.** Pull 500 listings of one model across several cities and compare `price` by `city` and `condition`.
- **Sold tracking.** Monitor a search: a listing that turns `isSold` or `isPending` comes back as a change with the previous value.

### Try it

Hit **Start**: the prefilled input searches `bike` in New York and returns 20 listings, newest first. Change `location` to `la`, `chicago`, `london` or any slug from a Marketplace URL, or to `41.88,-87.63`. Or paste a search URL from your browser into **Marketplace URLs**.

**Monitor mode.** Save the input as a task and set:

```json
{
  "mode": "monitor",
  "monitorStateId": "nyc-bikes",
  "searchQueries": ["road bike"],
  "location": "nyc",
  "maxPrice": 800,
  "sort": "newest",
  "maxItems": 200,
  "webhookUrl": "https://your-endpoint.example.com/hook"
}
```

Schedule the task (Apify, Schedules, cron `0 * * * *` for hourly). The first run reads the search and stores it as the baseline without returning or charging rows; later runs return only listings that are new for this search or whose price, sold or pending status changed. With `sort: newest` and no `daysSinceListed`, monitor runs read Facebook's live last-24-hours window to its end (up to 40 pages) every run; listings posted in a gap longer than ~23 h are lost without notice, so schedule every 1 to 12 hours. A listing counts as new only when it was created after the newest listing the previous complete run saw: Facebook serves a busy 24-hour window as a different set on every read, so older listings that show up for the first time are recorded silently, and a listing Facebook indexes a few minutes late can be missed. A run that crashes holds its lock until its timeout; later runs of the same task end as `overlapping_run` until then, or give the task a new `monitorStateId`.

### Input

| Field | Meaning | Default |
|---|---|---|
| `searchQueries` | Keywords, one search each | empty |
| `location` | Marketplace location slug (`nyc`, `la`, `london`, ...) or `latitude,longitude` | `nyc` |
| `startUrls` | Marketplace search, category or listing URLs (all URL filters applied) | empty |
| `category` | Category slug (`bicycles`, `vehicles`, `electronics`, ...) | empty |
| `minPrice`, `maxPrice` | Price range in the local currency | any |
| `condition` | `new`, `used_like_new`, `used_good`, `used_fair` | any |
| `radiusKm` | Search radius | 65 (Facebook's default) |
| `daysSinceListed` | Only listings from the last N days | any |
| `sort` | `newest`, `best_match`, `price_ascend`, `price_descend`, `distance_ascend` | `newest` |
| `delivery` | `all`, `local_pickup`, `shipping` | `all` |
| `includeDetails` | Description, condition, all photos, category name, approximate area | `false` |
| `skipSold` | Leave out sold and pending listings | `false` |
| `maxPagesPerSearch` | Pages of 24 per keyword or URL (up to 40); monitor runs always read up to 40 | `10` |
| `maxItems` | Stop the run after this many rows | `100` |
| `mode`, `monitorStateId`, `webhookUrl`, `telegramBotToken`, `telegramChatId` | Monitor mode | `scrape` |

### Pricing

| Event | Price |
|---|---|
| result | $0.00434 per listing ($4.34 per 1,000) on the free plan, details included |
| monitor-check | $0.005 per monitor run |
| change | $0.00434 per new or changed listing in monitor mode |

Paid Apify plans: $0.0035 (Bronze), $0.00266 (Silver), $0.00182 (Gold, Platinum and Diamond) per result and change. You pay only for pushed rows. Apify platform usage is billed by Apify on top: about $0.014 per 1,000 listings for searches (measured on a 500-listing run, residential proxy 0.67 MB per 1,000 listings), and about $0.91 per 1,000 listings with `includeDetails` (measured 2026-11-06: 20 listings with details, $0.018 usage) (each listing page is about 100 KB of residential traffic).

**Found it useful?** A short review on the Store page helps other people find this actor. If a search misbehaves, open an issue on the actor page.

### Related actors

- [Facebook Events Scraper](https://apify.com/datahamster/facebook-events-scraper) for public events by keyword or Page.
- [Facebook Groups Search](https://apify.com/datahamster/facebook-groups-search) to find buy-and-sell groups by keyword.
- [Craigslist Scraper](https://apify.com/datahamster/craigslist-scraper) for the other big local classifieds site.
- [Kleinanzeigen Scraper](https://apify.com/datahamster/kleinanzeigen-listings) for German classifieds with the same monitor mode.

### Limits

- Newest first: for a logged-out visitor Facebook serves an unfiltered newest-first search from a snapshot that can be hours old (measured 2026-11-05: 'bike' in NYC topped out at listings 8.5 hours old), while its last-24-hours filter is live. With `sort: newest` and no `daysSinceListed` the actor therefore reads the last 24 hours first and then the unrestricted search for older listings; `createdAt` tells them apart.
- Only what a logged-out visitor sees. Facebook decides which listings a search returns and loosely applies the radius; results near the edge of a large radius can come from neighbouring cities.
- A category feed without a keyword returns one page (15 to 24 listings). With a keyword the category search pages normally.
- Sellers are not collected (name, profile, rating, other listings).
- When Facebook refuses every proxy for a search (it answers "Rate limit exceeded" to busy IPs) that search is skipped with a warning; a run where nothing could be read ends as `rate_limited` or `blocked` and charges nothing.

### FAQ

**Do I need a Facebook account or cookies?** No.

**Why did my search return nothing?** Facebook has no listing for it in that area. `RUN_SUMMARY` in the run's key-value store has `emptyReason`, and `MARKETPLACE_STATS` lists `emptySearches`, `walled`, `refusals` and the location each slug resolved to.

### Changelog

- 0.1: keyword + location search with every Marketplace filter, pasted search, category and listing URLs, optional listing details, crossed-out price and price-drop flag, and monitor mode for new listings, price drops and sold status.

# Actor input Schema

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

Marketplace search keywords, one per line, e.g. "bike", "iphone 15", "sofa". Each keyword is one Marketplace search in the location below, 24 listings per page.

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

Facebook Marketplace location: the slug from a Marketplace URL (nyc, la, chicago, sanfrancisco, london, toronto, sydney, or any other slug such as 'austin' or '108424279189115'), or 'latitude,longitude' such as '41.88,-87.63'.

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

Paste Marketplace links as you see them in the browser: search URLs with any filters (https://www.facebook.com/marketplace/nyc/search?query=bike\&minPrice=50\&maxPrice=500\&sortBy=creation_time_descend\&itemCondition=used_good\&daysSinceListed=7\&radius=20\&deliveryMethod=shipping), category URLs (https://www.facebook.com/marketplace/la/bicycles?query=trek) or listing URLs (https://www.facebook.com/marketplace/item/1744671650997298/). Every filter in the URL is applied.

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

Optional Marketplace category slug as in a category URL, e.g. bicycles, vehicles, electronics, furniture, propertyrentals. With keywords it narrows the search; alone it reads the category feed (one page of 15-24 listings for logged-out visitors).

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

Lowest price in the local currency. Example: 50.

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

Highest price in the local currency. Example: 500.

## `condition` (type: `array`):

Keep only these item conditions (empty = any).

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

Search radius around the location in kilometres (Facebook's default is 65 km).

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

Only listings created in the last N days (1, 7 or 30 match Facebook's own options).

## `sort` (type: `string`):

Order of the results. Newest first reads Facebook's live last-24-hours window first, then older listings (Facebook serves the unfiltered newest-first search from an older snapshot). Monitor mode works best with newest first.

## `delivery` (type: `string`):

Local pickup only, shipping only, or both.

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

Also read each listing's page: description (phones and e-mails removed), condition, category name, all photos and the approximate area. About 0.5 MB more traffic per listing; no extra event charge.

## `skipSold` (type: `boolean`):

Leave out listings Facebook marks as sold or pending. You are charged only for pushed rows.

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

Stop each keyword or URL after this many pages of 24 listings. Example: 10.

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

Stop after this many results (you are charged only for pushed items)

## `mode` (type: `string`):

scrape = full results; monitor = only new/changed items since the previous run of this task

## `monitorStateId` (type: `string`):

Optional state id when not running as a saved task (monitor mode)

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

POST a change summary here in monitor mode

## `telegramBotToken` (type: `string`):

Optional: bot token for monitor-mode change summaries

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

Optional: chat id that receives monitor-mode summaries

## Actor input object example

```json
{
  "searchQueries": [
    "bike"
  ],
  "location": "nyc",
  "startUrls": [],
  "condition": [],
  "sort": "newest",
  "delivery": "all",
  "includeDetails": false,
  "skipSold": false,
  "maxPagesPerSearch": 10,
  "maxItems": 20,
  "mode": "scrape"
}
```

# Actor output Schema

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

All pushed rows (dataset, JSON)

## `resultsTable` (type: `string`):

Dataset in the Console viewer

## `runSummary` (type: `string`):

RUN_SUMMARY record

# 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 = {
    "searchQueries": [
        "bike"
    ],
    "location": "nyc",
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("datahamster/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 = {
    "searchQueries": ["bike"],
    "location": "nyc",
    "maxItems": 20,
}

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

```

## MCP server setup

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