Skip to main content
CodePlanet Docs

API Overview

Introduction to the CodePlanet API

CodePlanet provides a REST API for accessing platform data programmatically.

Base URL

https://codeplanet.dev/api/v1

Authentication

Most endpoints require authentication via API key:

curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://codeplanet.dev/api/v1/problems

Get your API key from Settings → API Keys.

Response Format

All responses are JSON:

{
  "success": true,
  "data": { ... },
  "meta": {
    "total": 100,
    "page": 1,
    "limit": 20
  }
}

Error Response

{
  "success": false,
  "error": "Error message",
  "code": "ERROR_CODE"
}

Endpoints

Problems

MethodEndpointDescription
GET/problemsList all problems
GET/problems/:idGet single problem
GET/problems/dailyToday's challenge

User

MethodEndpointDescription
GET/user/profileYour profile
GET/user/statsYour statistics
GET/user/progressLearning progress

Leaderboard

MethodEndpointDescription
GET/leaderboardTop users
GET/leaderboard/weeklyThis week's ranking

Rate Limits

Limits depend on your plan:

PlanRequests/Day
Free100
Developer1,000
Pro10,000

Rate limit headers:

X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1706200000

SDKs

Official SDKs planned for future releases:

  • JavaScript/TypeScript
  • Python
  • Go

Next: Authentication

On this page