Facebook Marketplace Product Scraper avatar

Facebook Marketplace Product Scraper

Pricing

$15.00/month + usage

Go to Apify Store
Facebook Marketplace Product Scraper

Facebook Marketplace Product Scraper

Scrape Facebook Marketplace listing data (price, title, seller, images, location) using URLs and export it as structured data for analysis and automation.

Pricing

$15.00/month + usage

Rating

0.0

(0)

Developer

Sovanza

Sovanza

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

6 days ago

Last modified

Categories

Share

Facebook Marketplace Product Scraper

What is Facebook Marketplace Product Scraper and How Does It Work?

Facebook Marketplace Product Scraper is a powerful Facebook Marketplace data extraction tool built on Apify that lets you scrape product listings from Facebook Marketplace using listing URLs. It is designed for eCommerce teams, marketers, researchers, and lead-generation workflows who want to automate listing research, competitor checks, and catalog-style data collection — without relying on Facebook’s official Marketplace API.

Why Use This Facebook Marketplace Scraper?

Use this scraper to:

  • Extract listing data from Facebook Marketplace at scale
  • Monitor competitor or category listings when you have valid listing URLs
  • Collect seller- and location-related fields where Facebook exposes them
  • Build structured datasets for analytics, CRM, or downstream automation
  • Automate what would otherwise be manual browsing of Marketplace listings

Features

  • Scrape Facebook Marketplace listing URLs (/marketplace/item/... or /marketplace/<id>/)
  • Support multiple listing URLs in one run via productUrls
  • Extract listing-level data aligned with common Marketplace fields (title, price, images, seller, location, delivery, status flags)
  • Optional session cookies input when listings require login
  • Proxy country selection for Apify Proxy
  • Structured output in JSON (and CSV/Excel via Apify dataset export)

How to Use Facebook Marketplace Product Scraper on Apify

Using the Actor

To use this scraper on Apify, follow these simple steps:

  1. Go to the Facebook Marketplace Product Scraper on the Apify platform.

  2. Input Configuration:

    • Enter one or more Facebook Marketplace listing URLs.
    • Optionally set proxy country and session cookies if listings require authentication or are unstable from datacenter IPs.

Input Configuration

The actor accepts the following input parameters:

{
"productUrls": [
"https://www.facebook.com/marketplace/item/1189200412268517"
],
"maxListings": 100,
"proxyCountry": "AUTO_SELECT_PROXY_COUNTRY",
"cookies": []
}
  • productUrls (required): One or more Facebook Marketplace listing URLs (/marketplace/item/... or /marketplace/<id>/). Use the string list editor in the Console or a JSON array.
  • maxListings (optional): Maximum listings per feed-style URL when applicable (default 100, min 1, max 1000). For single listing URLs, behavior is documented in the actor; see Supported URLs below.
  • proxyCountry (optional): Country for proxy — AUTO_SELECT_PROXY_COUNTRY, US, GB, DE, FR, JP, CA, IT (default: AUTO_SELECT_PROXY_COUNTRY).
  • cookies (optional): Facebook session cookies for authenticated access when listings show login walls. Array of { "name", "value", "domain" (optional), "path" (optional) }. For HttpOnly session cookies like xs, export from DevTools → Application → Cookies for https://www.facebook.com and add { "name": "xs", "value": "<value>", "domain": ".facebook.com", "path": "/" } to the array.
  1. Run the Actor:

    • Click Start to begin scraping.
    • The actor processes each URL and writes results to the default dataset.
  2. Access Your Results:

    • Open the Dataset tab.
    • Export as JSON, CSV, or Excel, or use the Apify API.
  3. Schedule Regular Runs (Optional):

    • Schedule recurring runs to refresh listing snapshots.
    • Use webhooks to trigger downstream workflows when runs complete.

Supported URLs

  • Listing URLs: https://www.facebook.com/marketplace/item/<id> or https://www.facebook.com/marketplace/<id>/

This actor is oriented toward listing (product) URLs. See the actor’s source description for any feed/search URL limits.

Output

All results are stored in Apify dataset storage. Each item in the dataset typically includes fields such as:

  • facebookUrl — Source Facebook URL used for the scrape
  • listingUrl — Listing page URL
  • id — Listing ID
  • marketplace_listing_title — Listing title
  • listing_price — Price object (e.g. formatted_amount, amount)
  • primary_listing_photo — Primary photo object (e.g. image.uri)
  • location — Location object (e.g. city/state via reverse_geocode)
  • marketplace_listing_seller — Seller object (name, id, etc.)
  • is_live, is_sold — Listing status flags
  • delivery_types — e.g. ["IN_PERSON"]

Flat compatibility fields for tooling and exports:

  • url, title, price, description, images, seller, location, condition, shipping, timestamp

On error: items may include url and error instead of full listing data.

Example successful item (simplified):

{
"url": "https://www.facebook.com/marketplace/item/1189200412268517",
"title": "Example item",
"price": "$50",
"listing_price": { "formatted_amount": "$50", "amount": "5000" },
"marketplace_listing_title": "Example item",
"marketplace_listing_seller": { "name": "Seller Name", "id": "123" },
"location": { "reverse_geocode": { "city": "Dubai", "state": null } },
"images": ["https://..."],
"error": null
}

Example error item:

{
"url": "https://www.facebook.com/marketplace/item/invalid",
"error": "Product not found or no longer available"
}

How the Scraper Works

  • Playwright loads Marketplace listing pages in a headless browser.
  • Extraction in extract_product_data() (main.py):
    • Title: <h1>, [data-testid="marketplace_pdp_title"], or og:title
    • Price: embedded JSON or DOM, [data-testid="marketplace_pdp_price"]
    • Description: embedded JSON or [data-testid="marketplace_pdp_description"]
    • Images: embedded photos or og:image / CDN URLs
    • Seller, location, condition, shipping: labeled sections or embedded JSON

Anti-blocking Measures

  • Uses Apify Proxy with configurable proxy country.
  • Optional session cookies for logged-in scraping when Facebook shows login walls.
  • Retries and error handling for network failures (see MAX_RETRIES in code).

Performance Optimization

  • Batch multiple productUrls in one run.
  • Use cookies only when needed to reduce operational overhead.

Why Choose This Actor?

  • High-demand Marketplace data in a structured dataset
  • Lead-generation and listing research workflows
  • Scalable multi-URL runs on Apify
  • Clean structured output aligned with common Marketplace field shapes
  • Automation-ready via API, schedules, and webhooks

Integrations & API

  • Use as API via Apify
  • Integrate with Python & Node.js
  • Connect with Zapier, Make, Google Sheets
  • Automate workflows with webhooks
  • Schedule recurring scraping

FAQ

How does Facebook Marketplace Scraper work?

It opens publicly reachable listing pages (and optionally authenticated sessions via cookies), extracts structured listing data from the DOM and embedded JSON, and writes rows to the Apify dataset.

Can I scrape listings from specific locations?

Location appears in output when Facebook exposes it on the listing. Targeting by city is typically done by using listing URLs that already reflect that context, or by your own URL discovery workflow.

Can I extract seller information?

Yes, when available — see marketplace_listing_seller and flat seller fields.

Can I scrape multiple listings at once?

Yes. Pass multiple URLs in productUrls.

Does it require the Facebook Marketplace API?

No. It does not use Facebook’s official API for this flow.

Is the data accurate?

Data reflects what is shown on the listing page at scrape time. Facebook may change markup.

Can I automate scraping?

Yes — Apify API, scheduling, and integrations.

What formats are supported?

JSON, CSV, Excel via Apify dataset export, plus API access.

Can I use this for lead generation?

Yes — subject to Facebook’s terms and applicable laws.

Can I connect this scraper to Google Sheets?

Yes — via export or integrations (e.g. Make, Zapier).

Can I use this for AI or machine learning projects?

Yes — structured fields are suitable for analytics pipelines.

Scraping publicly available data may be allowed in some jurisdictions, but you must follow Facebook’s Terms of Service, robots rules where applicable, and local laws. Use responsibly.

SEO Keywords

facebook marketplace scraper
facebook marketplace data scraper
facebook marketplace product scraper
facebook marketplace listings scraper
facebook marketplace scraping api
facebook marketplace lead generation
scrape facebook marketplace data
facebook marketplace automation tool
facebook marketplace product research
best facebook marketplace scraper
facebook marketplace scraper apify

Actor permissions

This Actor is designed to work with limited permissions. It only reads input and writes to its default dataset; it does not access other user data or require full account access.

To set limited permissions in Apify Console:

  1. Open your Actor on the Apify platform.
  2. Go to the Source tab (or Settings).
  3. Click Review permissions (or open SettingsPermissions).
  4. Select Limited permissions and save.

Limitations

  • Facebook may block or throttle datacenter IPs; proxies and/or cookies may be required.
  • Listing markup changes can break selectors until the actor is updated.
  • Login-required or restricted listings need valid session cookies.
  • Invalid URLs or non-listing URLs may be skipped or return errors.

Error handling

  • Invalid URL: not a supported listing URL — skipped or error row.
  • Not found / unavailable: { url, error: "Product not found or no longer available" }.
  • Login required: { url, error: "Login required... Add Facebook session cookies..." } — add cookies.
  • Network / timeout: Retries, then { url, error: message }.

API route (for backend integration)

Example: POST /api/scraper/facebook-marketplace with body { "url": "https://www.facebook.com/marketplace/item/xxxxx" }.
Response: { success: true, data: { ... } } or { success: false, error: "..." }.
See routes/facebook_marketplace.example.js in the repo.

Run locally

pip install -r requirements.txt
playwright install chromium
# Edit INPUT.json with Marketplace listing URLs
python main.py

Docker

Use the provided Dockerfile to build and run the actor, consistent with other Apify actors in this monorepo.

License

See the repository root or this package’s LICENSE file for license terms, if present.

Get Started

Start extracting Facebook Marketplace data and generate valuable insights and leads today. 🚀