DETECTBusiness workflows
Local Business Lead Generation Workflow
This project rebuilds the process for finding local business leads by integrating Ghostmap for discovery, custom code for factual checks, and TypeSafe's Jev via OpenRouter for repetitive classification, with Codex managing the workflow and deeper reviews.
TakeWe send compact public website excerpts with useful context through OpenRouter’s Decisions API.
I rebuilt how we find local business leads for our agency because the first list had more wrong entries than useful ones.
I wanted something we could actually work with, without checking every company again ourselves.
We now use Ghostmap for discovery, code for factual checks, and TypeSafe’s Jev through OpenRouter for repetitive classification. Codex builds the workflow and handles the deeper review.
Here’s the actual process.
Start with real Google Maps listings.
We use the open-source Ghostmap repo and its parser to collect businesses from searches like “Handwerker Gerolstein”, then expand across relevant business types and towns in Germany’s Eifel region.
Our first research batch produced 913 distinct Maps listings. We keep the listing, website and source timestamps so every record can be traced back.
Repo: Ghostmap
Filter before doing expensive work.
We remove duplicates, businesses outside the area, existing records and unsuitable categories. Then we compare business names, full addresses and contact information with the businesses’ own websites.
Moving the early filters ahead of website research reduced planned website checks from 717 to 613 in a replay: 14.5% fewer, while retaining all 114 businesses from our original selection.
Give Jev a small, specific job.
We send compact public website excerpts with useful context through OpenRouter’s Decisions API. Private CRM notes and previous rejection reasons stay local.
Jev answers four questions:
• What does this business actually offer?
• Does the text say the whole website is unfinished, or just a section?
• Are there explicit signs of relocation, closure or template contact details?
• Is this the business’s website, or a central branch/location-selection page?
Broad questions like “is this a good lead?” were creating too much ambiguity. These narrower questions give us decisions we can inspect and act on.
Let code handle things we can measure.
Mobile overflow, viewport settings, missing descriptions and captured phone links are checked directly.
A missing description becomes a small maintenance finding. It doesn’t become a claim that the business needs a completely new website.
Missing evidence, conflicting addresses and uncertain answers go into specific review queues. Codex can then investigate the actual missing piece.
Test the questions before trusting the improvement.
We developed the changes on 47 historical cases, froze the questions, then evaluated 89 separate cases.
Uncertain classifications dropped from 66 to 17.
Including three explicit source conflicts, the total needing additional clarification fell from 66 to 20. About 70% fewer cases needing that extra clarification step, with the confidence threshold still at 90%.
These are historical reference cases, not proof of a universal accuracy rate. Two previously rejected businesses still received normal model routing. Separate local checks now preserve those unresolved rejections before Jev is called.
Cache the work and keep the rules consistent.
The cache tracks the evidence text, questions, account and model version. Unchanged inputs reuse the result; fresh source checks still run separately. Previous rejections cannot be erased by a confident model answer.
In the latest run, 375 candidates reached classification. That stage took about 107 seconds: 260 new calls and 115 cached results. Website crawling and final review are additional work.
Running it again made zero new model calls.
The cost is the interesting part.
All 888 Jev calls across development, comparisons and actual runs used about 2.07 million input tokens and cost $0.087 in total. Less than nine cents in model charges.
For context, Jev’s listed input price is $0.042 per million tokens. GPT-6 Astra’s standard uncached API input price is $10 per million. That’s a 99.58% lower input-token rate for this narrow classification stage. Jev pricing · GPT-6 Astra pricing
That percentage is a unit-price comparison. We use Codex through a subscription, so it is not a measured reduction in our subscription bill or the total cost of finding a lead. We also haven’t timed an equivalent fully Codex-driven run.
The practical benefit is moving repetitive decisions out of the large-model workflow, reducing unnecessary fetches and reusing completed work. The larger model’s effort goes into building the system and investigating difficult cases.
The workflow also caught new source warnings in three businesses from our previous list. They now stay on hold before another export.
That is the consistency I want: the same checks for every business, evidence behind each finding, and a clear reason whenever something needs another look.



