API Reference
v1 · betaThe LeonidaSearch API serves structured, verification-labelled data for the GTA VI universe - the same data the website runs on. In production this lives at api.leonidasearch.com. Free tier: 1,000 requests/month. This is an independent fan project, not affiliated with Rockstar Games.
Verification labels in every response
✓ Official - Rockstar trailer / official source
◉ Reported - Reputable external report / press / leaks
◌ Community - User submitted / observed in footage
⚠ Speculation - Fan theory / prediction
Public endpoints
/api/healthauth: —Liveness check.
GET /api/health → {"status":"ok"}/api/entitiesauth: —All entities (pagination: ?limit=50&offset=0). Each entity carries verification, facts, relations and sources.
GET /api/entities?limit=2 → [{"slug":"lucia","type":"character","verification":"official",…}]/api/entities/{type}auth: —Entities of one type (vehicle, character, location, mission, weapon, business, collectible, activity, faction, feature).
GET /api/entities/vehicle?limit=5 → [ …vehicles… ]
/api/entities/{type}/{slug}auth: —Single entity with facts, relations, locations and sources.
GET /api/entities/character/lucia → {"slug":"lucia","name":"Lucia",…}/api/search?q={query}&type={type}auth: —Structured search. Returns ranked hits; each hit is a full entity with its verification label.
GET /api/search?q=lucia → {"count":11,"hits":[{"entity":{…},"score":9}]}/api/ai/searchauth: —AI-assisted answer. Uses DeepSeek when configured (admin panel); otherwise returns a local verified answer. Never invents facts.
POST /api/ai/search {"query":"when is gta 6 coming out"} → {"provider":"local","answer":"Officially November 19, 2026…"}/api/usersauth: —Users sorted by XP.
GET /api/users → [{"username":"User123","xp":12450,…}]/api/auth/registerauth: —Create an account (username, password, optional email). Returns a JWT.
POST /api/auth/register {"username":"newuser","password":"secret123","email":"u@x.com"} → 201 {"token":"…","user":{…}}/api/auth/loginauth: —Log in. Returns a JWT (24h). Banned accounts are rejected.
POST /api/auth/login {"username":"newuser","password":"secret123"} → 200 {"token":"…"}/api/submissionsauth: —Community submissions through the moderation pipeline.
GET /api/submissions → [{"id":"dsc-001","status":"verified","votes":214,…}]/api/submissionsauth: BearerSubmit a discovery (+10 XP). Enters the moderation pipeline.
POST /api/submissions {"type":"location","title":"…","description":"…"} → 201 {"id":"dsc-…","status":"pending"}/api/submissions/{id}/voteauth: BearerVote for a submission (once per user).
POST /api/submissions/dsc-001/vote → {"votes":215}/api/comments?entity={slug}auth: —Comments for an entity.
GET /api/comments?entity=lucia → [{"author":"alice","body":"…"}]/api/commentsauth: BearerAdd a comment (+3 XP).
POST /api/comments {"entitySlug":"lucia","body":"…"} → 201/api/public/settingsauth: —Public platform settings (analytics snippet). No secrets.
GET /api/public/settings → {"analyticsCode":""}Admin & moderation endpoints
JWT auth required. Moderator+ for settings and the pipeline; admin only for user management.
/api/admin/settingsauth: Bearer (mod+)Platform settings. The DeepSeek key is never returned in full.
GET /api/admin/settings → {"deepSeekConfigured":true,"deepSeekMasked":"sk-t••••7890"}/api/admin/settingsauth: Bearer (mod+)Update DeepSeek key, AI toggle, or analytics code.
POST /api/admin/settings {"aiEnabled":true,"analyticsCode":"<script>…</script>"}/api/admin/users?q={search}auth: Bearer (admin)List users (optional search by username, display name, email).
GET /api/admin/users?q=ali → {"total":1,"users":[{…}]}/api/admin/users/{username}auth: Bearer (admin)Ban/unban a user or change their role (member | moderator | admin).
PATCH /api/admin/users/alice {"banned":true} → {"username":"alice","banned":true}/api/submissions/{id}/statusauth: Bearer (mod+)Move a submission through the moderation pipeline. Verified awards the author +20 XP.
PATCH /api/submissions/dsc-001/status {"status":"verified"} → {"status":"verified"}/api/admin/send-test-emailauth: Bearer (mod+)Send a test email to your account (mock mode logs it when SMTP is unset).
POST /api/admin/send-test-email → {"sent":true,"smtpSet":false}Authentication
Register or log in to receive a JWT (valid 24h). Send it as Authorization: Bearer <token>. Rate limit: 120 requests/minute per IP. Content is verification-labelled - never treat Community or Speculation entries as confirmed game data.
Full run instructions, env vars and schema: see backend/README.md in the repository.