Field reports · X thread intelligencePowered by Grok
GrokLensX Intelligence
Project file — Open sourceSubject: X / TwitterLicense: MIT

Turn any X post or thread into a structured intelligence brief.

Paste a post URL. GrokLens rebuilds the conversation from public endpoints — the focal post, its parent chain, and any quoted post, no X account or API key needed — then Grok distills it into a report you can read in thirty seconds.

Open the live demo → Read the code

This page is a static introduction. The analyzer itself is a Python service and runs at demo.pid.loc.cc.

How it works

Step 01

Rebuild the conversation

The fetcher tries X's guest GraphQL endpoint first, then the syndication endpoint, walking up the reply chain as far as the data goes. Threads are cached in SQLite.

Step 02

Grok reads it

The rebuilt thread goes to the Grok API, which returns strict JSON: summary, claims, sentiment, entities. Output is schema-validated, with one repair retry.

Step 03

Or, offline mode

No API key? A built-in extractive analyzer produces the same report format and labels itself "Offline demo mode" on the page. No fake AI output.

Anatomy of a report

Field specs

Stack
Python · FastAPI · SQLite
Memory
≈ 60 MB RSS
Interfaces
Web UI · REST API · CLI
Languages
English / 中文 UI
Tests
pytest, fixtures + live audit
Hosting
One small VPS, systemd + Caddy

Stated plainly

Public X endpoints have limits: long-form posts can arrive truncated, and a full self-thread can't always be pulled from a single URL — for those, GrokLens has a paste-text mode. The live demo currently runs in offline mode; with Grok for Builders access, it switches to full Grok analysis. The code is MIT-licensed and the audit notes are in the repository.