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

Scrape public Facebook Marketplace listings by keyword, category, city or URL: prices, discounts, condition, photos, location, seller and vehicle details, with location checking and only-new monitoring. No Facebook login or cookies needed.

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

## Pricing

from $1.00 / 1,000 listing results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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, Sellers, Photos & Vehicle Details

![Facebook Marketplace Scraper](https://raw.githubusercontent.com/coregentdevspace/facebook-marketplace-scraper-assets/main/thumbnail-facebook-marketplace-scraper.png)

**Search public Facebook Marketplace like a buyer — by keyword, category, city, filters, Marketplace URL or listing ID — and get one clean row per listing:** price and discount, condition, location and coordinates, listing time, availability, photos, full description, public seller details and structured vehicle fields. Export to JSON, CSV or Excel, or call it from the API.

- 🔓 **No Facebook login, cookies or account** — nothing to hand over, nothing to get banned
- 📍 **Location you can trust** — every row records the place you asked for, the place Facebook used, and how sure the match is. A city Facebook does not know returns a `LOCATION_NOT_RESOLVED` row — **never another city's listings**
- 📚 **Deep search** — results are paged well past the first screen (measured: 288 unique listings over 12 pages for one search, no repeats)
- 🧾 **Normalized prices** — number + ISO currency + Facebook's own text, original (struck-through) price and discount %, `0` kept distinct from "unknown"
- 🚗 **Vehicle details** — make, model, year, mileage, transmission, fuel, colours, title status, owners — exactly as Facebook states them, never guessed from the title
- 🔔 **Only-new monitoring** — schedule a saved search and get just the listings that appeared since the last run
- 💸 **Pay only for listings delivered** — searches, pagination, retries, location lookups and empty searches are never charged

***

### What can I scrape?

| Mode       | You give                                                         | You get                                               |
| ---------- | ---------------------------------------------------------------- | ----------------------------------------------------- |
| `SEARCH`   | search terms + cities (+ optional categories)                    | listings matching each term in each city              |
| `CATEGORY` | categories (Vehicles, Property for rent, Electronics …) + cities | the category's listings in each city                  |
| `URL`      | Marketplace search / category / listing URLs from your browser   | the same results, **with the URL's filters kept**     |
| `LISTING`  | listing IDs or `facebook.com/marketplace/item/<id>/` URLs        | each listing with full details                        |
| `MONITOR`  | a saved search + a monitor key                                   | only listings that are **new** since the previous run |

Filters (applied by Facebook itself): **price range, condition, listed within (24 h / 7 days / 30 days), sort order, radius**.

***

### Quick start

Run it with the defaults — `iphone 15` in New York, up to 20 listings with full details:

```json
{
    "mode": "SEARCH",
    "searchTerms": ["iphone 15"],
    "locations": ["New York"],
    "maxListingsPerSearch": 20
}
```

#### More examples

**Used cars under 20,000 in Sydney, listed this week, with vehicle details**

```json
{
    "mode": "CATEGORY",
    "categories": ["VEHICLES"],
    "locations": ["Sydney"],
    "minPrice": 5000,
    "maxPrice": 20000,
    "listedWithin": "7_DAYS",
    "maxListingsPerSearch": 200
}
```

**Several products in several cities, newest first, search cards only (fast)**

```json
{
    "mode": "SEARCH",
    "searchTerms": ["dining table", "sofa"],
    "locations": ["London", "Manchester"],
    "country": "GB",
    "sortBy": "NEWEST",
    "includeListingDetails": false,
    "maxListingsPerSearch": 100
}
```

**The run behind the screenshot and samples below** — a New York search and the Los Angeles Vehicles category, 10 listings each, every detail on. The third URL is not a search page, so it returns one free `INVALID_MARKETPLACE_URL` status row:

```json
{
    "mode": "URL",
    "marketplaceUrls": [
        "https://www.facebook.com/marketplace/nyc/search/?query=iphone%2015",
        "https://www.facebook.com/marketplace/la/vehicles/",
        "https://www.facebook.com/marketplace/you/selling"
    ],
    "maxListingsPerSearch": 10,
    "includeListingDetails": true,
    "includeAllPhotos": true,
    "includeSellerDetails": true,
    "includeVehicleDetails": true,
    "includeCoordinates": true
}
```

**A search you set up in your browser** — copy the URL; its filters are kept:

```json
{
    "mode": "URL",
    "marketplaceUrls": [
        "https://www.facebook.com/marketplace/chicago/search?query=bicycle&maxPrice=300&sortBy=price_ascend"
    ]
}
```

**Specific listings**

```json
{
    "mode": "LISTING",
    "listingIds": ["1019665007412338", "https://www.facebook.com/marketplace/item/2028365781193661/"]
}
```

**Get new listings every morning** — schedule this input daily:

```json
{
    "mode": "MONITOR",
    "monitorKey": "iphone-sydney",
    "searchTerms": ["iphone 15"],
    "locations": ["Sydney"],
    "maxListingsPerSearch": 100
}
```

***

### Input

| Field                                                                                        | What it does                                                                                                                                                                                                                                       |
| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `mode`                                                                                       | `SEARCH`, `CATEGORY`, `URL`, `LISTING` or `MONITOR` (see above).                                                                                                                                                                                   |
| `searchTerms`                                                                                | Up to 25 keywords. Each is searched in each location (× each category, if any).                                                                                                                                                                    |
| `categories`                                                                                 | Vehicles, Property for rent / for sale, Electronics, Furniture, Home goods, Home improvement, Garden, Clothing, Family, Toys, Hobbies, Entertainment, Sporting goods, Musical instruments, Office supplies, Pet supplies, Classifieds, Free stuff. |
| `locations`                                                                                  | Up to 25 cities (`"New York"`, `"Austin, TX"`, `"Wagga Wagga"`), Marketplace city IDs, or `"latitude,longitude"`.                                                                                                                                  |
| `country`                                                                                    | Optional two-letter code. Disambiguates names like Manchester or Springfield and names the currency when Facebook shows a bare `$`.                                                                                                                |
| `radiusKm`                                                                                   | Optional search radius (Facebook's default is about 65 km).                                                                                                                                                                                        |
| `minPrice` / `maxPrice`                                                                      | In the location's own currency. No conversion.                                                                                                                                                                                                     |
| `conditions`                                                                                 | `NEW`, `LIKE_NEW`, `GOOD`, `FAIR`, `USED` (= any used).                                                                                                                                                                                            |
| `listedWithin`                                                                               | `ANY`, `24_HOURS`, `7_DAYS`, `30_DAYS`.                                                                                                                                                                                                            |
| `sortBy`                                                                                     | `RELEVANCE`, `NEWEST`, `PRICE_ASC`, `PRICE_DESC`, `DISTANCE`.                                                                                                                                                                                      |
| `maxListingsPerSearch`                                                                       | Up to 1,000 unique listings per search (term × location × category).                                                                                                                                                                               |
| `includeListingDetails`                                                                      | Read each listing's page for description, condition, category, coordinates, seller and vehicle fields. Off = search-card fields only.                                                                                                              |
| `maxDetailsToEnrich`                                                                         | Optional cap on detailed listings per run (0 = all).                                                                                                                                                                                               |
| `includeAllPhotos` / `includeSellerDetails` / `includeVehicleDetails` / `includeCoordinates` | Output toggles.                                                                                                                                                                                                                                    |
| `monitorKey` / `emitBaselineListings`                                                        | Monitoring (see below).                                                                                                                                                                                                                            |

#### Why might I get fewer listings than I asked for?

Facebook may simply have fewer listings for that search in that area — the run ends when Facebook says the list is finished (`coverage: COMPLETE_OR_HIGH` in the run summary). A listing found by two of your searches is returned once. And one Facebook quirk: **"Listed within" combined with a price sort returns nothing on Facebook's side**, so when you set both, the price sort is dropped (with a warning in the log) rather than returning an empty run.

***

### How location works

Facebook Marketplace is local, and a scraper that quietly hands you the wrong city is worse than one that fails. So:

1. **Big cities** (New York, LA, Chicago, London, Sydney, Toronto …) open their own Marketplace city page.
2. **Other places** (Canberra, Wagga Wagga, Austin TX …) are looked up through Facebook's own place search, and the listings are searched around that place's coordinates. The pick must actually be named like the place you asked for — the Actor never takes "the first suggestion".
3. **`latitude,longitude`** is used as given.
4. Page 1 is then **checked**: if none of its listings is in the requested place, the search returns a `LOCATION_MISMATCH` status row and **no listings** (and nothing is charged). If only a few are — Facebook often files listings under the nearby town they are in — the listings are kept and marked `locationConfidence: MEDIUM`.

Every listing row carries `source.requestedLocation`, `source.resolvedMarketplaceLocation`, `source.locationMethod` and `locationConfidence` (`HIGH` / `MEDIUM` / `LOW`).

***

### Output

One row per listing. Every row has every column (empty where it does not apply), so CSV exports line up.

| Group      | Fields                                                                                                                                                                                                       |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Listing    | `listingId`, `url`, `title`, `description`, `category`, `categoryPath`, `condition` (+ `conditionRaw`), `attributesRaw`                                                                                      |
| Price      | `price`, `currency`, `priceText`, `isFree`, `originalPrice`, `isDiscounted`, `discountAmount`, `discountPct`                                                                                                 |
| Place      | `location.text`, `.city`, `.state`, `.latitude`, `.longitude`                                                                                                                                                |
| Time       | `createdAt` (exact), `timestampQuality`, `ageHours`, `ageDays`                                                                                                                                               |
| Status     | `availabilityStatus` (`ACTIVE` / `PENDING` / `SOLD` / `UNAVAILABLE` / `UNKNOWN`), `isSold`, `isPending`                                                                                                      |
| Media      | `thumbnailUrl`, `photos[]`, `photoCount`, `videos[]`                                                                                                                                                         |
| Seller     | `seller.name`, `.id`, `.profilePictureUrl`, `.sellerType`, `.joinedYear`, `.rating`, `.ratingCount` — public fields only                                                                                     |
| Vehicle    | `vehicle.make`, `.model`, `.year`, `.trim`, `.mileage`, `.mileageUnit`, `.transmission`, `.fuelType`, `.exteriorColor`, `.interiorColor`, `.condition`, `.titleStatus`, `.ownerCount`, `.vin` (where stated) |
| Delivery   | `deliveryTypes` (as Facebook lists them, e.g. `IN_PERSON`), `isShippingOffered`                                                                                                                              |
| Provenance | `source` (mode, term, category, requested/resolved location, URL), `locationConfidence`, `position`, `detailsStatus`, `scrapedAt`                                                                            |
| Monitor    | `eventType` (`NEW_LISTING` / `BASELINE_LISTING`), `monitorKey`, `isBaseline`                                                                                                                                 |

`detailsStatus` says whether a row has full details: `ENRICHED`, `NOT_REQUESTED` (details off), `SKIPPED_LIMIT` (past `maxDetailsToEnrich`) or `UNAVAILABLE` (the listing page could not be read — the row keeps its search-card fields and is charged as a card only).

**Search cards vs full details.** With details off you still get title, price (+ original price), city/state, exact listing time, availability, main photo, seller name and delivery type. Description, condition, category, coordinates, seller join year/rating, all photos and vehicle fields come from the listing page.

#### Listings view

![Listings table view](https://raw.githubusercontent.com/coregentdevspace/facebook-marketplace-scraper-assets/main/facebook-marketplace-scraper-output-listings-table-view.png)

The dataset has four views: **Listings** (above), **Listing details** (description, category, coordinates, photos, seller), **Vehicles** (make, model, year, mileage and the rest) and **Run issues** (status rows).

#### Sample records (from the run above, shortened)

**Listings / Listing details**: a New York search result with full details:

```json
{
    "rowType": "listing",
    "listingId": "1045643778528034",
    "url": "https://www.facebook.com/marketplace/item/1045643778528034/",
    "title": "iPhone 15 pro",
    "price": 325,
    "priceText": "$325",
    "currency": "USD",
    "isFree": false,
    "originalPrice": null,
    "isDiscounted": false,
    "condition": "LIKE_NEW",
    "conditionRaw": "Used - like new",
    "category": "Mobile phones",
    "categoryPath": ["Electronics", "Cell Phones"],
    "location": {
        "text": "Brooklyn, NY",
        "city": "Brooklyn",
        "state": "NY",
        "postalCode": null,
        "latitude": 40.580749511719,
        "longitude": -73.965454101562
    },
    "createdAt": "2026-10-14T07:03:11.000Z",
    "timestampQuality": "EXACT",
    "ageDays": 17,
    "availabilityStatus": "ACTIVE",
    "isSold": false,
    "photoCount": 2,
    "description": "The phone has no scratches, No cracks, No damages what’s so ever to it. It has 256gb and thr battery health is it 89%.",
    "seller": {
        "name": "…",
        "id": "pfbid…",
        "sellerType": "INDIVIDUAL",
        "joinedYear": 2025,
        "rating": null,
        "ratingsPrivate": true
    },
    "deliveryTypes": ["IN_PERSON"],
    "isShippingOffered": false,
    "detailsStatus": "ENRICHED",
    "source": {
        "mode": "URL",
        "searchTerm": "iphone 15",
        "marketplaceUrl": "https://www.facebook.com/marketplace/nyc/search/?query=iphone+15",
        "requestedLocation": "nyc",
        "resolvedMarketplaceLocation": "New York, New York",
        "locationMethod": "slug",
        "locationConfidence": "HIGH"
    },
    "locationConfidence": "HIGH",
    "position": 1,
    "status": "SUCCESS",
    "scrapedAt": "2026-10-31T23:27:04.287Z"
}
```

**Vehicles**: a Los Angeles Vehicles category result:

```json
{
    "rowType": "listing",
    "listingId": "4481620335485663",
    "url": "https://www.facebook.com/marketplace/item/4481620335485663/",
    "title": "2010 Ford Escape · Xls",
    "price": 2000,
    "priceText": "$2,000",
    "currency": "USD",
    "location": {
        "text": "Venice, CA",
        "city": "Venice",
        "state": "CA",
        "latitude": 33.994445800781,
        "longitude": -118.46008300781
    },
    "createdAt": "2026-10-29T03:45:03.000Z",
    "availabilityStatus": "ACTIVE",
    "photoCount": 8,
    "description": "2010 Ford Escape XLS – Priced to Sell. Selling my 2010 Ford Escape XLS with 167,817 miles. …",
    "vehicle": {
        "make": "Ford",
        "model": "Escape",
        "year": 2010,
        "trim": "Xls",
        "mileage": 167817,
        "mileageUnit": "mi",
        "transmission": "Automatic",
        "fuelType": "Gasoline",
        "exteriorColor": "blue",
        "interiorColor": "beige",
        "titleStatus": null,
        "ownerCount": null,
        "vin": null,
        "sellerType": "Private seller"
    },
    "vehicleSubtitle": "167K miles",
    "detailsStatus": "ENRICHED",
    "source": {
        "mode": "URL",
        "category": "vehicles",
        "marketplaceUrl": "https://www.facebook.com/marketplace/la/search/?category_id=vehicles",
        "requestedLocation": "la",
        "resolvedMarketplaceLocation": "Los Angeles, California",
        "locationMethod": "slug"
    },
    "status": "SUCCESS"
}
```

**Run issues**: the status row for the URL that is not a search page:

```json
{
    "rowType": "status",
    "listingId": null,
    "status": "INVALID_MARKETPLACE_URL",
    "statusMessage": "not a listing, search or category page: https://www.facebook.com/marketplace/you/selling",
    "source": { "mode": "URL", "input": "https://www.facebook.com/marketplace/you/selling" },
    "scrapedAt": "2026-10-31T23:27:12.403Z"
}
```

#### Status rows

A search or listing that produces no listings adds one `rowType: "status"` row saying why — `LOCATION_NOT_RESOLVED`, `LOCATION_MISMATCH`, `LISTING_NOT_FOUND`, `INVALID_MARKETPLACE_URL`, `RATE_LIMITED`, `BLOCKED` or `PROVIDER_ERROR`. They come after the listings, appear in the **Run issues** view and are **never charged**.

#### Run summary and retries

The key-value store's `RUN_SUMMARY` lists every search with its status, pages read, listings found, why it stopped and its `coverage` (`COMPLETE_OR_HIGH`, `CAPPED`, `PARTIAL`, `LOCATION_MISMATCH`, `BLOCKED`, `UNKNOWN`), plus totals (raw listings seen, unique listings, details enriched, sold listings). If anything failed for a temporary reason, `RETRY_INPUT` holds a ready-to-run input with just those searches or listings.

***

### Monitoring — only new listings

Set `mode` to `MONITOR`, give the saved search a `monitorKey`, and schedule it.

- **First run = baseline.** It records what is listed now and returns nothing (unless `emitBaselineListings` is on, which returns them marked `BASELINE_LISTING`).
- **Every later run** returns only listings it has not seen before, marked `NEW_LISTING`, sorted newest first.
- **Change the saved search** (term, location, category, price, condition, age or radius) and the next run starts a new baseline instead of reporting the whole market as "new". Changing `maxListingsPerSearch` does not.
- Seen listings are remembered for 60 days.

You pay only for the new listings returned.

***

### 💸 How is pricing calculated?

Pay per event — no start fee, no monthly rental:

- **Listing result** — once per unique listing delivered to your dataset.
- **Listing detail** — once per delivered listing whose full details were read (only when *Include listing details* is on).

Never charged: search requests, pagination, retries, location lookups, duplicates, status rows, failed or empty searches, and monitor baseline listings that are not returned. A listing whose details could not be read is charged as a listing result only. Your spending limit is respected: the run stops cleanly when it is reached and keeps everything already delivered.

This README deliberately quotes no figures — see the **Pricing** tab for current rates.

***

### Do I need a Facebook login or cookies?

No. Everything comes from what Facebook Marketplace shows a logged-out visitor. You never provide an account, cookie or token.

### Why are results different from what I see when logged in?

Marketplace is personalised and local. Logged-in results depend on your account, history and saved location; this Actor sees what a logged-out visitor in the requested place sees. Coverage is best effort — Facebook does not publish how many listings exist, and no scraper can promise every listing.

### Can I call it through the API or MCP?

Yes — like any Apify Actor, through the Apify API, the JavaScript/Python clients, integrations (Make, Zapier, n8n), or the Apify MCP server for AI agents. Example:

```bash
curl -X POST "https://api.apify.com/v2/acts/coregent~facebook-marketplace-scraper/run-sync-get-dataset-items?token=<YOUR_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"mode":"SEARCH","searchTerms":["dining table"],"locations":["Chicago"],"maxListingsPerSearch":50}'
```

***

### 🚦 Proxy policy

**Apify Residential proxy is on by default, and it is required on Apify.** Facebook refuses Marketplace data from Apify datacenter addresses (pages redirect to login and the data queries are rate-limited), so if you pick Apify Datacenter the run switches to Residential and logs a warning. Residential bandwidth is included in the listing-details price; you are not billed for proxy traffic separately.

To route through your own provider instead, enter it in the proxy editor's **Custom proxy URLs** field. That traffic goes through your provider's account:

```
http://user:pass@proxy.iproyal.com:12321
http://user:pass@proxy.brightdata.com:22225
http://user:pass@proxy.oxylabs.io:7777
```

***

### Limitations

- **Unofficial.** Not affiliated with, endorsed by or connected to Meta or Facebook.
- **Availability varies by region**, and Marketplace is not available in every country.
- **Fields differ by category** — vehicle and property fields exist only where Facebook states them; nothing is inferred.
- **Search results are personalised and geographically influenced**; coverage is best effort, never guaranteed exhaustive.
- **Seller fields are limited to public Marketplace information.** There is no public seller profile URL for logged-out visitors, so none is returned.
- **Currency**: taken from the listing page when details are on. On search cards Facebook shows a symbol; an ambiguous `$` is named from the location's country (or your `country` input) — or left empty rather than guessed.
- **No currency conversion**, and price filters use the location's own currency.

### Privacy and responsible use

This Actor collects only what Facebook Marketplace shows any logged-out visitor. It does not log in, read messages, contact sellers, or reveal hidden contact details. Seller names are personal data in many jurisdictions — process them lawfully (e.g. GDPR / CCPA), for a legitimate purpose, and do not use them for spam or harassment.

### Need something else?

Missing a field, a filter or a country? Open an issue on the Actor's **Issues** tab — requests with an example URL get looked at first.

# Actor input Schema

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

SEARCH: keywords in one or more cities. CATEGORY: browse whole categories (e.g. Vehicles) in one or more cities — to search keywords inside a category, use SEARCH and pick categories. URL: Marketplace search, category or listing URLs you copied from Facebook — the filters in the URL are kept. LISTING: specific listings by ID or URL. MONITOR: repeat a saved search and return only listings that are new since the last run (needs a monitor key).

## `searchTerms` (type: `array`):

SEARCH / MONITOR: what to search for, e.g. "iphone 15", "dining table", "toyota camry". Each term is searched in each location (and each category, if you pick any). Not used in CATEGORY mode. Up to 25 terms.

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

CATEGORY mode: the categories to browse. SEARCH / MONITOR: optional — narrows the search terms to these categories. Leave empty to search everything.

## `marketplaceUrls` (type: `array`):

URL mode (and MONITOR): Marketplace search or category URLs, e.g. https://www.facebook.com/marketplace/nyc/search?query=bicycle\&maxPrice=300 — filters in the URL are kept. Listing URLs (facebook.com/marketplace/item/<id>/) are fetched as single listings. Up to 100.

## `listingIds` (type: `array`):

LISTING mode: numeric Marketplace listing IDs (the number in facebook.com/marketplace/item/<id>/) or listing URLs. Each is returned with full details. Up to 1,000.

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

Cities to search in, e.g. "New York", "Sydney", "London", "Austin, TX". Big cities resolve directly to their Marketplace page; other places are looked up through Facebook's own place search, and every row records which place was used and how confident the match is. You can also give a Marketplace city ID or "latitude,longitude". A location that cannot be resolved returns a LOCATION_NOT_RESOLVED status row instead of another city's listings. Required for SEARCH, CATEGORY and MONITOR. Up to 25.

## `country` (type: `string`):

Two-letter country code (US, AU, GB, CA, DE …). Helps pick the right place for ambiguous names (Manchester, Springfield, Newcastle) and names the currency when Facebook shows a bare "$".

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

Optional search radius around the location, in kilometres. Facebook's default is about 65 km.

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

Optional. In the local currency of the location. No currency conversion is done.

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

Optional. In the local currency of the location.

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

Only listings in these conditions. USED means any used condition (like new, good, fair).

## `listedWithin` (type: `string`):

Only listings posted in the last day, week or month. Note: Facebook returns nothing when this is combined with a price sort, so a price sort is dropped (with a warning) when this is set.

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

Facebook's own result order. MONITOR mode always uses Newest first.

## `maxListingsPerSearch` (type: `integer`):

The most unique listings to save for EACH search (term × location × category). Two terms in two cities at 20 can return up to 80 rows. Facebook may run out sooner. In MONITOR mode this is how many listings each check reads. You are charged only for listings delivered.

## `includeListingDetails` (type: `boolean`):

Read each listing's page for the full description, condition, category, exact coordinates, seller (join year, rating) and vehicle details (make, model, year, mileage, transmission, fuel…). Off = search-card data only (title, price, city, time, photo, seller name) — faster and charged as a listing result only.

## `maxDetailsToEnrich` (type: `integer`):

Optional cap on how many listings get full details across the run; the rest are returned with search-card data. 0 = every listing.

## `includeAllPhotos` (type: `boolean`):

Return every photo URL of each enriched listing, not just the main one. Photo URLs only — images are not downloaded.

## `includeSellerDetails` (type: `boolean`):

Public seller fields only: name, ID, picture, type, Facebook join year and rating where shown.

## `includeVehicleDetails` (type: `boolean`):

Structured vehicle fields for vehicle listings (needs listing details). Never guessed from the title.

## `includeCoordinates` (type: `boolean`):

Latitude and longitude of each enriched listing, as published by Facebook.

## `monitorKey` (type: `string`):

MONITOR mode: a name for this saved search, e.g. "iphone-sydney". The Actor remembers which listings it has seen under this key, so schedule the same input and each run returns only new listings. The first run (or a run after you change the term, location, category or filters) records a baseline and returns nothing unless you enable the next option.

## `emitBaselineListings` (type: `boolean`):

On a monitor's first run, also return the listings that are already there (marked BASELINE_LISTING). Off = the first run only records them.

## `maxConcurrency` (type: `integer`):

How many searches run at the same time. Pages of one search are always read in order.

## `detailConcurrency` (type: `integer`):

How many listing pages are read at the same time across the run.

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

Apify Residential proxy is on by default and required on Apify: Facebook refuses Marketplace data from Apify datacenter addresses, so a datacenter selection is switched to Residential. Its bandwidth is included in the listing-detail price. To use your own provider, enter it under Custom proxy URLs.

## Actor input object example

```json
{
  "mode": "SEARCH",
  "searchTerms": [
    "iphone 15"
  ],
  "categories": [],
  "marketplaceUrls": [],
  "listingIds": [],
  "locations": [
    "New York"
  ],
  "country": "",
  "conditions": [],
  "listedWithin": "ANY",
  "sortBy": "RELEVANCE",
  "maxListingsPerSearch": 20,
  "includeListingDetails": true,
  "maxDetailsToEnrich": 0,
  "includeAllPhotos": false,
  "includeSellerDetails": true,
  "includeVehicleDetails": true,
  "includeCoordinates": true,
  "emitBaselineListings": false,
  "maxConcurrency": 3,
  "detailConcurrency": 5,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

No description

## `details` (type: `string`):

No description

## `vehicles` (type: `string`):

No description

## `issues` (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 = {
    "mode": "SEARCH",
    "searchTerms": [
        "iphone 15"
    ],
    "locations": [
        "New York"
    ],
    "maxListingsPerSearch": 20,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("coregent/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 = {
    "mode": "SEARCH",
    "searchTerms": ["iphone 15"],
    "locations": ["New York"],
    "maxListingsPerSearch": 20,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("coregent/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 '{
  "mode": "SEARCH",
  "searchTerms": [
    "iphone 15"
  ],
  "locations": [
    "New York"
  ],
  "maxListingsPerSearch": 20,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call coregent/facebook-marketplace-scraper --silent --output-dataset

```

## MCP server setup

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