# OJHunt Lite — AI Agent Guide OJHunt Lite queries competitive programming Online Judge platforms and returns solved-problem statistics. Use the API to look up any user across 28+ OJs and compute deduplicated totals. ## Workflow To get a user's deduplicated solved-problem totals across platforms: 1. Call GET /api/crawlers/ to list available crawlers. 2. For each relevant crawler, call GET /api/crawlers/{crawler}/{username}. These calls are independent and can run in parallel. A user may have different usernames on different platforms — each call carries its own crawler/username pair. 3. Collect all responses (including errors — /api/merge skips them). 4. POST the full array of responses to /api/merge. Do not call /api/merge until all crawler queries have completed. The merge step handles aggregator cross-platform deduplication server-side. ## API Reference Full OpenAPI schema (all request/response shapes): http://ojhunt.com/openapi.json Interactive docs: http://ojhunt.com/docs ## Key endpoints GET http://ojhunt.com/api/crawlers/ List all available crawlers. GET http://ojhunt.com/api/crawlers/{crawler}/{username} Query a single crawler for a user's statistics. Returns a CrawlerResult object — pass it verbatim to POST /api/merge. POST http://ojhunt.com/api/merge Body: JSON array of CrawlerResult objects (verbatim GET responses above). Returns deduplicated totals: uniqueSolved and totalSubmissions. Handles VJudge cross-reference deduplication server-side. ## Available crawlers (33 total) aizu, atcoder, baekjoon, codechef, codeforces, codewars, cses, csg, csu, darkbzoj, dmoj, eolymp, hdu, hust, kattis, kilonova, lightoj, loj, luogu, nit, nod, nowcoder, ojuz, sdutoj, timus, tlx, toph, uoj, uva, vjudge, vnoj, yosupo, yukicoder ## Shell script template #!/bin/sh # Query multiple OJs for a user and get deduplicated totals BASE="http://ojhunt.com" USERNAME="tourist" # Collect results in parallel CF=$(curl -sf "$BASE/api/crawlers/codeforces/$USERNAME") AT=$(curl -sf "$BASE/api/crawlers/atcoder/$USERNAME") # Merge with deduplication (handles VJudge cross-referencing) curl -sf -X POST "$BASE/api/merge" \ -H "Content-Type: application/json" \ -d "[$CF,$AT]" ## Notes - Each query is independent: a user may have different usernames on different platforms. Pass each crawler/username pair separately and merge them all — /api/merge accepts mixed usernames in the same request. - Results with error=true are automatically skipped by /api/merge. - Aggregator problems (prefixed "codeforces-1A", "hdu-1000", etc.) are cross-referenced against native crawlers to avoid double-counting. - Some crawlers (CSES, VJudge) require server-side credentials — just call them normally; credentials are configured on the server.