# Facebook Marketplace Scraper - No Login (`leadproof/facebook-marketplace`) Actor

Scrape Facebook Marketplace listings by keyword and city, or from any Marketplace URL. No login, no cookies. Price, title, location, photo, listing date, and optional description, all photos, condition and coordinates. Pay per listing.

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

## Pricing

from $0.70 / 1,000 listings

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

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

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Facebook Marketplace Scraper - No Login

Collect Facebook Marketplace listings as clean, structured data. Search by keyword in any city, or paste any Marketplace search, category or city URL. No Facebook account, no cookies, nothing to paste but a keyword. One row per listing with title, price, currency, location, main photo, listing date and link, and optionally the full description, every photo, the condition and the coordinates.

You pay per listing returned.

### Why this scraper

- **No login, no cookies.** The actor reads Marketplace the way a logged-out visitor's browser does, so there is no account to get banned and nothing sensitive to hand over.
- **Real feed, not screenshots of the page.** Listings come from Marketplace's own data feed, and the actor keeps paging it the way the web app does when you scroll.
- **Filters that Facebook applies itself.** Price range, listed within, condition and radius are passed to Marketplace, so you are not charged for rows that would be filtered out afterwards.
- **Results that match your keywords on every page.** Facebook's logged-out feed keeps the keyword across pages only in best-match order, so the actor always collects best-match listings and then sorts them by date or price when you pick a sort.
- **Any Marketplace URL.** Searches, categories (`/marketplace/la/vehicles/`) and city pages all work, with the filters you set in the browser.
- **Optional details.** Turn on **Include listing details** for description, all photos, condition, coordinates and shipping.
- **Cost control.** Only the HTML is loaded, never images, video or the script bundle, so proxy traffic is spent on data. Your spending limit is respected: the actor never writes more listings than it is allowed to charge.
- **No personal data about sellers.** Facebook does not show the seller to logged-out visitors, and the actor does not try to get it.

### How to use

1. Enter one or more **Search keywords** (for example `iphone 15`, `sofa`).
2. Enter one or more **Locations**: the city as it appears in the Marketplace URL, such as `nyc`, `la`, `london`, `telaviv`, or the numeric location ID from that URL. Each keyword is searched in every location.
3. Or paste Marketplace URLs into **Marketplace URLs** instead.
4. Set **Max listings per search**.
5. Optionally set the filters and turn on **Include listing details**.
6. Run. Results land in the default dataset, ready to export as JSON, CSV or Excel.

To find a city's name, open Marketplace in your browser, pick the location, and copy the part after `/marketplace/` in the address bar.

### Input example

```json
{
  "searchQueries": ["iphone 15", "macbook"],
  "locations": ["nyc", "la"],
  "maxItems": 100,
  "minPrice": 200,
  "maxPrice": 900,
  "daysSinceListed": "7",
  "sortBy": "newest",
  "itemCondition": ["new", "used_like_new"],
  "includeDetails": true
}
```

A URL-only run:

```json
{
  "startUrls": [{ "url": "https://www.facebook.com/marketplace/telaviv/vehicles/" }],
  "maxItems": 50
}
```

### Output

One dataset item per listing:

| Field | Meaning |
|---|---|
| `listing_id` | Facebook's listing ID |
| `listing_url` | Link to the listing |
| `title` | Listing title |
| `price` | Price as a number, `0` for free items |
| `price_formatted` | Price as shown, for example `$250` or `FREE` |
| `currency` | ISO code, for example `USD`, `ILS` |
| `original_price` | Earlier price when the seller marked it down |
| `location_name` | City in English, for example `Brooklyn, New York` |
| `city`, `state` | City and state as Facebook writes them locally |
| `location_id` | Facebook's ID for the city |
| `listed_at` | When the listing was posted, UTC ISO 8601 |
| `primary_image` | URL of the main photo |
| `has_video` | `yes` / `no` |
| `category_id` | Marketplace category ID |
| `delivery_types` | For example `IN_PERSON`, `SHIPPING` |
| `is_sold`, `is_pending` | Listing status |
| `search_query`, `search_location`, `search_url` | The search that found the listing |
| `scraped_date` | When the row was collected |

With **Include listing details**:

| Field | Meaning |
|---|---|
| `description` | Full description |
| `images` | URLs of all photos |
| `condition` | For example `Used - like new` |
| `latitude`, `longitude` | Approximate location of the listing |
| `location_text` | Location line shown on the listing |
| `shipping_offered` | Seller offers shipping |
| `details_status` | `ok`, or `unavailable` when the item page could not be read (the row is still returned) |

A listing found by two searches is returned once, for the first search. A run summary is saved to the key-value store under `STATS`: searches run, readable, blocked and partial, feed pages read, listings saved, duplicates skipped and details fetched.

### Limits

- Facebook decides how deep a logged-out feed goes. The actor stops when the feed ends or Facebook stops returning pages, and marks the search as partial in `STATS` when it was cut short.
- Photo URLs are signed by Facebook and expire after some days. Download them soon if you need to keep them.
- `/marketplace/category/<name>` URLs without a city use a location Facebook picks from the proxy IP. Use `/marketplace/<city>/<category>/` for a specific place.
- Seller names and contact details are not available logged-out.

### Pricing

Pay per event, no subscription:

| Event | Price |
|---|---|
| Listing returned | $1.00 per 1,000 (down to $0.70 per 1,000 on higher Apify plans) |
| Listing details (description, all photos, condition, coordinates) | $2.00 per 1,000, only for rows whose item page was read |
| Actor start | $0.005 per GB of memory (default 2 GB) |

Example: 1,000 listings without details cost about $1.01; with details about $3.01. Details use more proxy traffic per row, so leave them off when you only need price, title and location. Set a maximum charge on the run and the actor stops before it.

### Fair use

The actor reads only what Facebook shows any logged-out visitor, collects no seller identity, and paces its requests. You are responsible for how you use the data, including local privacy law and Facebook's terms.

### Related actors

- [Facebook Posts Scraper](https://apify.com/leadproof/facebook-posts) - public Page posts, no login
- [Google Maps Scraper](https://apify.com/leadproof/google-maps-scraper) - businesses by keyword and location
- [Google Maps Verified Leads](https://apify.com/leadproof/google-maps-verified-leads) - businesses with verified emails

Built by [LeadProof](https://leadproof.co).

# Actor input Schema

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

What to search for, one keyword or phrase per line (for example "iphone 15" or "sofa"). Each keyword is searched in every location below. Leave empty to scrape the newest listings of each location.

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

Marketplace locations, one per line: the city name exactly as it appears in the Marketplace URL (facebook.com/marketplace/<b>nyc</b>, <b>la</b>, <b>london</b>, <b>telaviv</b>) or the numeric location ID from that URL. Defaults to nyc when keywords are set.

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

Optional. Paste Marketplace search, category or city URLs straight from your browser, with any filters already applied (for example https://www.facebook.com/marketplace/telaviv/vehicles/). Filters set below are not added to these URLs.

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

How many listings to collect for each keyword-and-location pair and each URL. You are charged per listing returned. Facebook may end a feed earlier.

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

Also open each listing to add its description, all photos, condition, exact coordinates, location text and currency. Slower and uses more proxy traffic.

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

Optional. In the local currency of the location.

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

Optional. In the local currency of the location.

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

Only listings posted in this period.

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

Order of the results. Facebook picks the most relevant listings for your keywords; the actor then orders them by date or price.

## `itemCondition` (type: `array`):

Optional. Keep only these conditions. Empty means any condition.

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

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

## `countryCode` (type: `string`):

Two-letter country code for the residential proxy exit. The location in the search decides which listings you get; a matching country is optional but can help.

## `proxy` (type: `string`):

RESIDENTIAL is the reliable choice for Facebook. DATACENTER is cheaper but is usually sent to the login page. NONE runs without a proxy.

## `delayMs` (type: `integer`):

Pause between feed pages and item pages, plus a small random jitter.

## `navTimeoutMs` (type: `integer`):

How long one page load may take before it is retried.

## `keepDebugHtml` (type: `boolean`):

Stores the first search page's HTML in the key-value store for troubleshooting.

## Actor input object example

```json
{
  "searchQueries": [
    "iphone"
  ],
  "locations": [
    "nyc"
  ],
  "maxItems": 20,
  "includeDetails": false,
  "daysSinceListed": "",
  "sortBy": "best_match",
  "countryCode": "US",
  "proxy": "RESIDENTIAL",
  "delayMs": 1500,
  "navTimeoutMs": 45000,
  "keepDebugHtml": false
}
```

# Actor output Schema

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

One item per listing, table view.

## `listingsCsv` (type: `string`):

All listing fields as CSV.

## `stats` (type: `string`):

Searches run, readable, blocked and partial, feed pages read, listings saved, duplicates skipped, and details fetched.

# 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": [
        "iphone"
    ],
    "locations": [
        "nyc"
    ],
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("leadproof/facebook-marketplace").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": ["iphone"],
    "locations": ["nyc"],
    "maxItems": 20,
}

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

```

## MCP server setup

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

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/U2aR9mhqvxZeJHGs8/builds/8d2LBewIxc2TnYH1s/openapi.json
