OJ API
Public API documentation

Access coding problem data through one unified API.

Query problem records, fetch daily challenges, search similar problems, and connect tool clients through MCP without switching between fragmented data sources.

Indexed problems
3853
Core sources
5
Version
v0.3.3
Authentication

Dual-state access rules

The docs pages stay public. API, status, and MCP access depend on whether token auth is enabled for this deployment.

Route Auth Disabled Auth Enabled
/ Public Public
/health Public Public
/api/v1/* Public Protected
/status Public Protected
/mcp Public Protected
Example

Canonical request

Start with a single problem-detail request to confirm auth, response shape, and source-key usage.

curl \
  -H "Authorization: Bearer <token>" \
  "http://127.0.0.1:7856/api/v1/problems/leetcode/1"