API Overview
Introduction to the CodePlanet API
CodePlanet provides a REST API for accessing platform data programmatically.
Base URL
Authentication
Most endpoints require authentication via API key:
Get your API key from Settings → API Keys.
Response Format
All responses are JSON:
Error Response
Endpoints
Problems
| Method | Endpoint | Description |
|---|---|---|
| GET | /problems | List all problems |
| GET | /problems/:id | Get single problem |
| GET | /problems/daily | Today's challenge |
User
| Method | Endpoint | Description |
|---|---|---|
| GET | /user/profile | Your profile |
| GET | /user/stats | Your statistics |
| GET | /user/progress | Learning progress |
Leaderboard
| Method | Endpoint | Description |
|---|---|---|
| GET | /leaderboard | Top users |
| GET | /leaderboard/weekly | This week's ranking |
Rate Limits
Limits depend on your plan:
| Plan | Requests/Day |
|---|---|
| Free | 100 |
| Developer | 1,000 |
| Pro | 10,000 |
Rate limit headers:
SDKs
Official SDKs planned for future releases:
- JavaScript/TypeScript
- Python
- Go
Next: Authentication