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

Facebook marketplace Scraper, our advanced scraper is designed to collect comprehensive details of products and listings from Facebook Marketplace. It effortlessly extract all relevant information about items listed for sale, including product descriptions, prices, seller details, and more.

- **URL**: https://apify.com/getdataforme/facebook-marketplace-scraper.md
- **Developed by:** [GetDataForMe](https://apify.com/getdataforme) (community)
- **Categories:** E-commerce, Social media
- **Features:** Full permissions
- **Stats:** 143 total users, 0 monthly users, 100.0% runs succeeded, 5 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $9.00 / 1,000 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

Search Facebook Marketplace by keyword and location and collect structured listing data: title, price, location, photo, delivery options and sold or pending status.

### What does the Facebook Marketplace Scraper do?

The Actor looks up the Marketplace area for a location you enter, searches it for each keyword and returns one record per listing. You can limit results to listings from the last few days and cap the number of items per run. It needs a residential proxy to get data reliably.

### Why use it?

- Track prices of used cars, phones and other goods in a city.
- Compare supply and asking prices between locations.
- Collect listings in bulk instead of copying them by hand.

### Data it extracts

| Field | Type | Description |
|---|---|---|
| `URl` | string | Link to the listing |
| `marketplace_listing_category_id` | string | Category id |
| `marketplace_listing_title` | string | Listing title |
| `custom_title` | string or null | Seller's custom title |
| `custom_sub_titles` | array | Sub titles on the listing card |
| `image` | string | Main photo link |
| `formatted_amount` | string | Price with currency, as shown |
| `amount` | string | Price as a number in text form |
| `location_display_name` | string | City and country |
| `location` | string | City |
| `state` | string | State or region (may be empty) |
| `delivery_types` | array | For example `IN_PERSON`, `DOOR_PICKUP` |
| `is_hidden`, `is_live`, `is_pending`, `is_sold` | boolean | Listing status |

### How to run it

1. Open the Actor on Apify and go to the Input tab.
2. Enter the keywords in **search_queries**. For several keywords separate them with commas, for example `car,phone`.
3. Enter the place in **location**, for example `nepal`.
4. Optionally set **daysSinceListed** (only listings from the last N days) and **itemLimit** (maximum items).
5. Keep the proxy on **Residential**, then click Start and open the Output tab.

### Input

| Field | Default | Description |
|---|---|---|
| `search_queries` | `car` | Keywords, comma separated |
| `location` | `nepal` | Place to search |
| `daysSinceListed` | `1` | Only listings from the last N days |
| `itemLimit` | `10` | Maximum number of items |
| `proxyConfiguration` | Apify residential proxy | Proxy settings |

### Output example

```json
{
  "URl": "https://www.facebook.com/marketplace/item/2047396602638107/",
  "marketplace_listing_title": "Car Nissan Sunny",
  "formatted_amount": "NPR690,000",
  "amount": "690000.00",
  "location_display_name": "Kathmandu, Nepal",
  "location": "Kathmandu",
  "delivery_types": ["IN_PERSON", "DOOR_PICKUP"],
  "is_live": true,
  "is_sold": false
}
```

### Tips

- Use `itemLimit` to keep runs short and cheap.
- Facebook can change its pages without notice; if a run returns no items, try another location or keyword and contact support.

### FAQ

**Which formats can I export?** JSON, CSV, Excel, XML, HTML or RSS from the Output tab, or through the Apify API.
**Do I need a proxy?** Yes, a residential proxy is recommended.
**Can I schedule it?** Yes, use Apify Schedules.

# Actor input Schema

## `search_queries` (type: `string`):

Search query is required

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

Search query is required

## `daysSinceListed` (type: `integer`):

Filter items listed in the last N days (optional).

## `itemLimit` (type: `integer`):

Specifies the maximum number of items to process.

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

Specifies proxy servers that will be used by the scraper in order to hide its origin.

## Actor input object example

```json
{
  "search_queries": "car",
  "location": "nepal",
  "daysSinceListed": 1,
  "itemLimit": 10,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

Scraped data items from 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 = {
    "search_queries": "car",
    "location": "nepal",
    "daysSinceListed": 1,
    "itemLimit": 10,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("getdataforme/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 = {
    "search_queries": "car",
    "location": "nepal",
    "daysSinceListed": 1,
    "itemLimit": 10,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("getdataforme/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 '{
  "search_queries": "car",
  "location": "nepal",
  "daysSinceListed": 1,
  "itemLimit": 10,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call getdataforme/facebook-marketplace-scraper --silent --output-dataset

```

## MCP server setup

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