Vntg Bot

Facebook Marketplace scraper wired for keyword plus location fetches.

This deployment exposes a server-side scraper module and an API route that searches Marketplace, extracts listing data, and upserts rows into PostgreSQL.

Fields: title, price, location, image URL, listing URL, date postedTable bootstrap: listingsRuntime: Node.js + Playwright Core + PostgreSQL

Required env

DATABASE_URL

FACEBOOK_EMAIL and FACEBOOK_PASSWORD

or FACEBOOK_SESSION_COOKIE / FACEBOOK_STORAGE_STATE_PATH

Optional: CHROMIUM_PATH

API

POST /api/scrape/marketplace

Body fields: keyword, location, optional maxResults and headless.

{
  "keyword": "vintage office chair",
  "location": "10001",
  "maxResults": 10
}

CLI

npm run scrape:marketplace

npm run scrape:marketplace -- \
  --keyword "vintage office chair" \
  --location "10001" \
  --max-results 10

Both entrypoints call the same server-side module in lib/scrapers/facebook-marketplace.ts.