API Documentation

RESTful API · JSON responses · Compatible with packages/core Rust types

GET/api/problems

Paginated problem list with filtering.

ParamTypeDefaultDescription
pagenumber1Page number
limitnumber20Items per page (1–100)
platformstringFilter by platform
searchstringFuzzy search
{ "total": 35114, "page": 1, "limit": 20, "total_pages": 1756, "items": [...] }
GET/api/problems/:iden

Problem detail in core-compatible format. Returns suggestions on 404.

{ "problem": {...}, "statements": [...], "meta": { "iden", "tags", "sample_group" } }
GET/api/problems/:iden/raw

Raw segmented data (paragraphs, samples, translations, formalizations).

GET/api/stats · /api/platforms

Database statistics and platform listing.

POST/api/fetch/codeforces

Fetch from Codeforces via browser proxy (Cloudflare bypass).

{ "url": "CF1A" }   // or { "urls": ["CF1A","CF2B"] }
POST/api/fetch/atcoder

Fetch from AtCoder.

{ "url": "abc300_a" }   // or { "urls": [...] }
POST/api/fetch/codeforces/contest · /api/fetch/atcoder/contest

Batch fetch by contest ID.

{ "contest_id": 566 }   // CF: number, AT: string e.g. "abc300"
Type Definitions
interface Problem {
  name: string;
  description: { content: string; description_type: "Markdown" | "Html" | "Typst" };
  platform: string;
  limit: { time_limit: number; memory_limit: number };  // ms / KB
  difficulty: { NumberStyle: number } | { LuoguStyle: string } | "None";
  is_remote: boolean; is_sync: boolean; sync_url: string | null; sign: string | null;
}

interface ProblemStatement {
  statement_type: "Markdown" | "Html" | "Pdf" | "Typst";
  content: string;
  is_translate: boolean;
  language: "Chinese" | "English" | "Japanese" | "Russian";
}
Notes
  • limit — time_limit (ms), memory_limit (KB)
  • difficulty — Rust serde externally-tagged enum format
  • Math — LaTeX, rendered with KaTeX on the client
  • CF fetch — Uses puppeteer-real-browser with auto-retry