# Facebook Marketplace Scraper (`igview-owner/facebook-marketplace-data-scraper`) Actor

Search Facebook Marketplace by keyword and location. Extract listings with price, images, city/state, and delivery types. Clean JSON output for analytics.

- **URL**: https://apify.com/igview-owner/facebook-marketplace-data-scraper.md
- **Developed by:** [Sachin Kumar Yadav](https://apify.com/igview-owner) (community)
- **Categories:** Automation, E-commerce, Social media
- **Features:** Limited permissions
- **Stats:** 91 total users, 1 monthly users, 99.9% runs succeeded, 3 bookmarks
- **User rating**: 1.00 out of 5 stars

## Pricing

from $1.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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 ⚡

Scrape Facebook Marketplace listings by **keyword** and **location** and get clean, structured JSON output in an Apify dataset. Perfect for lead generation, market research, price monitoring, and building local classifieds databases. 📦

***

### Table of Contents 📚

- **[Features](#features-)**
- **[How it works](#how-it-works-)**
- **[Input](#input-)**
- **[Output](#output-)**
- **[Quick start](#quick-start-)**
- **[Best practices](#best-practices-)**
- **[FAQ](#faq-)**

***

### Features ✨

| Capability | What you get |
|-----------|---------------|
| Keyword + Geo search | Query Marketplace with `query`, `lat`, `lng` |
| Filters | Optional `radius_km`, `min_price`, `max_price`, `condition` |
| Normalized output | Clean fields for price, location, title, delivery types |

***

### How it works 🧠

This actor:

- **Searches Marketplace** using your keyword + geo inputs.
- **Normalizes results** into a consistent JSON schema.
- **Writes items** to the default Apify dataset (batched for performance).
- **Handles stability** with retries and resilient processing.

***

### Input ⚙️

Configure inputs in the Apify UI.

#### Input fields

| Field | Type | Required | Description |
|------|------|----------|-------------|
| `query` | string | yes | 🔎 Keyword to search (e.g., `car`, `iPhone 14`) |
| `lat` | string | yes | 📍 Latitude of the search location (e.g., `40.7128`) |
| `lng` | string | yes | 📍 Longitude of the search location (e.g., `-74.006`) |
| `radius_km` | string | no | 📏 Radius in kilometers (leave empty for default) |
| `min_price` | string | no | 💰 Minimum price filter |
| `max_price` | string | no | 💰 Maximum price filter |
| `condition` | string | no | 🧼 Condition: `used_like_new`, `used_good`, `used_fair`, `new` |

***

### Output 📤

Results are saved to the **default dataset** for the run.

#### Common output fields

| Field | Description |
|------|-------------|
| `listing_id` | Unique listing ID |
| `title` | Listing title |
| `price_amount` / `price_formatted` | Price as number and formatted string |
| `image_url` | Main image URL |
| `location_city` / `location_state` | Parsed location fields |
| `city_display_name` | Human-friendly location name |
| `is_live` / `is_pending` / `is_sold` | Listing status flags |
| `delivery_types` | Delivery types if available |
| `query` | Echo of your search keyword |
| `lat` / `lng` | Echo of your location inputs |
| `raw` | Original raw payload (for debugging/advanced use) |

***

### Quick start 🏁

#### Example input 📥

```json
{
  "query": "car",
  "lat": "40.7128",
  "lng": "-74.006",
  "radius_km": 20,
  "min_price": 1000,
  "max_price": 10000,
  "condition": "used_good"
}
```

***

#### Example output

Dataset items:

```json
{
  "source": "facebook_marketplace",
  "listing_id": "771476635286470",
  "category_id": "807311116002614",
  "title": "1984 Lincoln Town Car",
  "price_amount": 6600,
  "price_formatted": "$6,600",
  "strikethrough_amount": 15000,
  "image_url": "https://...jpg",
  "location_city": "Staten Island",
  "location_state": "NY",
  "city_display_name": "New York, New York",
  "is_live": true,
  "is_pending": false,
  "is_sold": false,
  "delivery_types": ["IN_PERSON"],
  "query": "car",
  "lat": "40.7128",
  "lng": "-74.006",
  "raw": { "...": "original item payload" }
}
```

The actor can also write a summary item:

```json
{
  "success": true,
  "total_pushed": 42,
  "query": "car",
  "lat": "40.7128",
  "lng": "-74.006",
  "fetched_at": "2025-01-01T12:34:56.000Z"
}
```

***

### Best practices 🧩

- **Use specific keywords**: Narrow queries like `iphone 14 pro` get cleaner results than `phone`.
- **Pick accurate coordinates**: Use Google Maps to copy `lat`/`lng` for the exact target area.
- **Start with broad filters**: Add `radius_km` / price filters only after you confirm results look right.
- **Keep runs repeatable**: Reuse the same input to compare price trends over time.

***

### FAQ ❓

- **Is login required?**\
  No. This scraper targets public listing data.

- **Where do results go?**\
  The default Apify dataset for the run.

- **Why am I getting fewer results than expected?**\
  Try a broader `radius_km`, remove price filters, or use a more generic `query`. Some categories and regions have lower listing volume.

- **What do `is_live`, `is_pending`, `is_sold` mean?**\
  These are status flags derived from the listing metadata to help you filter results.

- **Can I export results to CSV / Google Sheets?**\
  Yes. Open the dataset and use Apify export features.

- **Does the actor return raw data too?**\
  Yes, each item includes `raw` so you can access the original payload if you need additional fields.

***

### 🏷️ Tags

**Facebook Marketplace Scraper** • **Facebook Marketplace Downloader** • **Facebook Data Extractor** • **Social Media Analytics** • **Marketplace Metadata Extractor** • **Facebook Marketplace Scraper** • **Engagement Metrics** • **Social Media Intelligence** • **Content Analysis Tool** • **Influencer Analytics** • **Facebook Automation** • **Marketplace Data Mining** • **Video Content Extraction** • **Social Media Research** • **Competitive Analysis** • **Content Strategy Tool** • **Facebook Marketplace Details Scraper** • **Viral Content Analysis** • **Social Listening** • **Brand Monitoring**

***

### 🚀 **Get Started Now**

**Ready to download Facebook Marketplace Listings?**

1. Click ["Try for free"](https://apify.com?fpr=ykgg9c) to open the actor
2. Enter the **Facebook Marketplace Keyword** in the `query` input
3. Configure `lat` and `lng` as needed
4. Run the actor and download all media URLs from the dataset
5. Use the built-in table views to browse images, videos, or detailed data

**⭐ If this actor helps your workflow, please give it a star!**

***

### 🔗 Related Scrapers

- [Facebook Page Photos Downloader](https://apify.com/igview-owner/facebook-page-photos-downloader)
- [Facebook Page Video Downloader](https://apify.com/igview-owner/facebook-page-video-downloader)
- [Facebook Page Details Extractor](https://apify.com/igview-owner/facebook-page-details-extractor)
- [Facebook Page Reels Extractor](https://apify.com/igview-owner/facebook-page-reels-extractor)
- [Facebook Marketplace Data Scraper](https://apify.com/igview-owner/facebook-marketplace-data-scraper)
- [Facebook Media Downloader](https://apify.com/igview-owner/facebook-media-downloader)
- [Facebook Old Posts Search](https://apify.com/igview-owner/facebook-old-posts-search)
- [Facebook Page Details Scraper](https://apify.com/igview-owner/facebook-page-details-scraper)
- [Facebook Page Reviews Scraper](https://apify.com/igview-owner/facebook-page-reviews-scraper)
- [Facebook Group Details Scraper](https://apify.com/igview-owner/facebook-group-details-scraper)
- [Facebook Group Media Scraper](https://apify.com/igview-owner/facebook-group-media-downloader)
- [Facebook Search Scraper](https://apify.com/igview-owner/facebook-search-scraper)

*Built with ❤️ by Sachin Kumar Yadav using Apify Platform*

# Actor input Schema

## `query` (type: `string`):

Enter your search term (e.g., 'cars', 'furniture', 'iPhone 15'). This is the main keyword to search for on Facebook Marketplace. \[REQUIRED]

## `lat` (type: `number`):

Location latitude for search (e.g., 40.7128 for New York City). \[REQUIRED]

## `lng` (type: `number`):

Location longitude for search (e.g., -74.006 for New York City). \[REQUIRED]

## `price_min` (type: `integer`):

Optional: Minimum price filter. Only show items priced at or above this amount. Default: 0

## `price_max` (type: `integer`):

Optional: Maximum price filter. Only show items priced at or below this amount. Default: 0 (no limit)

## `radius_km` (type: `integer`):

Optional: Search radius in kilometers from the specified location. Default: 0 (no limit)

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

Optional: Filter by item condition. Select one or multiple.

## `category` (type: `string`):

Optional: Filter by category (e.g., 'cars', 'boats', 'furniture', etc.)

## Actor input object example

```json
{
  "query": "cars",
  "lat": 40.7128,
  "lng": -74.006,
  "condition": [],
  "category": ""
}
```

# Actor output Schema

## `listingsOverview` (type: `string`):

View organized table of scraped marketplace listings with images, prices, and locations.

# 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 = {
    "query": "cars",
    "lat": 40.7128,
    "lng": -74.006,
    "condition": [],
    "category": ""
};

// Run the Actor and wait for it to finish
const run = await client.actor("igview-owner/facebook-marketplace-data-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 = {
    "query": "cars",
    "lat": 40.7128,
    "lng": -74.006,
    "condition": [],
    "category": "",
}

# Run the Actor and wait for it to finish
run = client.actor("igview-owner/facebook-marketplace-data-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 '{
  "query": "cars",
  "lat": 40.7128,
  "lng": -74.006,
  "condition": [],
  "category": ""
}' |
apify call igview-owner/facebook-marketplace-data-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,igview-owner/facebook-marketplace-data-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/h0bBrPeX105GEPm6c/builds/prxgw6IGMIxjLffuY/openapi.json
