Codeforces API
Overview
Codeforces is a competitive programming platform, and its API lets you retrieve contest data, user statistics, problem sets, and submission results programmatically. Most read endpoints are public and require no authentication, making it easy to start exploring contest history and rankings immediately. It is commonly used to build leaderboards, personal coding trackers, and competitive programming analytics tools.
Beginner Tip
Most read-only methods like user.info and contest.list work without any API key — start with these to get familiar with the response format before setting up HMAC-SHA512 signed requests.
Available Data
Example Response
{
"status": "success",
"data": {
"result": "Data from Codeforces",
"description": "Get access to Codeforces data",
"timestamp": "2025-01-15T10:00:00Z"
}
} Field Reference
result[].handle The Codeforces username of the user. result[].rating Current Codeforces rating of the user (higher means more skilled). result[].maxRating Highest rating the user has ever achieved on Codeforces. result[].rank Text rank title corresponding to the current rating, such as newbie, specialist, or grandmaster. result[].contribution Number of contribution points the user has earned by creating problems and writing editorials. Implementation Example
const url = "https://codeforces.com/apiHelp";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
headers: {
"X-API-Key": "YOUR_API_KEY"
}
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data); What Can You Build?
Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.
Common Errors & Troubleshooting
Matrix Score Breakdown
Partially tested on Apr 5, 2026
Technical Specifications
Related Tags
Similar APIs
View All →Hackerearth
HackerEarth is a developer assessment platform, and its API lets you compile and execute code in over 30 programming languages programmatically.
Judge0 CE
⭐ Beginner's PickJudge0 CE is an open-source online code execution API that compiles and runs code in over 60 programming languages.
Mintlify
Mintlify is a documentation platform API that lets you programmatically generate and manage beautiful docs for your code projects.
KONTESTS
KONTESTS provides programmatic access to for upcoming and ongoing competitive coding contests via REST API.