API Reference

v1 · beta

The 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

GET/api/healthauth:

Liveness check.

GET /api/health → {"status":"ok"}
GET/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",…}]
GET/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… ]
GET/api/entities/{type}/{slug}auth:

Single entity with facts, relations, locations and sources.

GET /api/entities/character/lucia → {"slug":"lucia","name":"Lucia",…}
GET/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}]}
POST/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…"}
GET/api/usersauth:

Users sorted by XP.

GET /api/users → [{"username":"User123","xp":12450,…}]
POST/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":{…}}
POST/api/auth/loginauth:

Log in. Returns a JWT (24h). Banned accounts are rejected.

POST /api/auth/login {"username":"newuser","password":"secret123"} → 200 {"token":"…"}
GET/api/submissionsauth:

Community submissions through the moderation pipeline.

GET /api/submissions → [{"id":"dsc-001","status":"verified","votes":214,…}]
POST/api/submissionsauth: Bearer

Submit a discovery (+10 XP). Enters the moderation pipeline.

POST /api/submissions {"type":"location","title":"…","description":"…"} → 201 {"id":"dsc-…","status":"pending"}
POST/api/submissions/{id}/voteauth: Bearer

Vote for a submission (once per user).

POST /api/submissions/dsc-001/vote → {"votes":215}
GET/api/comments?entity={slug}auth:

Comments for an entity.

GET /api/comments?entity=lucia → [{"author":"alice","body":"…"}]
POST/api/commentsauth: Bearer

Add a comment (+3 XP).

POST /api/comments {"entitySlug":"lucia","body":"…"} → 201
GET/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.

GET/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"}
POST/api/admin/settingsauth: Bearer (mod+)

Update DeepSeek key, AI toggle, or analytics code.

POST /api/admin/settings {"aiEnabled":true,"analyticsCode":"<script>…</script>"}
GET/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":[{…}]}
PATCH/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}
PATCH/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"}
POST/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.