# Facebook Marketplace Search API - Real-Time Listings by City (`topapi/facebook-marketplace-search-api`) Actor

Search Facebook Marketplace by keyword or category around any city in one HTTP request and get the listings back: title, price, original price, place, photo, category, date listed, sold status. Optional details: description, all photos, condition, vehicle and property data. No login. MCP ready.

- **URL**: https://apify.com/topapi/facebook-marketplace-search-api.md
- **Developed by:** [Top Api](https://apify.com/topapi) (community)
- **Categories:** E-commerce, Social media, Real estate
- **Features:** Limited permissions, Multi-tenant, Server interface
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.40 / 1,000 listing scrapeds

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 Search API** searches Facebook Marketplace by keyword or category around a city in **one HTTP
request** and returns the listings in the response: no run to start, no dataset to fetch. It is an Apify **Server
Actor**, so it also works as a **tool for AI agents (MCP)** and as one **HTTP Request** step in n8n, Make or Zapier.

Each listing carries its title, price and original (struck-through) price, currency, city and state, photo, category,
date listed, sold and pending flags and delivery types, plus Facebook's own raw listing fields. Filter by price,
condition, days since listed and words, sort by newest, price or distance, and add the **listing details** (full
description, every photo, condition and attributes, exact coordinates, vehicle and property data) when you need them.
**You pay per listing returned**; a search that returns nothing costs nothing.

### ✨ What you get

- 🏷️ **Listing**: id, URL, title, price, formatted price, currency, original price and discount %
- 📍 **Place**: city, state, Facebook city page id (exact coordinates and distance with details)
- 🖼️ **Photo**: the main photo URL (every photo with details)
- 🗂️ **Category**: id and name; **date listed** (ISO) and hours since listed
- ✅ **Status**: sold, pending, delivery types (in person, shipping), video flag, eBay partner flag
- 🔎 **Details add-on**: description, all photos, condition, attributes, coordinates, distance from your search point,
  vehicle block (year, make, model, trim, mileage, transmission, fuel, colours, title status, owners, VIN when shown)
  and property block (type, beds, baths, address, walk / transit / bike scores)
- 🧭 **Filters**: price range, condition, sort order, days since listed, words to require or exclude, radius
- 📄 **Paging**: `meta.nextCursor` reads the next listings of the same search, without skipping any
- 🔑 No Facebook account, no cookies, no API key of yours (only your Apify token)

### 🚀 How to call it

Every request needs your **Apify API token** in the `Authorization` header.

#### GET

```bash
curl "https://topapi--facebook-marketplace-search-api.apify.actor/search?query=desk&location=Austin,%20TX&maxListings=20" \
  -H "Authorization: Bearer <YOUR_APIFY_TOKEN>"
```

#### POST

```bash
curl -X POST "https://topapi--facebook-marketplace-search-api.apify.actor/search" \
  -H "Authorization: Bearer <YOUR_APIFY_TOKEN>" -H "Content-Type: application/json" \
  -d '{"query": "road bike", "location": "Denver, CO", "minPrice": 200, "maxPrice": 900, "sortBy": "newest", "maxListings": 30}'
```

#### Python

```python
import requests

URL = "https://topapi--facebook-marketplace-search-api.apify.actor/search"
HEADERS = {"Authorization": "Bearer <YOUR_APIFY_TOKEN>"}
params = {"query": "couch", "location": "Houston, TX", "maxListings": 50, "sortBy": "newest"}
listings = []
for _ in range(3):                       # three requests = up to 150 listings
    r = requests.get(URL, params=params, headers=HEADERS, timeout=180)
    data = r.json()
    if r.status_code != 200:
        print(r.status_code, data["error"]["type"]); break
    listings += data["items"]
    if not data["meta"]["nextCursor"]:
        break
    params["cursor"] = data["meta"]["nextCursor"]
print(len(listings), "listings")
```

#### JavaScript

```javascript
const res = await fetch(
    'https://topapi--facebook-marketplace-search-api.apify.actor/search?query=kayak&location=Seattle,%20WA&maxListings=10',
    { headers: { Authorization: `Bearer ${process.env.APIFY_TOKEN}` } },
);
const { items, meta } = await res.json();
console.log(items.length, items[0]?.title, items[0]?.price, meta.nextCursor);
```

#### n8n, Make, Zapier

One **HTTP Request** step: method `GET`, URL `https://topapi--facebook-marketplace-search-api.apify.actor/search`,
query parameters `query`, `location` and `maxListings`, header `Authorization` = `Bearer <YOUR_APIFY_TOKEN>`. The
listings are `items`.

#### AI agents (MCP)

MCP server URL: `https://topapi--facebook-marketplace-search-api.apify.actor/mcp` (Streamable HTTP, header
`Authorization: Bearer <YOUR_APIFY_TOKEN>`). Tool: `search_listings`, same parameters as the HTTP endpoint. Use
`compact: true` to give the model only the core fields.

### ⚙️ Parameters

| Parameter | Type | Default | What it does |
|---|---|---|---|
| `query` | string | | What to search for, as typed into Marketplace's search box. Also accepted as `q`, `keyword`, `searchQuery`, `search`, `term`. |
| `location` | string | required | A city (`Austin, TX`, `London, UK`), a US postal code (`78701`), a Marketplace location slug (`nyc`) or `lat,lng`. Also `city`, `place`, `near`, `where`. Not needed when `url` carries a location. |
| `category` | string | | Search inside a category, or browse it without a query: `vehicles`, `propertyrentals`, `propertyforsale`, `electronics`, `home`, `home-improvements`, `garden`, `apparel`, `family`, `toys`, `sports`, `hobbies`, `instruments`, `entertainment`, `office-supplies`, `pets`, `classifieds`, `free`. |
| `url` | string | | A `facebook.com/marketplace/...` search or category URL copied from your browser; its query, location and filters are used (parameters you also send override them). |
| `maxListings` | integer | `20` | Listings to return, 1-50. Also `limit`, `maxItems`, `maxResults`, `count`. |
| `minPrice`, `maxPrice` | number | | Price range in the listing currency (whole units). `maxPrice=0` = free items. |
| `condition` | list | | One or more of `new`, `used_like_new`, `used_good`, `used_fair` (comma-separated in a query string). |
| `sortBy` | string | `best_match` | `best_match`, `newest`, `price_asc`, `price_desc`, `distance`. |
| `daysSinceListed` | integer | | Only listings posted in the last N days (1-30). |
| `radiusKm` | number | | Search radius in km. Enforced exactly with `includeListingDetails` (see Limits). |
| `mustContainQuery` | boolean | `false` | Only listings whose title contains every word of the query. |
| `excludeKeywords` | string | | Comma-separated words: drop listings whose title (and, with details, description) contains any of them. |
| `includeListingDetails` | boolean | `false` | Add the listing page: description, all photos, condition, attributes, coordinates, vehicle and property data. Also `includeDetails`, `details`. |
| `compact` | boolean | `false` | Core fields only, for AI agents. |
| `cursor` | string | | The previous response's `meta.nextCursor`, sent with the same query, location and filters, to read further. |

You need `query`, `category` or `url`, and a place (`location`, or a `url` that names one). `GET /` lists the
endpoints; the **Server** tab in Console shows the OpenAPI description.

### 📦 Response

A real listing from a `desk` search around Austin, TX (2026-11-18, `maxListings=3`), trimmed (the photo URL is
shortened):

```json
{
  "ok": true,
  "count": 3,
  "items": [{
    "id": "1007782909017977",
    "listingUrl": "https://www.facebook.com/marketplace/item/1007782909017977/",
    "title": "Wooden Desk",
    "price": 60,
    "priceFormatted": "$60",
    "currency": "USD",
    "originalPrice": 75,
    "discountPct": 20,
    "city": "Austin",
    "state": "TX",
    "cityPageId": "106224666074625",
    "photoUrl": "https://scontent-iad3-1.xx.fbcdn.net/v/t39.84726-6/802505119_1072954382195186_...jpg?...",
    "categoryName": "Furniture",
    "listedAt": "2026-09-10T19:20:52.000Z",
    "listedHoursAgo": 1654.7,
    "isSold": false,
    "isPending": false,
    "deliveryTypes": ["IN_PERSON", "DOOR_PICKUP"],
    "searchQuery": "desk",
    "searchLocation": "Austin, Texas",
    "detailsFetched": false,
    "listing_price": { "formatted_amount": "$60", "amount_with_offset_in_currency": "6000", "amount": "60.00" },
    "strikethrough_price": { "formatted_amount": "$75", "amount": "75.00" },
    "location": { "reverse_geocode": { "city": "Austin", "state": "TX", "city_page": { "display_name": "Austin, Texas", "id": "106224666074625" } } },
    "creation_time": 1789068052
  }],
  "meta": { "query": "desk", "category": null, "location": { "name": "Austin, Texas", "latitude": 30.2677, "longitude": -97.7475 }, "sortBy": "best_match", "pages": 1, "filtered": {}, "stopReason": "max_listings", "nextCursor": "eyJ2IjoxLCJjIjpu...", "charged": { "listing": 3 }, "ms": 1532 }
}
```

With `includeListingDetails=true` the same row also carries `description`, `photoUrls` / `photoCount`, `condition`,
`attributes`, `latitude` / `longitude`, `distanceKm` (from your search point), `postalCode` / `countryCode` (vehicles
and property), `vehicle` or `property`, the listing page's raw fields and `details_status`. A real one from a
`road bike` search around Seattle: `"condition": "Used - Good"`, `"photoCount": 7`, `"latitude": 46.321105957031`,
`"distanceKm": 226.7`, `"attributes": [{"name": "Condition", "value": "Used - Good"}, {"name": "Brand", "value": "unbranded"}]`.

| Field | Filled (219 listings from 12 search pages, 2026-11-18) |
|---|---|
| `id`, `listingUrl`, `title`, `price`, `priceFormatted`, `currency`, `city`, `photoUrl`, `categoryId`, `categoryName`, `listedAt`, `deliveryTypes`, Facebook's raw keys | 100% |
| `state` | 100% of US listings (Facebook sends none for UK listings) |
| `originalPrice`, `discountPct` | 31% (listings with a struck-through price) |
| `subtitles` | 6% |
| With details (7 listing pages): `latitude`, `longitude`, `distanceKm`, `condition`, `photoUrls` | 100% |
| With details: `description` | 86% |
| With details, vehicles: `vehicle.year`, `make`, `model`, `mileage` | 3 of 3 vehicle listings |

### 🧾 Status codes (and what is charged)

| HTTP | `error.type` | Meaning | Charged |
|---|---|---|---|
| `200` | | Listings returned | `listing` per listing, `listing-details` per listing with details |
| `400` | `invalid-input` | A missing or bad parameter (no place, no query / category / url, unknown category, bad cursor) | No |
| `400` | `location-not-found` | Facebook's location search does not know the place: use `City, State`, a US postal code or `lat,lng` | No |
| `404` | `no-listings` | Marketplace shows no listings for the search, or none passed your filters. `error.meta` shows what was read and filtered | No |
| `410` | `cursor-expired` | Facebook no longer accepts that cursor: search again without it | No |
| `429` | `too-many-requests` | More than 4 of your requests in flight at once | No |
| `503` | `blocked`, `timeout` | Facebook refused or did not answer; retry | No |

### 💰 Pricing

| Event | Price |
|---|---|
| Listing returned (`listing`) | **$0.0004** ($0.40 per 1,000) |
| Listing details add-on (`listing-details`) | $0.0008 per listing that receives details |

No start fee. A 20-listing search costs $0.008; with details $0.024. Nothing is charged for `4xx` or `503` answers, and
a listing whose details could not be read comes back without them and without the add-on charge.

### 🗃️ Batch runs (input interface)

You can also start the actor as a normal run with a list of keywords, categories, places and listing URLs: monitor mode
with price-drop alerts, thousands of listings per search, and one dataset row per listing, exactly like a batch
scraper. Use the HTTP endpoint for one search at a time.

### ⏱️ Speed (measured on Apify, 2026-11-18)

- 5 listings: 0.7-1.4 s; 20 listings: 1.2-3.7 s; 50 listings: 1.7-2.2 s (back-to-back requests)
- First request after a quiet spell: 2.7-11 s while the server starts
- 10 listings with details: 5.5-9.6 s; 50 with details: 22-27 s (two reads per listing, 4 at a time)
- 4 searches of 50 listings with details sent at once: all answered, 27-39 s each

### ⚠️ Limits

- **Radius.** Signed-out Facebook shows listings from roughly 65 km around the place whatever radius is asked (newest
  first goes wider). `radiusKm` is enforced exactly only with `includeListingDetails`, because only the listing page
  gives the coordinates; without details it is passed to Facebook and the response says so in `meta.warnings`.
- **No seller.** Facebook does not show the seller's name or profile to signed-out visitors on any Marketplace page,
  so no row carries one. eBay partner listings carry the eBay seller in `partner` (with details).
- **Details are a separate read per listing**, so a 50-listing request with details takes longer (see Speed).
- **Location names** go through Facebook's own location search: `City, ST` and US postal codes work; for non-US postal
  codes use `lat,lng`.
- **Photo URLs** are signed Facebook CDN links that expire after a few days.
- 50 listings per request; page further with the cursor. Facebook's first page holds about 15 listings and later pages
  24, so a request reads one page per 15-24 listings.
- Marketplace's order is live: between two paged requests new listings can appear, so a cursor continues where the
  last page left off, not from a frozen snapshot.

### ❓ FAQ

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

No. The actor uses Marketplace the way a signed-out visitor does. You only need your Apify token.

#### What does a search cost?

$0.0004 per listing returned: 20 listings = $0.008, 50 listings = $0.02. With `includeListingDetails`, add $0.0008
per listing that gets details. A search that returns nothing is free.

#### How do I get more than 50 listings?

Repeat the request with `cursor` set to the previous response's `meta.nextCursor` (same query, place and filters).
The next request starts at the first listing the previous one did not return.

#### Which places work?

Any place Facebook's location search knows: `Austin, TX`, `Toronto, ON`, `London, UK`, `Sydney, NSW`, a US postal
code, a Marketplace slug like `nyc` or `la`, or coordinates as `lat,lng`.

#### Can I browse a category without a keyword?

Yes: `category=vehicles&location=Chicago, IL` returns the category feed around Chicago. `category=free` returns free
items.

#### Can I paste a Marketplace URL?

Yes. Build the search in your browser (place, query, price, sort), copy the address bar into `url`, and the actor uses
its filters.

#### Does it return the seller?

No. Facebook does not show sellers to signed-out visitors (see Limits).

#### How do I get only new listings?

`sortBy=newest` with `daysSinceListed=1` (or 7). For a schedule that returns only listings you have not seen and price
drops, use a batch run with monitor mode.

#### How do I use it from an AI agent?

Point an MCP client at `https://topapi--facebook-marketplace-search-api.apify.actor/mcp` with your Apify token, or add
it through `mcp.apify.com`. The tool is `search_listings`; `compact: true` keeps answers short.

#### How do I use it in n8n or Make?

One HTTP Request step with `query`, `location` and your token in the `Authorization` header.

#### What if Facebook refuses a request?

You get a `503` and pay nothing. The actor already retries on fresh connections, so a retry a moment later usually
works.

#### Your feedback

Open an issue on the actor page with the request you sent and the response you got.

# Actor input Schema

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

What to search for on Marketplace, one per line, e.g. "bike", "iphone 15", "honda civic". Leave empty to browse the categories below instead. Facebook's search is fuzzy: turn on 'Only listings that contain the keyword' for strict results.

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

City, "City, State", postal code or "lat,lng", e.g. "Austin, TX", "London, UK", "90210", "40.71,-74.00". Several places: separate with ; ("Austin, TX; Dallas, TX"). Empty = New York, NY.

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

Search radius around the location in km (Facebook's own filter; for visitors Facebook treats it as a hint, ~65 km). With 'Include listing details' on, listings farther than this are removed. Empty = Facebook's default.

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

Marketplace categories. Without keywords, each category is browsed; with keywords, each keyword is searched inside each category. Leave empty for all categories.

## `listingUrls` (type: `array`):

Marketplace listing URLs or ids (e.g. https://www.facebook.com/marketplace/item/1720207995949881/ or 1720207995949881), or a Marketplace search/category URL copied from your browser, which keeps its own filters (e.g. https://www.facebook.com/marketplace/la/search?query=sofa\&maxPrice=300).

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

Only listings priced at or above this amount, e.g. 50. Empty = no minimum.

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

Only listings priced at or below this amount, e.g. 500. 0 = free items only. Empty = no maximum.

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

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

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

"Newest first" is the one for monitoring new listings (Facebook widens the area a little for it). "Distance" keeps results closest to the location.

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

Only listings posted within this window (Facebook's own filter; every row also carries listedAt). Pairs well with a daily schedule.

## `mustContainQuery` (type: `boolean`):

Keep only listings whose title contains every word of the keyword (case-insensitive). Facebook also returns related items ("bike" finds bike racks and helmets); this makes results strict.

## `excludeKeywords` (type: `string`):

Drop listings whose title (and description, when details are on) contains any of these words, comma-separated, e.g. "parts, broken, wanted, rent". Leave empty for no exclusions.

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

Adds the full description, every photo, condition and attributes, exact coordinates and distance, postal code, shipping flag, vehicle data (year, make, model, mileage, transmission, fuel, colours, title status, owners) and property data (type, beds, baths, address, walk/transit scores).

## `monitorMode` (type: `boolean`):

Remembers every listing per search (in the named store below) and returns only listings not delivered before, plus known listings whose price dropped (changeType PRICE_DROP with previousPrice and priceDelta). Pair with 'Newest first' and a schedule. A search that keeps finding new listings is checked on every run; one that finds a few an hour is checked about every 15 minutes, and a quiet one every 10 to 30 minutes, however often the run is scheduled.

## `monitorStoreName` (type: `string`):

Name of the key-value store that keeps what earlier runs delivered, e.g. "bikes-austin". Use one name per alert; change it to start over.

## `maxResultsPerQuery` (type: `integer`):

Cap per keyword x category x location. Facebook pages 24 listings per request and paged 734 for one search in testing. 0 = no cap (up to 5,000).

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

Cap for the whole run across all searches and listing URLs. 0 = no total cap.

## `compact` (type: `boolean`):

Core fields only (title, price, location, photo, date, category, details, monitor fields) - small rows for AI agents, MCP and spreadsheets.

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

Facebook serves Marketplace to residential IPs and redirects datacenter IPs to its login page, so residential is the default. Any other choice falls back to residential automatically when Facebook walls it.

## Actor input object example

```json
{
  "searchQueries": [
    "bike"
  ],
  "location": "New York, NY",
  "sortBy": "best_match",
  "daysSinceListed": "",
  "mustContainQuery": false,
  "includeListingDetails": false,
  "monitorMode": false,
  "monitorStoreName": "facebook-marketplace-monitor",
  "maxResultsPerQuery": 24,
  "maxItems": 0,
  "compact": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# Actor output Schema

## `listings` (type: `string`):

The dataset of Facebook Marketplace listings (one item per listing).

## `summary` (type: `string`):

Per-search counts (read, filtered, already delivered, price drops, delivered), pages, requests, sessions, egress and bytes transferred.

# 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": "New York, NY",
    "maxResultsPerQuery": 24
};

// Run the Actor and wait for it to finish
const run = await client.actor("topapi/facebook-marketplace-search-api").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": "New York, NY",
    "maxResultsPerQuery": 24,
}

# Run the Actor and wait for it to finish
run = client.actor("topapi/facebook-marketplace-search-api").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": "New York, NY",
  "maxResultsPerQuery": 24
}' |
apify call topapi/facebook-marketplace-search-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,topapi/facebook-marketplace-search-api"
        }
    }
}
```

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/oxoqoZnfRRk2sKjK5/builds/viIsO2W5pnxUBop1c/openapi.json
