On this page11
A backend API that turns Google and Bing search data into diagnosis, with checked AI analysis.
- Lines of code (about)
- 5,000
- Services
- 3
- Route modules
- 5
- Automation scripts
- 2
- Analytics lines
- 1,089
- Analysis stages
- 8
At a glance
- Area
- AI and computer vision
- My role
- Sole engineer: design, build, deploy and run
- Built with
- Node.js 22, Express, Google APIs, OAuth 2.0, Redis, JWT, Grok API, Bing Webmaster Tools
- Client
- TFI Co., an industrial company supplying blades and tooling
- Timeline
- February to July 2026, in five versioned phases
- Status
- Live in production
- Area
- AI and computer vision
- My role
- Sole engineer: design, build, deploy and run
- Built with
- Node.js 22, Express, Google APIs, OAuth 2.0, Redis, JWT, Grok API, Bing Webmaster Tools
- Client
- TFI Co., an industrial company supplying blades and tooling
- Timeline
- February to July 2026, in five versioned phases
- Status
- Live in production
The problem
TFI Co. depended on organic search for leads after its site moved to a new platform. The Search Console screens cannot be queried or joined to application data, its API is split into three products that return raw rows, and Bing went unmeasured.
At the start the site averaged a 2.28% click-through rate at position 26.8, with 220 pages carrying crawl errors.
What it does
Diagnosis
Traffic drops joined to live URL inspection
AI review
Checked output in a fixed shape
Coverage
Google and Bing, on every verified property
Diagnosis
Traffic drops joined to live URL inspection
AI review
Checked output in a fixed shape
Coverage
Google and Bing, on every verified property
Properties resolved live
Each request reads the verified properties from Google and finds the one that owns the URL, so a newly verified domain works with no deployment. An early fixed list could drift and give wrong answers without an error.
The analytics layer
Seven authenticated endpoints in 1,089 lines do analysis instead of passing rows through.
Rich results
A two-step lookup, because the API cannot filter by appearance while grouping by it.
Trends
Period-over-period change.
Anomalies
Outliers found with z-score and interquartile-range methods.
Rich results
A two-step lookup, because the API cannot filter by appearance while grouping by it.
Trends
Period-over-period change.
Anomalies
Outliers found with z-score and interquartile-range methods.
From symptom to cause
Search data shows that a page lost traffic. URL Inspection shows whether it can be indexed. One endpoint maps each detected drop onto its live inspection verdict in a single response.
An AI model behind a fixed contract
Single-URL analysis has eight stages, and the Grok model is stage seven. Its output is merged onto complete defaults, every field has its type checked, and values such as position bands must come from a fixed list.
The response keeps the same shape if the model succeeds, returns malformed JSON or is unavailable. A total failure returns a fallback flag and null scores.
Bing, sitemaps and automation
Bing Webmaster Tools
URL inspection and stored data.
Sitemaps
Submit, list, check and delete across verified properties.
Daily script
Submits articles, paced at one request per second, with a dry-run mode because a live submission cannot be taken back.
Weekly report
Crawl errors, top 100 pages, country data and sitemaps, generated in 1.10 seconds.
Bing Webmaster Tools
URL inspection and stored data.
Sitemaps
Submit, list, check and delete across verified properties.
Daily script
Submits articles, paced at one request per second, with a dry-run mode because a live submission cannot be taken back.
Weekly report
Crawl errors, top 100 pages, country data and sitemaps, generated in 1.10 seconds.
Key decisions
DecisionWhy
- Live lookup, not a cached list
- It costs one more API call per request, but a stale list fails silently.
- Validation at one boundary
- Checking at each caller would spread the same work and guarantee inconsistency.
- The faster model
- grok-3-mini answers in about 8 to 12 seconds against about 35 for grok-3. Nginx allows 60 seconds and its settings were out of scope.
DecisionWhy
- Live lookup, not a cached list
- It costs one more API call per request, but a stale list fails silently.
- Validation at one boundary
- Checking at each caller would spread the same work and guarantee inconsistency.
- The faster model
- grok-3-mini answers in about 8 to 12 seconds against about 35 for grok-3. Nginx allows 60 seconds and its settings were out of scope.
For engineers: how this was built
Result
Average position was 26.8 in a 28-day window in February 2026 and 18.4 in a 90-day window in March, while click-through rate went from 2.28% to 2.40%.
Once AI sits in a request path, the work shifts from calling the model to containing it.
Hiring for AI that runs in production?
Tell me about the role, or see next: the AI publishing platform, live on 8 channels and 32 websites.
- Section
- AI and computer vision
- Updated
- November 9, 2026
- Reading time
- 3 min read
Hiring for this kind of work?
Tell me about the role and I will reply by email.
Discuss a role with me
