# Facebook Marketplace - Israel Property Rentals & Sales (`swerve/fb-marketplace-scraper`) Actor

Scrape Facebook Marketplace property rentals and sales across Israeli cities. No login. Returns listing id, price (ILS), city, title, full description, image, and seller. Coverage comes from sweeping a grid of city coordinates.

- **URL**: https://apify.com/swerve/fb-marketplace-scraper.md
- **Developed by:** [Swerve](https://apify.com/swerve) (community)
- **Categories:** Real estate, Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 listings

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## 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 - Property Rentals & Sales

Scrape property listings (rentals or sales) from Facebook Marketplace, **with no login**. Pick the cities you want from a dropdown, across Israel and a curated set of international cities (USA, UK, Spain, Germany, France, Italy, Portugal, Canada). Returns the listing id, price, currency, city, title, full description, image, and seller for each listing.

### What you get per listing

| Field | Description |
| --- | --- |
| `id` | Facebook Marketplace listing id |
| `url` | Direct link: `https://www.facebook.com/marketplace/item/<id>` |
| `price` | Price as a number (no symbol), e.g. `6500`. See `currency` for the unit. |
| `currency` | ISO currency of the price: `ILS`, `USD`, `GBP`, `EUR`, or `CAD` |
| `locationText` | City name. Clean Hebrew name for Israeli cities (e.g. `תל אביב`); Marketplace location text for international cities (e.g. `Miami`). |
| `marketplace_listing_title` | Listing title |
| `description` | Full listing description (from the detail page) |
| `image` | Listing image URL |
| `seller` | `{ name }` (omitted when no seller name is found) |
| `dealType` | `RENT` or `BUY` |

### Input

| Field | Type | Default | Notes |
| --- | --- | --- | --- |
| `dealType` | `RENT` | `BUY` | `RENT` | `RENT` = Property Rentals, `BUY` = Property For Sale |
| `cities` | multi-select | 6 major Israeli cities | Pick cities from the dropdown. Each returns up to ~24 listings, so select more cities for wider coverage. |
| `radiusKm` | integer | `12` | Search radius around each city center, in km. Use 20-25 for the wider metro. |
| `maxPerCoord` | integer | `40` | Cards collected per city. Facebook serves at most ~24 to logged-out users. |
| `fetchDetails` | boolean | `true` | When on, opens each listing to read the full description. Slower; turn off for card-level data only. |
| `extraCoords` | array (advanced) | — | Search arbitrary points not in the dropdown: `{ label, lat, lng, radiusKm, countryCode, currency }`. |
| `proxyConfiguration` | proxy | Apify RESIDENTIAL | The actor automatically rides a proxy in each city's own country. |

Just click **Run** — the prefill scrapes Tel Aviv, Jerusalem, Haifa, Rishon LeZion, Netanya, and Be'er Sheva out of the box.

#### Picking cities

The **Cities** dropdown lists Israeli cities in Hebrew (תל אביב, ירושלים, חיפה, …) and international cities in English (London, UK; Madrid, Spain; Miami, USA; …). Select as many as you like; each is searched by its center coordinate. For a location not in the list, add it under **Advanced → Extra coordinates**, for example:

```json
[{ "label": "Valencia", "lat": 39.4699, "lng": -0.3763, "radiusKm": 12, "countryCode": "ES" }]
```

`countryCode` (ISO-2) picks the proxy country and the default currency; it defaults to `IL`.

### Example output

Israeli city (ILS):

```json
{
  "id": "1027001806649459",
  "url": "https://www.facebook.com/marketplace/item/1027001806649459",
  "price": 5000,
  "currency": "ILS",
  "locationText": "תל אביב - יפו",
  "marketplace_listing_title": "דירה להשכרה בגבעתיים",
  "description": "מפרסם את הדירה שלי בשלוש השנים האחרונות...",
  "image": "https://scontent.fsdv1-2.fna.fbcdn.net/v/t39.84726-6/...jpg",
  "dealType": "RENT"
}
```

International city (USD):

```json
{
  "id": "1689727542231621",
  "url": "https://www.facebook.com/marketplace/item/1689727542231621",
  "price": 2000,
  "currency": "USD",
  "locationText": "Miami Beach",
  "marketplace_listing_title": "1 Bed 1 Bath - Apartment",
  "description": "Bright 1 bedroom unit, walk to the beach...",
  "image": "https://scontent.fsdv1-2.fna.fbcdn.net/v/t39.84726-6/...jpg",
  "dealType": "RENT"
}
```

### How it works

Facebook Marketplace shows public listings to logged-out users, but only if you reach it the right way:

1. **Location via coordinates.** For logged-out users Facebook ignores your IP and the URL's place-id, and the on-page location picker triggers a login wall. The **only** way to set the search location is the `latitude` / `longitude` query params on the category URL. Each selected city is turned into one search URL at its center coordinate.
2. **Per-country proxy + language.** Selected cities are grouped by country, and each group is crawled over an Apify RESIDENTIAL proxy in that country (Israel for IL cities, US for US cities, and so on) with the matching `Accept-Language` header. This reduces anti-bot friction and returns the right locale and currency.
3. **Grid sweep, not infinite scroll.** Logged-out infinite scroll does **not** load more listings, so each city returns at most ~24 cards. Coverage comes from selecting more cities (or adding extra coordinates), not from scrolling.
4. **No-login detail enrichment.** The full description lives in the listing detail page's `og:description` meta tag, which is present even though a login prompt overlays the content. The actor reads `og:title`, `og:description`, and `og:image` per listing.
5. **Currency-aware prices.** The price symbol/word on the card and detail page (₪, $, £, €, C$, ILS/USD/GBP/EUR/CAD) is detected and emitted as the `currency` field alongside the numeric `price`. When no marker is present, the currency falls back to the city's country currency.

Each listing is deduped by id within the run.

### Limits and notes

- **~24 listings per city.** This is a Facebook limit for logged-out users, not an actor cap. Add more cities (or extra coordinates) to get more listings.
- **Mixed deal types.** The Property Rentals category sometimes surfaces a few sale-priced listings (and vice-versa); the `price` and `description` make these easy to filter downstream.
- **Some listings have no description.** A minority of listings ship an empty `og:description`; the card-level data (price, currency, city, title, image) is always kept.
- **Residential proxy required.** Datacenter IPs get a login wall. The actor uses Apify RESIDENTIAL proxy and picks each city's country automatically (the prefilled default).

### Use cases

- Real-estate lead generation and market monitoring, in Israel or any covered country.
- Feeding a property-alert pipeline (price, currency, city, rooms parsed from the description).
- Tracking new rental/sale supply per city over time, side by side across markets.

# Actor input Schema

## `dealType` (type: `string`):

RENT scrapes the Property Rentals category; BUY scrapes Property For Sale. Example: RENT.

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

Pick one or more cities to scrape. Each city is swept with a small grid of points (see 'Coverage points per city') to get past Facebook's ~24-per-search limit for logged-out users. Israeli cities are shown in Hebrew; international cities in English. Example: תל אביב + ירושלים, or London, UK + Madrid, Spain. Need a spot that isn't listed? Use 'Extra coordinates' under Advanced.

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

How far around each city center to search, in kilometers. Larger values pull in nearby suburbs. Example: 12 (default) covers a city and its inner ring; use 20-25 to include the wider metro.

## `maxPerCoord` (type: `integer`):

Stop collecting cards from a single city after this many. Facebook serves at most ~24 to logged-out users per search, so values above ~24 just take whatever is available. Example: 40. No upper cap.

## `matchCityOnly` (type: `boolean`):

Facebook's search returns a radius around each city, so it also pulls in neighbouring towns (e.g. picking Ra'anana also surfaces Kfar Saba, Herzliya). When on (default), listings that aren't actually in one of your selected cities are dropped BEFORE the detail step, so you don't pay for results you didn't ask for. Turn off to include the whole surrounding area.

## `cityCoveragePoints` (type: `integer`):

How many search points to sweep across each city. Facebook returns only ~24 listings per point to logged-out users, so 1 point misses most of a city; more points find more (Ra'anana: 1 point found ~2 listings, 5 points found 21). Higher = more complete but proportionally more cost/time. Example: 5.

## `fetchDetails` (type: `boolean`):

When on, opens each listing's detail page to read the FULL description (og:description), title, and image. This is the key field for downstream matching. Turning it off is much faster but returns only the card-level data (price, city, short title, thumbnail) and an empty description. Example: leave on.

## `extraCoords` (type: `array`):

Search arbitrary points that are not in the city dropdown. Each entry is { label, lat, lng, radiusKm, countryCode, currency }. lat/lng set the Marketplace location; countryCode (ISO-2, e.g. 'IL', 'US', 'ES') picks the proxy country and currency. Example: { "label": "Valencia", "lat": 39.4699, "lng": -0.3763, "radiusKm": 12, "countryCode": "ES" }. countryCode defaults to IL and currency defaults to that country's currency.

## `knownDetailIds` (type: `array`):

Listing ids you already have full details for (from a previous run). The actor ships these as cheap card-level rows and SKIPS their detail page; only new ids get the (expensive) detail enrichment. Use this on re-scans to cut cost dramatically. Leave empty to enrich every listing. Example: \["1007384061689614", "1088244741046904"].

## `repairItems` (type: `array`):

Listings whose photo link you lost (Facebook image links expire after a few days) and want re-fetched DIRECTLY from each listing's own item page, even when the search grid does not surface it this run. Each entry is { id, price, city } - price and city come from your own records so the emitted row is complete even if the item page yields only the photo. Items already found by the normal search flow this run are skipped (no double cost); gone/removed listings are skipped silently. Example: \[{ "id": "1007384061689614", "price": 5200, "city": "חיפה" }].

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

Facebook serves a login wall to datacenter IPs and ignores non-local IPs for location. The actor uses Apify RESIDENTIAL proxy and automatically picks each city's country (Israel for IL cities, US for US cities, etc.). Leave this as the default unless you have a reason to pin a single proxy country.

## `proxyProvider` (type: `string`):

Internal/experimental. Leave on the default. "custom" only works when the actor operator has configured a custom residential provider; without that configuration the actor silently uses Apify proxy as usual.

## Actor input object example

```json
{
  "dealType": "RENT",
  "cities": [
    "tel-aviv"
  ],
  "radiusKm": 12,
  "maxPerCoord": 40,
  "matchCityOnly": true,
  "cityCoveragePoints": 5,
  "fetchDetails": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "proxyProvider": "apify"
}
```

# Actor output Schema

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

All scraped listings (JSON). Append ?format=csv for CSV.

# 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": [
        "tel-aviv"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("swerve/fb-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": ["tel-aviv"],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("swerve/fb-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": [
    "tel-aviv"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call swerve/fb-marketplace-scraper --silent --output-dataset

```

## MCP server setup

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