Skip to content

Repository files navigation

FB Marketplace CarFinder Agent

Node.js Claude Code Apify License Cost Reports

Automatically finds, vets, and rates clean-title used Hondas and Toyotas on Facebook Marketplace — the way a sharp mechanic and shrewd negotiator would. Zero ban risk (your personal FB account is never used), zero-token hard filtering, free VIN checks, and a ranked leaderboard of scored buy reports.


The Problem

Finding a reliable used car under $7,000 on Facebook Marketplace is exhausting:

  • Hundreds of listings to scroll — most are junk, BHPH dealer traps, or outright scams
  • "Clean title" claims you can't verify from a phone screen
  • No way to compare 30 listings head-to-head and know which to call first
  • Your personal Facebook account at risk if you scrape it yourself

This agent automates the entire pipeline — from hands-free scraping to a scored, ranked leaderboard of the cars worth calling today.


Live Output

Real scan results against Ohio FB Marketplace (68 scraped → 14 real candidates → 5 PURSUE):

CarFinder Leaderboard — 2026-06-09

#   Vehicle                    Miles   Price    Deal         Score   Dist    Verdict
─────────────────────────────────────────────────────────────────────────────────────
1   2013 Honda Accord EX-L     112k    $5,200   Great −38%   4.3     78 mi   🟢 PURSUE
2   2013 Honda Civic Si         —      $4,500   Great −31%   4.2     —       🟢 PURSUE
3   2013 Honda Accord LX       hi-mi   $5,500   Great −16%   4.0     —       🟢 PURSUE
4   2015 Toyota Camry LE       149k    $6,199   Good  −10%   4.0     40 mi   🟢 PURSUE
5   2014 Toyota Camry SE        —      $6,299   Good   −9%   4.0     —       🟢 PURSUE
6   2014 Toyota Corolla LE      —      $6,000   Good  −11%   3.9     —       🟡 CAUTION
7   2014 Honda Accord Sport    hi-mi   $5,956   Good   −9%   3.9     —       🟡 CAUTION

Each PURSUE car gets a full detailed buy report (stored in reports/):

# 2015 Toyota Camry LE — $6,199   ✅ PURSUE 4.0/5

Deal:   Good (−10% vs 4 local market comps)
Title:  Clean-Claimed (unverified — request VIN + NICB check)
Engine: 2015 revised 2AR-FE — oil consumption issue fixed vs 2012–14
Trans:  6-speed automatic (NOT CVT — extremely durable)

Weighted Score:
  Deal (30%)           4.0 × 0.30 = 1.20
  Reliability (25%)    4.3 × 0.25 = 1.08
  Title (20%)          3.5 × 0.20 = 0.70
  Seller trust (15%)   3.5 × 0.15 = 0.53
  Scam safety (10%)    4.2 × 0.10 = 0.42
  ─────────────────────────────────────────
  Total:                            4.0 / 5

Opening offer: $5,600   Walk-away max: $6,000

Inspection checklist:
  ☐ Check oil level + smell (2AR-FE — verify no consumption)
  ☐ Pull trans fluid dipstick — dark = overdue (6AT)
  ☐ Test all 6 gears: smooth shifts, no slip at highway speed
  ☐ Ohio car: rust check on rocker panels + wheel arches
  ☐ Cold start idle + 70 mph highway stretch test

What It Does

Feature How
Zero-ban FB scraping Apify managed proxies — your personal FB account is never used
Zero-token hard filter Year/price/mileage/title/model gate runs in pure Node.js ($0, instant)
Full A–H buy reports Deal grade · mechanical risk · VIN check · seller trust · scam signals · negotiation · inspection checklist
Free VIN decode NHTSA vPIC confirms year/make/model/engine match; detects cloned/washed VINs
Local market comps Mines your own scraped data for mileage-adjusted deal grade (no paid API)
Scam signal catalog Catches BHPH down-payment traps, critical-fraud patterns, off-platform payment pushes
Ranked leaderboard Score-first tier classification; one command ranks every car you've ever evaluated
Recurring scans Windows Task Scheduler + cron integration for hands-free periodic discovery
Dedup tracking scan-history.tsv ledger — never wastes tokens evaluating the same listing twice
--from-file re-gate Re-run your hard filter on a saved dataset at $0 after any logic change

Architecture

┌─────────────────────────────────────────────────────────────────────┐
│  Facebook Marketplace                                               │
│  (4 search URLs: Civic · Accord · Corolla · Camry)                 │
└──────────────────┬──────────────────────────────────────────────────┘
                   │  Apify managed scraping (~$0.25 / 40 listings)
                   │  residential proxies — personal FB never used
                   ▼
┌─────────────────────────────────────────────────────────────────────┐
│  scan.mjs  —  Zero-token intake                                     │
│                                                                     │
│  providers/apify-fb.mjs  ──▶  lib/parse-listing.mjs               │
│                               (year · price · mileage · VIN ·      │
│                                title · make · model)                │
│                          ──▶  lib/filters.mjs  (hard gate)         │
│                               make/model · year ≥ 2013             │
│                               price $2,500–$7,000                  │
│                               miles ≤ 165,000                      │
│                               title keywords (salvage/rebuilt/…)   │
│                               dedup vs scan-history.tsv            │
│                                                                     │
│  Survivors ──▶  data/pipeline.md  (inbox, timestamped)            │
│  Full dataset saved ──▶  data/parser-output/last-run-full.json    │
└──────────────────┬──────────────────────────────────────────────────┘
                   │  /carfinder pipeline  (LLM evaluation)
                   ▼
┌─────────────────────────────────────────────────────────────────────┐
│  Claude Code  —  A–H Evaluation  (modes/evaluate.md)               │
│                                                                     │
│  Block C: node lib/market-price.mjs    local comps, $0            │
│  Block E: node lib/vin-decode.mjs      NHTSA vPIC, $0             │
│                                                                     │
│  Outputs: reports/{###}-{year}-{make}-{model}.md                   │
│           Machine Summary YAML embedded in each report             │
│           data/listings.md row added                               │
│           data/scan-history.tsv updated                            │
└──────────────────┬──────────────────────────────────────────────────┘
                   │  node compare.mjs  /  /carfinder compare
                   ▼
┌─────────────────────────────────────────────────────────────────────┐
│  Leaderboard  —  compare.mjs                                        │
│  Parses Machine Summary YAML from all reports                       │
│  Score-first: ≥4.0 PURSUE · 3.0–3.9 CAUTION · <3.0 SKIP           │
│  Ranks: score → deal grade → reliability → distance                │
│  Writes: data/leaderboard.md                                        │
└─────────────────────────────────────────────────────────────────────┘

Quick Start

Prerequisites

1. Clone and install

git clone https://github.com/diwakar57/fb-marketplace-carfinder.git
cd fb-marketplace-carfinder
npm install

2. Add your Apify token

cp .env.example .env
# Then edit .env:
# APIFY_TOKEN=apify_api_YOUR_TOKEN_HERE
# Get it at: console.apify.com → Settings → Integrations → API tokens

3. Configure your buyer profile

Edit config/profile.yml — this is the only file you need to change:

buyer:
  location: { city: "Your City", state: "OH", zip: "45324" }
  drive_radius_mi: 100

budget:
  target: 6000    # ideal ceiling
  max: 7000       # absolute ceiling (only for a great deal)
  floor: 2500     # anything below this is bait/down-payment

criteria:
  makes: [Honda, Toyota]
  models: [Civic, Accord, Corolla, Camry]
  min_year: 2013
  max_mileage: 165000
  title: clean    # HARD GATE — non-clean titles are auto-rejected

4. Test offline first

node scan.mjs --self-test   # 10 fixture assertions, no tokens, no Apify
node scan.mjs --dry-run     # live fetch path, no file writes

5. Run a live scan

node scan.mjs               # scrapes FB, filters, writes survivors to data/pipeline.md

6. Evaluate and rank (in Claude Code)

/carfinder pipeline    # A–H evaluation of every pending listing → reports/
/carfinder compare     # ranked leaderboard → data/leaderboard.md

Or drop in a single listing anytime:

/carfinder https://www.facebook.com/marketplace/item/123456789/

All Commands

Node.js CLI (zero LLM cost)

Command What it does
npm run scan Live FB scan → filter → inbox
npm run scan:dry Dry run (no writes)
npm run scan:test Fixture unit tests
npm run compare Build/update leaderboard
npm run compare -- --all Include SKIP rows
npm run vin -- <VIN> [year] NHTSA VIN decode + mismatch check
npm run comps -- Honda Civic 2016 85000 6500 Local comp deal grade
node scan.mjs --from-file data/parser-output/last-run-full.json Re-gate saved dataset at $0
node scan.mjs --limit 25 Cap results (budget-aware)

Claude Code /carfinder skill

Command What it does
/carfinder <URL or listing text> Full A–H buy report for one car
/carfinder pipeline Evaluate every pending listing
/carfinder compare Leaderboard + recommendation
/carfinder contact <id> Draft a seller message + questions
/carfinder inspect <id> Model-specific inspection checklist
/carfinder tracker Status table of all evaluated cars
/carfinder batch Parallel evaluation for large queues

Scoring System

Every car that passes the hard gate is scored on 5 weighted dimensions:

Dimension Default weight What it measures
Deal 30% Price vs local private-party market comps
Reliability 25% Model-year known issues (data/reliability-kb.md)
Title confidence 20% VIN decode match, NICB check, seller transparency
Seller trust 15% Private vs dealer vs curbstoner signals
Scam safety 10% Inverse scam-signal score

Weights are configurable in config/profile.yml. Verdicts:

  • 🟢 PURSUE — score ≥ 4.0 and no critical scam flag
  • 🟡 CAUTION — score 3.0–3.9: worth it only if specific items check out
  • 🔴 SKIP — score < 3.0, any hard-gate failure, or any critical scam flag

Title is a hard gate, not a weight. Salvage/rebuilt/branded/flood listings are rejected before any scoring.

Deal grade table

Grade Delta vs market Score
Great ≥ 15% below 5.0
Good 5–15% below 4.0
Fair within ±5% 3.0
High 5–15% above 2.0
Overpriced > 15% above 1.0

Scam Detection

The agent checks every listing against a built-in catalog:

Signal Severity Action
Wire / Zelle / gift card / deposit to "hold" Critical Force 🔴 SKIP regardless of score
"Shipping", out of state, "military deployment" Critical Force 🔴 SKIP
Price > 30% below market (e.g. 2022 car at $3,000) High Major score penalty
Pushes off-platform ("WhatsApp only", "text me") High Flagged
BHPH dealer listing down-payment as the price Medium–High Caught by price floor + description
No VIN, stock photos, vague/copied description Medium Noted in report

Real scan result: 2 critical scams caught (2025 Civic at $2,500 and 2022 Corolla at $3,000) + 4 BHPH down-payment traps filtered automatically.


Cost Breakdown

Step Tool Cost
FB scraping (40 listings/run) Apify facebook-marketplace-scraper ~$0.25/run
Hard filter (parse + gate) Pure Node.js $0
Market comps Local comp from scraped data $0
VIN decode NHTSA vPIC API $0
NICB theft/total-loss check nicb.org/vincheck $0
A–H evaluation per car Claude (Claude Code) ~$0.02–0.05/car
Leaderboard builder Pure Node.js $0

Budget math: Apify free $5 → ~20 scans. Scan every 3 days = 2 months of hands-free coverage.

Set up recurring scans (Windows Task Scheduler)

schtasks /create /tn "CarFinder Scan" /tr "cmd /c cd /d \"C:\fb-marketplace-carfinder\" && node scan.mjs --limit 25 >> data\scan-cron.log 2>&1" /sc daily /mo 3 /st 08:00

Runs every 3 days at 8am. New listings land in data/pipeline.md automatically — you evaluate interactively whenever you want with /carfinder pipeline.


Reliability Knowledge Base

data/reliability-kb.md drives every Block D mechanical assessment:

Model Generation Risk Key thing to check
Honda Civic 9th gen 2012–2015 🟢 Low CVT fluid (2014–15 only); Si = 6MT (no CVT)
Honda Civic 10th gen 2016–2021 🟡 Trim-dependent 1.5T oil dilution in cold climate — prefer 2.0L NA; AC condenser (2016–18)
Honda Accord 9th gen 2013–2017 🟢 Excellent V6 VCM oil consumption + motor mounts; CVT fluid (4-cyl)
Honda Accord 10th gen 2018+ 🟡 Budget-limited High-mileage only in range; 1.5T oil dilution or 2.0T (prefer)
Toyota Corolla 10th gen 2013 🟢 Bulletproof Basic wear items only; 4-speed auto is dated but durable
Toyota Corolla 11th gen 2014–2019 🟢 Best overall CVT fluid; remarkably few complaints
Toyota Camry 7th gen 2012–2017 🟢 Excellent 2012–2014 2AR-FE oil consumption; 2015+ revised rings = much better
Toyota Camry 8th gen 2018+ 🟢 Excellent Usually above budget; high-mileage 2018 only

Project Layout

fb-marketplace-carfinder/
├── scan.mjs                       # Orchestrator: scrape → parse → gate → inbox
├── compare.mjs                    # Leaderboard from Machine Summary YAML blocks
│
├── lib/
│   ├── parse-listing.mjs          # Field normalization (year/price/mileage/VIN/title)
│   ├── filters.mjs                # Hard gate + soft flags
│   ├── market-price.mjs           # Local comp engine + mileage-adjusted deal grade
│   └── vin-decode.mjs             # NHTSA vPIC free decode + listing mismatch check
│
├── providers/
│   ├── apify-fb.mjs               # Apify actor input builder + raw response mapper
│   └── _http.mjs                  # Shared fetch wrapper
│
├── config/
│   ├── profile.yml                # YOUR spec — edit freely, never auto-overwritten
│   └── sources.yml                # Apify actor config + FB search URLs
│
├── modes/                         # Claude Code skill mode files (the LLM brain)
│   ├── _shared.md                 # Scoring rubric, scam catalog, verdict tiers
│   ├── evaluate.md                # Full A–H evaluation flow
│   ├── pipeline.md                # Batch inbox evaluation
│   ├── compare.md                 # Leaderboard mode
│   ├── contact.md                 # Seller message drafter
│   ├── inspect.md                 # In-person inspection checklist
│   ├── scan.md                    # Scan mode instructions
│   ├── tracker.md                 # Status overview
│   └── batch.md                   # Parallel evaluation for large queues
│
├── .claude/skills/carfinder/
│   └── SKILL.md                   # Claude Code skill router (enables /carfinder)
│
├── data/
│   ├── reliability-kb.md          # Model-year known issues knowledge base
│   ├── listings.md                # Tracker: one row per evaluated car
│   ├── pipeline.md                # Inbox: pending evaluations
│   ├── leaderboard.md             # Latest ranked leaderboard output
│   └── scan-history.tsv           # Dedup ledger (URL · date · result)
│
├── reports/                       # Per-car A–H buy reports
│   └── 003-2013-honda-accord-2026-06-09.md   # PURSUE 4.3/5 example
│
├── fixtures/
│   └── sample-listings.json       # Offline test data (10 fixture assertions)
│
├── .env.example                   # Token template (copy → .env)
└── package.json

Adding More Markets

The provider layer is built for multi-source support. To add Craigslist or OfferUp:

  1. Create providers/craigslist.mjs implementing mapItem(raw) and buildRunInput(config)
  2. Add a craigslist: block in config/sources.yml with enabled: true
  3. The scan orchestrator picks it up automatically

Roadmap

  • Phase 0 — Skill scaffold + mode routing
  • Phase 1 — Full A–H evaluation (manual listing paste)
  • Phase 2 — Apify FB intake + zero-token hard filter
  • Phase 3 — Free VIN/title checks + local market comps
  • Phase 4 — Leaderboard + scheduled scans + dedup
  • Phase 5 — Craigslist provider
  • Phase 5 — OfferUp provider
  • Phase 6 — Email/SMS alert when a PURSUE car appears
  • Phase 6 — Auto-draft contact message for new top picks
  • Phase 7 — Price-drop tracking (re-evaluate same listing if price falls)
  • Phase 8 — Multi-city support (run same config against multiple metro areas)

Contributing

Pull requests welcome. Before opening one:

  1. npm run scan:test — all 10 fixture assertions must pass
  2. Don't break the hard gate. Title safety is non-negotiable.
  3. Don't commit .env or real API keys.

For new providers, implement mapItem(rawItem) and buildRunInput(srcConfig) in a file under providers/, then enable it in config/sources.yml.


Security

  • Your Facebook account is never used. Apify handles all session management, residential proxies, and anti-bot.
  • .env is gitignored and will never be committed.
  • Rotate your Apify token regularly: console.apify.com → Settings → Integrations → API tokens.

License

MIT © 2026 Diwakar Khadka


Acknowledgments

Built with Claude Code (Anthropic) and Apify.

If this saved you from a scam or helped you find a great deal — star the repo ⭐ and open an issue with your story.

About

Automatically finds, vets, and rates clean-title used Hondas/Toyotas on Facebook Marketplace. Zero ban risk, zero-token filtering, free VIN checks, scam detection, and a ranked leaderboard. Built with Claude Code + Apify.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages