# Facebook Marketplace Scraper: Listings by City (`earlytern/facebook-marketplace-scraper`) Actor

Search public Facebook Marketplace listings by city and keyword: title, price, place, photo and seller name. No login or cookies. Free blocked rows.

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

## Pricing

from $0.70 / 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.
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 by City

Search Facebook Marketplace by city and keyword without logging in. Get each listing's title, price, earlier crossed-out price, city, main photo, sold status, posting time, delivery options and, when Marketplace shows it, the seller's public name, in a dataset you can export as JSON, CSV, or Excel.

Use it to find underpriced items to resell, track used-car or furniture prices in your area, research second-hand market prices across cities, or feed an alert for new listings.

### What does Facebook Marketplace Scraper do?

- Runs Marketplace searches for every city and keyword you give, such as `bike` in `nyc` and `london`.
- Follows the results page after page until your maximum per search.
- Applies price range, sort order, "listed within" and search radius filters.
- Accepts search links copied from Marketplace and keeps their filters.
- Returns a free row when a search is blocked, empty, or uses a city Marketplace does not recognize.

### How to use Facebook Marketplace Scraper

1. Add one or more **Cities** as they appear in Marketplace addresses (`nyc`, `la`, `london`, `hanoi`) and one or more **Keywords**.
2. Optionally set a price range, sort order, how recent listings must be, and the maximum listings per search.
3. Click **Start** and download the results as JSON, CSV, or Excel, or read them through the API.

To find a city's name, open Marketplace in your browser, pick the location, and copy the word after `/marketplace/` in the address bar. A numeric city code from the address works too.

### Input

```json
{
  "locations": ["nyc"],
  "queries": ["bike"],
  "minPrice": 50,
  "maxPrice": 600,
  "sortBy": "newest",
  "maxItems": 100
}
```

| Field | Meaning | Default |
|---|---|---|
| `locations` | Cities as they appear in Marketplace addresses, or numeric city codes | – |
| `queries` | Keywords; each is searched in every city | – |
| `searchUrls` | Marketplace search links, such as `https://www.facebook.com/marketplace/nyc/search?query=bike`; their filters are kept | – |
| `minPrice`, `maxPrice` | Price range in each city's local currency | No limit |
| `sortBy` | `best_match`, `newest`, `price_low`, or `price_high` | `best_match` |
| `daysSinceListed` | Only listings posted in the last `1`, `7`, or `30` days | Any time |
| `radiusKm` | Distance around the city center, 1–500 km | 65 km |
| `maxItems` | Listings for each city and keyword pair or search link, 1–10,000 | 100 |
| `proxyCountry` | Two-letter connection country | US |

Use cities with keywords, search links, or both. One run can hold up to 100 searches. Hosted runs use Apify residential proxy connections. The Actor sends no cookies, does not keep response cookies, and does not log in.

### Output

Each `ok` row describes one listing:

- `listingId`, `url`, `title`, `publishedAt`, and `fetchedAt`.
- `price` (a number), `priceText` (as Marketplace shows it, with the currency sign), and `originalPrice` when an earlier price is shown crossed out.
- `city`, `state`, `locationName`, and `imageUrl` (the main photo).
- `isSold`, `isPending`, `deliveryTypes` (such as `IN_PERSON` or `SHIPPING`), and `categoryId`.
- `sellerName` when Marketplace shows it.
- `searchUrl`: the search that found the listing.

Prices are in the local currency of each listing; use `priceText` to see the currency sign. A missing value is returned as `null`.

Example from a search for `bike` in New York (prices change over time):

```json
{
  "searchUrl": "https://www.facebook.com/marketplace/nyc/search/?query=bike",
  "status": "ok",
  "reason": null,
  "listingId": "3330938490448509",
  "url": "https://www.facebook.com/marketplace/item/3330938490448509/",
  "title": "Bike",
  "price": 60,
  "priceText": "$60",
  "originalPrice": 100,
  "city": "Jersey City",
  "state": "NJ",
  "locationName": "Jersey City, New Jersey",
  "isSold": false,
  "isPending": false,
  "deliveryTypes": ["IN_PERSON", "DOOR_PICKUP"],
  "categoryId": "1658310421102081",
  "sellerName": null,
  "publishedAt": "2026-11-20T05:17:17.000Z"
}
```

A `blocked`, `empty`, or `error` row explains a search that returned no listings, with a `reason` and what to try next. These rows are free. A search may return some listings followed by a free row if a later page is blocked.

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

**$1 per 1,000 listings on Free**, $0.90 on Bronze, $0.80 on Silver, and $0.70 on Gold and above, plus a **$0.02 start fee per run** on every plan, with no filter fees. Rows for blocked, empty, or unrecognized searches have no charge. The Actor stops collecting at your maximum cost per run. Your Apify plan may separately account for compute and proxy usage.

### Limits and reliability

Facebook decides which listings visitors can see without login, and in which order. Results may be incomplete. Each search is read page by page with a pause between requests; duplicates within a search are removed, and a search ends when Marketplace has no more results, repeats itself, or returns nothing new three times in a row. A safety limit of 500 pages per search applies. Listings found by two different searches appear once for each search. The full listing description and all photos are not collected.

The results request is discovered from the scripts served with the search page. If Facebook changes Marketplace, the Actor may need maintenance. Do not provide passwords or cookies.

### Responsible use

Seller names are personal data. You are responsible for having a lawful basis to collect and process them (for example under the GDPR or other applicable privacy laws), respecting Facebook's terms, limiting retention, and honoring rights requests such as deletion. Public availability does not itself establish a lawful basis. This Actor does not read anything behind a login, messages, or seller profiles. It is not affiliated with or endorsed by Meta or Facebook.

### Related Actors

Use [Facebook Posts Scraper](https://apify.com/earlytern/facebook-posts-scraper) for public page posts and [Facebook Pages Scraper](https://apify.com/earlytern/facebook-pages-scraper) for page details.

### FAQ

**Which cities work?** Any city Marketplace offers in its address bar, in any country. A city Marketplace does not recognize returns a free `error` row explaining what to change.

**Can I get the full description and all photos?** Not in this version. Each row carries what the search results show: title, price, place, main photo, status, and posting time.

**Can I watch for new listings?** Set `sortBy` to `newest` and `daysSinceListed` to `1`, then schedule the Actor on Apify.

**How can I use the results?** Export the dataset as CSV, Excel, or JSON, or read it through the Apify dataset API. Filter for `status: "ok"` to work only with listings.

# Changelog

This Actor's version history is a separate document: https://apify.com/earlytern/facebook-marketplace-scraper/changelog.md

# Actor input Schema

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

Cities as they appear in Marketplace addresses, such as nyc, la, london or hanoi, or a numeric city code.

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

What to search for. Each keyword is searched in every city.

## `searchUrls` (type: `array`):

Search addresses copied from Marketplace, such as https://www.facebook.com/marketplace/nyc/search?query=bike. Their filters are kept.

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

Lowest price, in the local currency of each city.

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

Highest price, in the local currency of each city.

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

Order of the results.

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

Only listings posted in the last 1, 7 or 30 days.

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

Distance around the city center. Marketplace uses 65 km when empty.

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

Listings to return for each city and keyword pair or search link.

## `proxyCountry` (type: `string`):

Country used to read Marketplace, such as US or GB.

## Actor input object example

```json
{
  "locations": [
    "nyc"
  ],
  "queries": [
    "bike"
  ],
  "sortBy": "best_match",
  "maxItems": 30,
  "proxyCountry": "US"
}
```

# Actor output Schema

## `results` (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 = {
    "locations": [
        "nyc"
    ],
    "queries": [
        "bike"
    ],
    "maxItems": 30
};

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

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

```

## MCP server setup

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