Facebook Marketplace Scraper avatar

Facebook Marketplace Scraper

Under maintenance

Pricing

from $5.00 / 1,000 results

Go to Apify Store
Facebook Marketplace Scraper

Facebook Marketplace Scraper

Under maintenance

Scrape Facebook Marketplace search results at scale. Returns structured listing data — title, price, location, images, and status — via GraphQL interception with stealth browsing.

Pricing

from $5.00 / 1,000 results

Rating

0.0

(0)

Developer

Leonard Parisi

Leonard Parisi

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

3 days ago

Last modified

Share

Facebook Marketplace Scraper (Apify Actor)

Custom Apify actor that scrapes Facebook Marketplace search results by intercepting GraphQL responses in a real browser. Replaces apify/facebook-marketplace-scraper to eliminate per-event billing (~$0.0062/listing).

How it works

Uses PlaywrightCrawler (Crawlee) with Apify residential proxies (RESIDENTIAL, US). Navigates to a search URL, intercepts /api/graphql responses as they stream in, and extracts listing data from data.marketplace_search.feed_units.edges[].node.listing (falls back to data.viewer.marketplace_feed_units). Images, fonts, and media are blocked to reduce proxy bandwidth.

Input

{
"startUrls": [{ "url": "https://www.facebook.com/marketplace/nyc/search?query=bike" }],
"resultsLimit": 20
}
FieldTypeDefaultMax
startUrlsarray of { url }required
resultsLimitinteger20100

Output

Each run pushes an array of objects to the Apify dataset:

{
"facebookUrl": "https://www.facebook.com/marketplace/nyc/search?query=bike",
"listingUrl": "https://www.facebook.com/marketplace/item/123456789",
"id": "123456789",
"marketplace_listing_title": "Trek Road Bike",
"primary_listing_photo": { "photo_image_url": "https://..." },
"listing_price": {
"amount": "350",
"formatted_amount": "$350",
"amount_with_offset_in_currency": "35000"
},
"location": { "reverse_geocode": { "city": "New York", "state": "NY" } },
"is_hidden": false,
"is_live": true,
"is_pending": false,
"is_sold": false,
"delivery_types": ["PICKUP"]
}

If no listings are collected, a debug screenshot is saved to the actor key-value store under debug-screenshot.

Development

npm install # install deps + generate package-lock.json (commit this)
npm run build # tsc → dist/

Deployment

apify-cli is a local dev dependency — no global install needed.

# First time only
./node_modules/.bin/apify login
# Build + push in one step
npm run deploy

After pushing, copy the actor ID from the Apify console (your-username~facebook-marketplace-scraper) and update ACTOR_ID in apps/api/src/adapters/facebook.ts.

Infrastructure

  • Base image: apify/actor-node-playwright-chrome pinned to digest in Dockerfile — update by pulling the new tag and re-running docker inspect ... --format='{{index .RepoDigests 0}}'
  • Proxies: Apify residential pool, US only — requires an Apify plan with residential proxy access
  • Memory: 1024 MB minimum (Playwright + Chrome)
  • Runtime: Node 20, ESM ("type": "module")