# Facebook Marketplace : Listing Location Details Scraper (`simpleapi/facebook-marketplace-scraper`) Actor

Facebook Marketplace Scraper extracts listings from Facebook Marketplace, capturing titles, prices, photos, locations, seller info, descriptions, and timestamps. Ideal for product research, price tracking, lead generation, and automating structured Marketplace data collection at scale.

- **URL**: https://apify.com/simpleapi/facebook-marketplace-scraper.md
- **Developed by:** [SimpleAPI](https://apify.com/simpleapi) (community)
- **Categories:** Lead generation, Social media, Automation
- **Stats:** 27 total users, 0 monthly users, 100.0% runs succeeded, 2 bookmarks
- **User rating**: No ratings yet

## Pricing

$19.99/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period. You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#rental-actors

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

### Facebook Marketplace Scraper — Listings, Prices and Location Data

Facebook Marketplace : Listing Location Details Scraper turns Facebook Marketplace searches into a geo-tagged dataset of listings, complete with title, price, condition, photos, and per-row latitude, longitude, city, state, region and distance from your search center. Point it at one coordinate and radius, or fan a single keyword out across dozens of cities in one run. Resellers use it to source underpriced inventory by territory, market researchers use it to map listing density and pricing by region, and analysts feed the output straight into spreadsheets or BI tools for territory-level comparisons.

### What is Facebook Marketplace : Listing Location Details Scraper?

Facebook Marketplace : Listing Location Details Scraper is an Apify Actor that collects public Facebook Marketplace listings and enriches every row with location data: flat latitude/longitude/city/state/region fields plus a calculated distance from your search center. It runs logged out on residential proxies — no Facebook account, login, or API key is required. Results land in a structured Apify dataset you can export as JSON, CSV, or Excel, or read over the API.

- Discover listings by city (`cities` + `searchQuery`), by exact coordinate and radius (`centerLatitude`/`centerLongitude`/`radiusKm`), or by pasting ready-made Marketplace search URLs (`areaSearchUrls`).
- Returns core listing identity and content fields: `id`, `listingTitle`, `description`, `condition`, `listingPrice`, photos and video.
- Adds location columns not found in a standard search scrape: `cityQueried`, flat `latitude`/`longitude`, `city`/`state`/`region`, and `distanceKm`.
- Optional per-city aggregate rows (`includeAreaSummary`) summarize listing count, average, minimum and maximum price for each territory.
- Choose fast search-snippet rows or `fullDetail` mode, which visits each listing page for descriptions, attributes and exact coordinates.
- Exports to JSON, CSV, or Excel, or pull results directly via the Apify API/dataset endpoints.

### What data can I extract with Facebook Marketplace : Listing Location Details Scraper?

Each row combines listing identity/content, price and condition, media, and location/targeting fields.

| Field | Example Value | Use Case |
| --- | --- | --- |
| `id` | `"1234567890123456"` | Unique listing ID for de-duplication and joins across runs |
| `listingTitle` | `"Trek mountain bike, barely used"` | Headline shown in search results |
| `itemUrl` | `"https://www.facebook.com/marketplace/item/1234567890123456/"` | Direct link back to the live listing |
| `facebookUrl` | `"https://www.facebook.com/marketplace/seattle/search/?query=bike"` | The search/area this row was collected from |
| `description` | `{"text": "Selling my Trek..."}` | Full listing description text (fullDetail mode) |
| `condition` | `"Used - like new"` | Buyer-facing condition label |
| `listingPrice` | `{"amount": "180", "currency": "USD", "formatted_amount_zeros_stripped": "$180"}` | Current asking price |
| `strikethroughPrice` | `"$220"` | Signals a markdown from an earlier price |
| `listingAttributes` | `[{"attribute_name": "condition", "label": "Used - good"}]` | Structured item attributes such as brand or size |
| `deliveryTypes` | `["local_pick_up"]` | Shipping/pickup options offered |
| `listingPhotos` / `primaryListingPhoto` | `[{"image": {"uri": "https://scontent.../"}}]` | Images for gallery display |
| `listingVideo` | `[]` | Attached video, when the seller added one |
| `timestamp` | `"2026-07-18T14:32:00.000Z"` | ISO listing creation time |
| `isSold` / `isPending` / `isLive` / `isHidden` | `false` / `false` / `true` / `false` | Listing availability flags |
| `listingCategoryId` | `"1626864784324722"` | Marketplace category taxonomy ID |
| `cityQueried` | `"seattle"` | Which input city produced this row (`null` for `areaSearchUrls` rows) |
| `latitude` / `longitude` | `47.6103` / `-122.3341` | Flat scalar coordinates ready for mapping tools |
| `city` / `state` / `region` | `"Seattle"` / `"WA"` / `"Seattle, WA"` | Reverse-geocoded place labels |
| `distanceKm` | `3.42` | Great-circle distance from your search center |

#### Price and condition data

Each listing carries the price and condition signals that drive a buy/skip decision. `listingPrice` returns the current asking amount plus currency and a zero-stripped formatted string; `strikethroughPrice` appears when the seller has marked down from an earlier price, useful for flagging active discounts. `condition` is a human-readable label (e.g. "Used - like new") derived from Facebook's raw condition code, while `listingAttributes` exposes any additional structured attributes the seller filled in, such as brand or size. Resellers use these fields together to rank listings by margin: compare `listingPrice` against comparable resale value, then filter out anything below the condition threshold you're willing to relist.

#### Location and radius targeting data

`cityQueried` tags every row with the input city that produced it (null when the row came from a pasted `areaSearchUrls` link), so a multi-city run stays sortable by territory. `latitude` and `longitude` are flat scalars — ready to drop into a map or spreadsheet without parsing the nested `location` object. `city`, `state` and `region` give you a human place name for grouping and filtering. `distanceKm` is the great-circle distance from your `centerLatitude`/`centerLongitude` to the listing, letting you rank results by proximity or cut off anything outside a working radius.

### Why not build this yourself?

Meta's Graph API does not expose Marketplace search — there is no public, documented endpoint for querying Marketplace listings by keyword, city, or coordinate, so there's no official API to compare against here. Building this in-house means reverse-engineering Facebook's internal GraphQL surface: locating the current `CometMarketplaceSearchContentPaginationQuery` doc\_id inside minified JS bundles that Meta rotates, extracting a fresh `lsd`/`fb_dtsg` session token from the bootstrap HTML on every run, and paginating a cursor-based feed that returns 24 listings per page. On top of that, Marketplace blocks aggressively — 403/429 responses are common — so a homemade scraper needs residential IPs, a guest-session warmup, and retry logic across fresh IPs just to get results consistently.

This Actor already does all of that: it re-extracts the doc\_id and session tokens per run, warms up a guest session, retries its bootstrap step on fresh residential IPs across several attempts, and finishes with an empty (not failed) dataset rather than crashing when Facebook blocks a run. Building and maintaining this yourself means owning that anti-bot arms race indefinitely; running the Actor means you only maintain your input parameters.

### How to use data extracted from Facebook Marketplace?

#### Resellers and arbitrage sourcing

Resellers and dropshippers use `cities` + `searchQuery` to scan a shortlist of metros for one product line — e.g. "electric bike" across Seattle, Portland and Tacoma — then sort the resulting rows by `listingPrice` and `condition` to find underpriced, resellable inventory before it's gone. Pairing `centerLatitude`/`centerLongitude`/`radiusKm` narrows a single city down to a specific pickup catchment, so you're only looking at listings within reach of a warehouse or storefront. `distanceKm` on every row lets you rank by proximity, and `strikethroughPrice` flags sellers who already marked a listing down. The output — `id`, `listingTitle`, `listingPrice`, `condition`, `itemUrl` — drops straight into a spreadsheet or sourcing pipeline for repeat runs.

#### Local market research agencies

Agencies auditing a client's local market — a franchise considering a new territory, a reseller comparing metros — run the same `searchQuery` across a `cities` list and compare the per-city `area_summary` rows (`listingCount`, `avgPrice`, `minPrice`, `maxPrice`) side by side. Because every listing is tagged with `cityQueried`, `city`, `state` and `region`, an agency can benchmark listing density and price spread across several metros in one run instead of running separate manual searches, then hand the client a territory comparison built from the same fields every time.

#### Market and price research

Price researchers use `includeAreaSummary` to get one aggregate row per city — `listingCount`, `avgPrice`, `minPrice`, `maxPrice` — without touching a single listing row, which is enough to chart price distribution for a product category across regions. For deeper analysis, `fullDetail` mode adds `condition` and `listingAttributes` to every row, so a researcher can control for item condition before comparing prices, and `distanceKm` lets them weight results toward listings near a specific reference point rather than an entire metro.

#### AI agents and automated pipelines

Because every field is typed JSON with a stable schema, agent frameworks can call this Actor as a tool, pass in a city list and keyword, and reason over structured fields like `listingPrice`, `condition` and `distanceKm` instead of parsing HTML. A RAG pipeline can index `listingTitle` and `description` alongside the location fields to answer natural-language questions about what's for sale near a given point, and automated pipelines can schedule repeat runs and diff `city`/`id` pairs to alert on new listings within a radius.

### 🔼 Input sample

None of this Actor's parameters are required — every field has a sensible fallback or is simply skipped when empty.

| Parameter | Required | Type | Description | Example Value |
| --- | --- | --- | --- | --- |
| `cities` | No | array | One search per city — city name/slug (e.g. `"seattle"`) or full Marketplace URL. Combined with `searchQuery`. | `["seattle", "portland"]` |
| `searchQuery` | No | string | Keyword searched in each city above. Ignored for entries in `cities` that are already full URLs. | `"bike"` |
| `centerLatitude` | No | number | Re-point every search to this latitude (overrides the city page's own center). Drives `distanceKm`. | `47.6062` |
| `centerLongitude` | No | number | Re-point every search to this longitude. Pairs with `centerLatitude` + `radiusKm`. | `-122.3321` |
| `radiusKm` | No | integer (1–500) | How far around the center to include listings, in kilometres. | `40` |
| `includeAreaSummary` | No | boolean (default `false`) | Append one aggregate row per city with `listingCount`, `avgPrice`, `minPrice`, `maxPrice`. | `true` |
| `maxListingsPerArea` | No | integer (min 0, default 50) | Cap on listings collected per city/URL; `0` = everything Facebook returns. | `30` |
| `fullDetail` | No | boolean (default `true`) | ON visits each listing page for description, attributes and exact coordinates; OFF returns fast search-snippet rows. | `true` |
| `areaSearchUrls` | No | array | Ready-made Facebook Marketplace search URLs to scan exact territories directly, instead of (or alongside) `cities`. Rows carry `cityQueried: null`. | `["https://www.facebook.com/marketplace/108479165840750/search/?query=bike"]` |
| `proxyConfiguration` | No | object | Apify Proxy preferences. This Actor always runs on residential IPs; region hints are honored where possible. | `{"useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"]}` |

```json
{
  "cities": ["seattle", "portland"],
  "searchQuery": "bike",
  "centerLatitude": 47.6062,
  "centerLongitude": -122.3321,
  "radiusKm": 40,
  "includeAreaSummary": true,
  "maxListingsPerArea": 30,
  "fullDetail": true
}
```

**Common pitfall:** `cities` accepts a plain city name or slug (`"seattle"`, `"los angeles"`) — not a `"City, State"` string. The Actor only lowercases and strips whitespace before building the URL, so an entry like `"New York, NY"` turns into an invalid path segment and that area returns zero rows. Use `"newyork"` or paste the full Marketplace URL instead, and put any state/keyword context into `searchQuery`.

### 🔽 Output sample

Every listing is pushed to the Actor's default dataset as one flat JSON object, exportable as JSON, CSV, or Excel, or readable via the Apify API. The record below is a `fullDetail` row (the Actor's default mode); with `fullDetail: false` the same location columns are added, but the listing fields come back in Facebook's original snake\_case shape (`listing_price`, `marketplace_listing_title`, `is_sold`, etc.) instead of the shape shown here. Only listing rows are billed under the `row_result` event — if `includeAreaSummary` is on, the extra `area_summary` rows it adds are **not charged**; filter them out of a paid-row count or export with `type != "area_summary"`.

```json
{
  "facebookUrl": "https://www.facebook.com/marketplace/seattle/search/?query=bike",
  "id": "1234567890123456",
  "itemUrl": "https://www.facebook.com/marketplace/item/1234567890123456/",
  "listingAttributes": [
    { "attribute_name": "condition", "value": "used_like_new", "label": "Used - like new" }
  ],
  "condition": "Used - like new",
  "timestamp": "2026-07-18T14:32:00.000Z",
  "deliveryTypes": ["local_pick_up"],
  "listingPhotos": [
    {
      "__typename": "Photo",
      "accessibility_caption": "bike photo",
      "image": { "height": 720, "width": 960, "uri": "https://scontent.xx.fbcdn.net/photo1.jpg" },
      "id": "9988776655"
    }
  ],
  "listingPrice": {
    "formatted_amount_zeros_stripped": "$180",
    "amount_with_offset_in_currency": 18000,
    "amount": "180",
    "currency": "USD"
  },
  "location": { "latitude": 47.6103, "longitude": -122.3341 },
  "locationText": { "text": "Seattle, WA" },
  "listingTitle": "Trek mountain bike, barely used",
  "description": { "text": "Selling my Trek mountain bike, ridden a handful of times. Pickup only." },
  "isHidden": false,
  "isLive": true,
  "isPending": false,
  "isSold": false,
  "isViewerSeller": false,
  "listingVideo": [],
  "listingCategoryId": "1626864784324722",
  "strikethroughPrice": "$220",
  "primaryListingPhoto": {
    "__typename": "Photo",
    "id": "9988776655",
    "photo_image_url": "https://scontent.xx.fbcdn.net/photo1.jpg"
  },
  "customSubTitlesWithRenderingFlags": [],
  "cityQueried": "seattle",
  "latitude": 47.6103,
  "longitude": -122.3341,
  "city": "Seattle",
  "state": "WA",
  "region": "Seattle, WA",
  "distanceKm": 3.42
}
```

### How do you filter and target specific listings?

This Actor gives you three independent ways to narrow down a huge, constantly-changing catalogue of listings.

**Query approach:** use `cities` + `searchQuery` when you want a broad, repeatable sweep — one keyword fanned out across as many metros as you list, each row tagged with `cityQueried` so you always know which city it came from. Use `areaSearchUrls` instead when you already have a specific Marketplace search link (a sub-category, a saved filter) you want scanned exactly as-is; those rows carry `cityQueried: null` since they bypass the city fan-out entirely.

**Scope precision:** `centerLatitude`, `centerLongitude` and `radiusKm` re-point a search to an exact coordinate and catchment radius (1–500 km), overriding whatever center Facebook's own city page would otherwise use. Every row then gets a `distanceKm` computed from that same center, so you can rank or cut off results by proximity instead of by city boundary alone.

**Volume controls:** `maxListingsPerArea` caps how many listings each city or URL contributes (`0` removes the cap entirely), which matters because the Actor paginates Facebook's cursor-based feed 24 listings at a time per area until that cap or Facebook's own result set is exhausted. `fullDetail` trades speed for completeness — off returns fast search-snippet rows, on visits each listing page for description, attributes and exact coordinates.

Three real examples:

```json
{
  "cities": ["seattle", "portland", "tacoma"],
  "searchQuery": "electric bike",
  "radiusKm": 25,
  "maxListingsPerArea": 40
}
```

```json
{
  "cities": ["seattle"],
  "searchQuery": "sofa",
  "centerLatitude": 47.5301,
  "centerLongitude": -122.0326,
  "radiusKm": 15,
  "fullDetail": true
}
```

```json
{
  "areaSearchUrls": ["https://www.facebook.com/marketplace/108479165840750/search/?query=bike"],
  "includeAreaSummary": true,
  "maxListingsPerArea": 0
}
```

### ▶️ Want to try other Facebook scrapers?

| Scraper Name | What it extracts |
| --- | --- |
| Facebook Groups Search Scraper With Group Profile Details | Finds Facebook Groups by keyword and returns group profile details |
| Facebook Page Posts & Comments Scraper | Facebook Page posts plus their full comment threads |
| Facebook User Search Scraper: Related Profiles & Pages | Searches Facebook by name/keyword and returns related profiles, pages and groups |
| Facebook Ads Library Scraper: Creative & Ad Text Details | Competitor ad creatives and ad text from the Facebook Ads Library |
| eBay Scraper By Buyer Interest & Seller Feedback | eBay listings screened for buyer-interest signals and seller feedback |
| Zillow Search Scraper: Investment Analyzer | Zillow property search results with rental-yield/investment analysis |

### How to extract Facebook Marketplace data programmatically

Every Apify Actor run is a standard REST call: one endpoint, one Authorization header, structured JSON back — no scraping code, browser, or proxy management on your side.

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient("<APIFY_API_TOKEN>")

run = client.actor("SimpleAPI/facebook-marketplace-listing-location-details-scraper").call(
    run_input={
        "cities": ["seattle", "portland"],
        "searchQuery": "bike",
        "radiusKm": 40,
        "includeAreaSummary": True,
    }
)

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["listingTitle"], item["city"], item["distanceKm"])
```

#### MCP for AI agents

Apify exposes every Actor, including this one, through its Actors MCP Server, so an AI agent can call it as a tool instead of a REST client:

```
npx -y @apify/actors-mcp-server --actors SimpleAPI/facebook-marketplace-listing-location-details-scraper
```

A location-planning agent can use this to answer "what's listed for sale within 20 km of this address" by passing `centerLatitude`/`centerLongitude`/`radiusKm` straight through as tool arguments. Compatible with Claude Desktop, Claude Code, Cursor, and any other MCP-compatible client.

#### Export to spreadsheets or CRM

Every run's dataset has a built-in CSV/Excel export in the Apify Console, or you can pull it via the dataset API with `format=csv`. Map `listingTitle` to a "Product" column, `listingPrice.amount` to "Price", `city`/`state`/`region` to territory columns, and `distanceKm` to a "Distance" column for a ready-to-import sheet in Google Sheets, Airtable, or any CRM with a CSV importer.

### Is it legal to scrape Facebook Marketplace?

Yes — scraping publicly available Facebook Marketplace listings (no login required to view them) for business or research use is generally permitted, and this Actor never accesses private, login-gated, or password-protected content. Marketplace listings exist to be found by buyers, so the data itself is public by design; the sensitivity here comes from the fact that a seller is often a private individual, not a registered business, and fields such as `marketplace_listing_seller` or a listing's coordinates can constitute personal data under GDPR/CCPA once you store and reuse it at scale. Treat any seller-identifying fields you keep with the same care as other personal data: have a lawful basis for storing it, and avoid republishing it. Consult legal counsel for commercial applications involving bulk storage of personal data.

### ❓ FAQ

#### What happens when a listing is sold or removed?

The dataset reflects listings as they existed on Facebook at request time — it doesn't retroactively update. In `fullDetail` mode, each row carries `isSold`, `isPending`, `isLive` and `isHidden` booleans straight from Facebook, so you can filter out anything already marked sold or hidden; if a listing has been fully removed since your last run, re-running the same cities/URLs is the only way to confirm it's gone.

#### Can I get price and condition data along with the location fields?

Yes. Every row includes `listingPrice` (or `listing_price` in fast mode), `strikethroughPrice`, and `condition` alongside the location columns — there's no separate mode you need to enable; `fullDetail` just adds richer attribute and description data on top.

#### How accurate is the location data?

The Actor returns exactly what Facebook has stored for that listing: the seller's own location, Facebook's reverse-geocoded city/state/region, and a `distanceKm` calculated from your search center. Accuracy depends on how precisely the seller set their location on Facebook — treat `distanceKm` as a filter, not a guarantee, and re-verify individual listings before acting on anything distance-sensitive.

#### How many listings can I get per run?

That's controlled by `maxListingsPerArea`, applied per city or URL — set it to `0` to remove the cap and collect everything Facebook returns for that search, or leave it at the default of 50 to keep runs quick. There's no separate actor-wide cap: a run across five cities with `maxListingsPerArea: 100` can return up to 500 listings, plus optional `area_summary` rows.

#### How do I target an exact coordinate and radius instead of a whole city?

Set `centerLatitude`, `centerLongitude` and `radiusKm` (1–500 km). This overrides the search center Facebook's own city page would otherwise use, and every returned row gets a `distanceKm` measured from that same coordinate, so you can filter results down to an exact catchment area.

#### Does Facebook Marketplace : Listing Location Details Scraper work with Claude, ChatGPT, and AI agent frameworks?

Yes. It's reachable through Apify's Actors MCP Server for MCP-compatible clients (Claude Desktop, Claude Code, Cursor), and it's callable as a standard HTTP API endpoint by any agent framework that can make a REST call and read JSON back.

#### How does this compare to other Facebook Marketplace scrapers?

Most Marketplace scrapers return the listing fields Facebook already shows in search — title, price, photo, URL. This Actor adds a location layer on top: coordinate-and-radius targeting that overrides a city's default center, multi-city fan-out in a single run, flat `latitude`/`longitude`/`city`/`state`/`region` columns instead of a nested location object, a computed `distanceKm` per row, and optional per-city price/count aggregates — built for territory comparison rather than single-listing lookup.

#### Can I use this without a Facebook API key or developer account?

Yes. No Facebook login, API key, or developer account is required — the Actor collects public listings logged-out over a residential proxy. You only need an Apify account to run it and read the dataset.

#### Can I scan multiple cities in one run?

Yes — pass a `cities` array and the Actor runs one independent search per city, tagging every row with the `cityQueried` value so a multi-city dataset stays sortable by territory. You can mix `cities` with `areaSearchUrls` in the same run if you also want to scan specific pinned search links.

### Conclusion

Facebook Marketplace : Listing Location Details Scraper turns a Facebook Marketplace keyword search into a structured, location-tagged dataset — coordinates, city/state/region, distance from your search center, and the price/condition fields that make each listing actionable. It's built for anyone who needs to compare a catalogue by territory rather than read it listing by listing: resellers sourcing by metro, agencies benchmarking markets for clients, and researchers mapping price and density across regions. No Facebook login is required, and every field is documented against the Actor's real output schema, so downstream pipelines don't break when Facebook changes its page layout. Open the Actor on Apify, add your cities and search term, and start your first run.

# Actor input Schema

## `cities` (type: `array`):

One search per city. Accepts city names/slugs (e.g. "Seattle", "Los Angeles") or full Marketplace URLs. Combined with the search term below. Every row is tagged with the exact cityQueried value. Example: \["seattle", "portland"].

## `searchQuery` (type: `string`):

Keyword searched in each city above (e.g. "bike", "iphone", "sofa"). Ignored for entries in Cities that are already full Marketplace URLs. Example: searchQuery="bike" + cities=\["seattle"] scans bikes in Seattle.

## `centerLatitude` (type: `number`):

Re-point every search to this latitude (overrides the city page's own center). Pair with Center longitude + Radius. Also drives the per-row distanceKm. Example: 47.6062 (Seattle). Leave empty to use each city's default center.

## `centerLongitude` (type: `number`):

Re-point every search to this longitude (overrides the city page's own center). Pair with Center latitude + Radius. Example: -122.3321 (Seattle). Leave empty to use each city's default center.

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

How far around the center to include listings, in kilometres. Applied to every search. Example: 40 = a 40 km catchment. Default is the page/FB default when empty.

## `includeAreaSummary` (type: `boolean`):

When on, appends one aggregate row per city (type="area\_summary") with listingCount, avgPrice, minPrice and maxPrice. Great for comparing market density and pricing across territories. Default is false.

## `maxListingsPerArea` (type: `integer`):

Cap on listings collected per city/URL; 0 = everything FB returns. Accepts the base `count` too. Example: 30 keeps runs quick. Default is 50.

## `fullDetail` (type: `boolean`):

ON: visits each listing page for descriptions, attributes and exact coordinates (richer, slower). OFF: fast search-snippet rows. Accepts the base `deepScrape` too. Default is ON.

## `areaSearchUrls` (type: `array`):

Optional power-user input. Drop in ready-made Facebook Marketplace search URLs to scan exact territories directly, instead of (or alongside) the Cities fan-out above. Each pasted URL becomes its own area and its rows carry cityQueried=null. The base `urls` field is still accepted for backward compatibility. Example: https://www.facebook.com/marketplace/108479165840750/search/?query=bike

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

Apify Proxy preferences. This actor always runs on residential IPs for reliability; region hints here are honoured where possible.

## Actor input object example

```json
{
  "cities": [
    "seattle",
    "portland"
  ],
  "searchQuery": "bike",
  "radiusKm": 40,
  "includeAreaSummary": false,
  "maxListingsPerArea": 50,
  "fullDetail": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

All scraped items in the Actor's default dataset.

# 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 = {
    "cities": [
        "seattle",
        "portland"
    ],
    "searchQuery": "bike",
    "radiusKm": 40,
    "maxListingsPerArea": 50,
    "fullDetail": true,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("simpleapi/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 = {
    "cities": [
        "seattle",
        "portland",
    ],
    "searchQuery": "bike",
    "radiusKm": 40,
    "maxListingsPerArea": 50,
    "fullDetail": True,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("simpleapi/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 '{
  "cities": [
    "seattle",
    "portland"
  ],
  "searchQuery": "bike",
  "radiusKm": 40,
  "maxListingsPerArea": 50,
  "fullDetail": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call simpleapi/facebook-marketplace-scraper --silent --output-dataset

```

## MCP server setup

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