Scraper for Facebook Marketplace avatar

Scraper for Facebook Marketplace

Pricing

from $4.00 / 1,000 results

Go to Apify Store
Scraper for Facebook Marketplace

Scraper for Facebook Marketplace

Better scraper for FB Marketplace

Pricing

from $4.00 / 1,000 results

Rating

0.0

(0)

Developer

Tor

Tor

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

4 days ago

Last modified

Share

Facebook Marketplace Scraper

Extract listings from Facebook Marketplace at scale — prices, titles, images, seller info, and more. Search any location, any category, without writing a single line of code.

What it does

This Actor lets you scrape Facebook Marketplace search results and save them as structured data (JSON, CSV, Excel). Give it one or more search URLs, and it will collect every listing it finds.

Instead of reading text off the rendered page, it reads the same structured data Facebook's own app fetches to build the results feed. That means it isn't capped by what Facebook currently has rendered on screen — it keeps accumulating listings as you scroll, and each listing comes back with more fields (seller name, sold/pending status, delivery type) without needing to visit the listing page separately.

Typical use cases:

  • Price research and market comparisons
  • Inventory monitoring (check if specific items are available)
  • Lead generation for resellers and flippers
  • Academic research on secondhand markets
  • Real estate and vehicle listing aggregation

What you get

Every scraped listing includes all of the following — no extra requests needed:

FieldDescription
titleListing title
price / formattedPriceNumeric price and Facebook's displayed price string (e.g. "฿4,500")
minPrice / maxPricePrice range for range-priced listings (e.g. real estate)
location, city, stateLocation shown on the listing
statuslive, sold, pending, or hidden
deliveryTypese.g. ["IN_PERSON"], ["SHIPPING"]
imageUrlPrimary listing photo
sellerName / sellerIdSeller's display name and Facebook ID
linkDirect URL to the Facebook listing

Enable Fetch Listing Details to additionally get:

FieldDescription
postedAtTime posted (e.g. "2 hours ago")
descriptionFull item description

Before you start — important setup

Facebook Marketplace requires you to be logged in. This Actor authenticates using your browser session cookies. Follow the steps below carefully — skipping them is the #1 reason runs fail.

Do not use your personal Facebook account for scraping. Facebook's security systems will detect unusual cookie activity and log you out, potentially flagging your account.

Instead:

  1. Create a new Facebook account with a separate email address
  2. Use it only for running this Actor
  3. Let it "warm up" for a day or two before scraping — browse Marketplace manually a few times first

This protects your personal account and gives you a stable, long-lived session for scraping.

Step 2 — Get your session cookies (using Chrome DevTools)

No extensions needed — this uses a tool built into every Chrome browser.

  1. Open Google Chrome and go to facebook.com
  2. Log in with your dedicated scraping account
  3. Browse to facebook.com/marketplace and click around a few listings — this makes the session look natural
  4. Press F12 to open Chrome DevTools
  5. Click the Console tab
  6. Paste the following code and press Enter:
copy(
JSON.parse(
JSON.stringify(
document.cookie.split("; ").map((c) => {
const [name, ...val] = c.split("=");
return {
name: name.trim(),
value: val.join("="),
domain: ".facebook.com",
path: "/",
httpOnly: false,
secure: true,
};
})
)
)
);
console.log("✅ Cookies copied to clipboard!");
  1. You'll see ✅ Cookies copied to clipboard! — the JSON is now in your clipboard
  2. Paste it into the Facebook Session Cookies field in the Actor input

⚠️ Do not close or refresh the Facebook tab after running this script. Open a new tab for everything else. Navigating away from Facebook immediately after exporting can trigger a security check.

Step 3 — Verify your cookies contain the required values

Your cookies must include both of these:

  • c_user — your Facebook user ID
  • xs — your session token

If either is missing, the Actor will fail. Re-export your cookies and try again.


How to build a search URL

Instead of typing a URL from scratch, use Facebook's own search:

  1. Go to facebook.com/marketplace
  2. Search for what you want — use the filters (location, price range, category, condition)
  3. Once the results load, copy the URL from your browser address bar
  4. Paste it into the Search URLs field in the Actor

Example URLs:

# Search for iPhones in Bangkok
https://www.facebook.com/marketplace/bangkok/search/?query=iphone
# Cars under ฿300,000 in Bangkok
https://www.facebook.com/marketplace/bangkok/vehicles/?maxPrice=300000
# Furniture in London
https://www.facebook.com/marketplace/london/search/?query=sofa&exact=false

You can add multiple URLs to scrape several searches in a single run.


Input configuration

FieldRequiredDescription
Search URLs✅ YesOne or more Facebook Marketplace search URLs
Max Listings Per SearchNoHow many results to collect per URL. Default: 50. Max: 1,000
Facebook Session Cookies✅ YesYour exported browser cookies (see guide above)
Proxy ConfigurationNoDefaults to Residential proxies — required for reliability

Keeping your session alive between runs

Facebook sessions expire over time — typically within a few days to a couple of weeks. To avoid interruptions:

  • Re-export your cookies before each run if you haven't run the Actor in 3+ days
  • Don't log out of your scraping account in the browser — this immediately invalidates the cookies
  • Keep the browser tab open on Facebook when not in use; closing and reopening can sometimes trigger re-authentication
  • If you get a Session expired or Login required error, your cookies have expired — re-export and update the input

Proxy usage

This Actor defaults to Residential proxies, which are required for Facebook Marketplace. Datacenter proxies will be blocked almost immediately.

Residential proxy usage is charged separately based on traffic consumed. For most searches, expect roughly 50–150 MB per 1,000 listings.


Cost estimation

ListingsEstimated cost
50 (default)~$0.01–0.05
500~$0.10–0.30
5,000~$1.00–3.00

Costs vary based on page load times, proxy usage, and how aggressively Facebook rate-limits the session.


Output example

{
"listing_id": "123456789",
"title": "iPhone 13 Pro Max 256GB",
"price": 28500,
"formattedPrice": "฿28,500",
"currency": "฿",
"location": "Bangkok, Thailand",
"status": "live",
"deliveryTypes": ["IN_PERSON"],
"imageUrl": "https://scontent.xx.fbcdn.net/v/...",
"sellerName": "John D.",
"link": "https://www.facebook.com/marketplace/item/123456789/"
}

postedAt and description are included too when Fetch Listing Details is enabled.

Results are available in the Dataset tab after the run. Download as JSON, CSV, Excel, or XML.


Troubleshooting

❌ Actor finishes instantly with no results → Your cookies have expired or are invalid. Re-export them from your browser (Step 2 above) and update the input.

❌ "Login required" or redirect to Facebook login page → Same as above — re-export cookies. Make sure you're exporting from your logged-in scraping account.

❌ My personal Facebook account got logged out after exporting cookies → This is Facebook's security system detecting unusual activity. This is why we recommend a dedicated scraping account (Step 1). Create a separate account and use that instead.

❌ Cookies exported but c_user or xs are missing → Make sure you ran the console script while logged in to facebook.com (not messenger.com or another subdomain). Try logging out and back in, then re-exporting.

❌ Actor runs but returns fewer results than expected → Some searches genuinely have fewer than Max Listings Per Search results — the Actor stops early once scrolling stops surfacing new listings. If you expect more, Facebook may be rate-limiting the session; try re-exporting fresh cookies.

❌ "Blocked" or proxy errors → Make sure Residential proxies are selected (the default). Switch proxy country to match your search location for best results.


Limitations

  • Facebook's Terms of Service: Scraping Facebook is against their ToS. Use this tool responsibly and only for legitimate research or personal use.
  • Session expiry: Cookies typically last a few days to two weeks. You will need to re-export them periodically.
  • Dynamic content: Listings load as you scroll — the Actor handles this automatically, but very large result sets may take several minutes.
  • Location availability: Marketplace is available in most countries but not all. Some categories and filters vary by region.
  • Rate limiting: Aggressive scraping may trigger temporary listing limits from Facebook. Stay within reasonable result counts per session.

This tool is provided for research and personal use. You are responsible for complying with Facebook's Terms of Service and applicable laws in your jurisdiction. The author does not condone scraping for spam, harassment, or any illegal purpose.