All projects
FastAPI · Playwright · background jobs

Your Prospect List, Scored, With a Reason to Call Each One

A FastAPI service that opens each website in a real browser and returns structured lead data. n8n, Make or a CRM sends the URL and gets the result pushed back to its webhook when it's ready, signed so it can trust it.

  • Website to a scored row in 14 s
  • FastAPI
  • Playwright
  • Python asyncio
  • Docker
How it connects
  1. CRM or GoHighLevel new prospect
  2. n8n or Make sends the URL by HTTP
  3. Lead Research API FastAPI · job queue
  4. Browser workers headless Chromium pool
  5. Back to the CRM signed webhook: score + reasons
Your tools The backend I build Where the data lands
0–100 Opportunity score with plain reasons, ready for a CRM field
Signed Results pushed to your webhook with an HMAC signature
The case

A Sample Result

  1. 01

    The test

    Kestlow Roofing, a made-up roofer put online only for this test, sent through an n8n form.

  2. 02

    The result

    A row in the sheet 14 seconds later: 55/100 and five reasons to call (Jobber but no online booking, no chat, no call or book button on the first phone screen, an old copyright year, no social profiles), with the phone and email cleaned up.

  3. 03

    Trying to break it

    A fake result, a private network address, a site that won't load and a request without a key: each one was refused or failed with a clear reason.

Output

What It Sends Back

  • An opportunity score (0–100) and the reasons, for example "No online booking: every enquiry waits for a call back"
  • Emails and phone numbers, cleaned and de-duplicated
  • The business's own social profiles, kept apart from customer or partner logos
  • The website platform, for example WordPress, Shopify, Wix or Webflow
  • Whether the site has a chat widget, a booking link or review links
  • Whether a customer can call, book or reach a form on the first phone screen, with a phone screenshot
  • The trade tools it spots (Jobber, Housecall Pro, ServiceM8, Calendly, GoHighLevel), flagged when there's no way to book online
  • It checks the contact page and a few linked pages before calling anything missing
  • Page title, SEO tags and the line where the business says what it does
Reliability

Built to Keep Running, Not Just to Demo

The same rules I check in every health check, and how this system handles them.

Errors

Every job ends as completed or failed, with the reason. Problems come back as clear HTTP codes.

Retries

Timeouts, network errors and rate limits are retried with exponential backoff; a site that blocks the browser opens a circuit breaker instead of being hammered. Webhook deliveries are retried too, and the job shows whether it arrived.

Keys

Every call needs an API key in the X-API-Key header. Every webhook is signed with HMAC-SHA256, so the receiver can check it came from this API.

Logs

JSON logs with a request ID and timing for every call.

When Traffic Grows

  • Chromium starts on the first job and closes again after a quiet period, so an idle server spends no memory on it.
  • New jobs wait in a bounded queue and get an answer straight away. Only a fixed number of browsers run at once, so memory stays flat during a burst.
  • The queue and the results store sit behind interfaces, so moving to Redis and Postgres for more volume changes only the adapters.

Keys and Client Data

  • API key on every request except the health checks; signed webhooks.
  • Refuses to visit or call back to private network addresses, so it can't be turned against the server it runs on.
  • Results are kept in memory only, never written to disk.