CodeChef Stats API
Competitive programming analytics for CodeChef handles, ratings, contest history, ranks, and daily activity.
Every canonical endpoint shares one response envelope across all platforms, so you can swap providers without rewriting your client. Legacy aliases stay available and are clearly marked.
Make your first request
Send a GET request to any handle. Replace tourist with the handle you want to inspect — no API key required.
# Fetch a CodeChef profile
curl /tourist/profile
Prefer a browser? Try the live playground, open /tourist/profile for raw JSON, or explore every route interactively in the OpenAPI explorer.
Response envelope
Successful responses follow one consistent shape. The data object carries the endpoint-specific payload while the outer fields stay identical everywhere.
{
"status": "success",
"platform": "codechef",
"handle": "tourist",
"cached": false,
"data": { ... }
}
Canonical endpoints
The canonical surface — build against these. Click any endpoint to see its path parameters and an example response.
| Name | Type | Description | |
|---|---|---|---|
handle | string | required | The CodeChef handle to look up. |
{
"status": "success",
"platform": "codechef",
"username": "tourist",
"cached": false,
"data": {
"totalSolved": 1263,
"totalActiveDays": 608,
"totalContests": 57,
"currentRating": 1745,
"maxRating": 1803,
"rank": "Knight",
"badgesCount": 24
}
}| Name | Type | Description | |
|---|---|---|---|
handle | string | required | The CodeChef handle to look up. |
{
"status": "success",
"platform": "codechef",
"username": "tourist",
"cached": false,
"data": {
"displayName": "Shaurya Rahlon",
"username": "tourist",
"avatar": "https://...",
"country": "India",
"countryFlag": "https://...",
"institution": "Jaypee Institute of Information Technology",
"company": null,
"bio": null,
"websites": [],
"social": {
"github": null,
"twitter": null,
"linkedin": null
},
"verified": false
}
}| Name | Type | Description | |
|---|---|---|---|
handle | string | required | The CodeChef handle to look up. |
{
"status": "success",
"platform": "codechef",
"username": "tourist",
"cached": false,
"data": {
"totalSolved": 859,
"totalQuestions": 3000,
"acceptanceRate": 65.5,
"byDifficulty": {
"easy": 267,
"medium": 472,
"hard": 120
},
"topicAnalysis": [
{
"topic": "Arrays",
"count": 506
},
{
"topic": "Dynamic Programming",
"count": 152
}
]
}
}| Name | Type | Description | |
|---|---|---|---|
handle | string | required | The CodeChef handle to look up. |
{
"status": "success",
"platform": "codechef",
"username": "tourist",
"cached": false,
"data": {
"topicAnalysis": [
{
"topic": "Arrays",
"count": 506
},
{
"topic": "Dynamic Programming",
"count": 152
},
{
"topic": "Graphs",
"count": 88
}
]
}
}| Name | Type | Description | |
|---|---|---|---|
handle | string | required | The CodeChef handle to look up. |
{
"status": "success",
"platform": "codechef",
"username": "tourist",
"cached": false,
"data": {
"count": 28,
"rating": 1745,
"maxRating": 1803,
"rank": "Knight",
"globalRanking": 38357,
"topPercentage": 5.0,
"history": [
{
"name": "Starters 175",
"date": "2026-01-31",
"timestamp": 1769817600,
"rating": 1745,
"ranking": 38357,
"problemsSolved": 3,
"totalProblems": 4
}
]
}
}| Name | Type | Description | |
|---|---|---|---|
handle | string | required | The CodeChef handle to look up. |
{
"status": "success",
"platform": "codechef",
"username": "tourist",
"cached": false,
"data": {
"current": 1745,
"max": 1803,
"history": [
{
"timestamp": 1769817600,
"rating": 1745,
"contestName": "Starters 175"
}
]
}
}| Name | Type | Description | |
|---|---|---|---|
handle | string | required | The CodeChef handle to look up. |
{
"status": "success",
"platform": "codechef",
"username": "tourist",
"cached": false,
"data": {
"totalSubmissions": 592,
"totalActiveDays": 608,
"currentStreak": 4,
"longestStreak": 138,
"maxDailySubmissions": 12,
"firstActiveDate": "2024-01-03",
"lastActiveDate": "2026-05-29",
"dailyContributions": [
{
"date": "2024-01-03",
"count": 3,
"level": 1
}
],
"yearlyContributions": [
{
"year": 2025,
"totalSubmissions": 320,
"activeDays": 120
}
]
}
}| Name | Type | Description | |
|---|---|---|---|
handle | string | required | The CodeChef handle to look up. |
{
"status": "success",
"platform": "codechef",
"username": "tourist",
"cached": false,
"data": {
"count": 0,
"active": null,
"list": []
}
}Legacy compatibility
Kept working for existing integrations. Prefer the canonical routes above for anything new.
| Name | Type | Description | |
|---|---|---|---|
handle | string | required | The CodeChef handle to look up. |
Deprecated alias — returns the standard envelope wrapping the legacy payload.
| Name | Type | Description | |
|---|---|---|---|
handle | string | required | The CodeChef handle to look up. |
Deprecated alias — returns the standard envelope wrapping the legacy payload.
| Name | Type | Description | |
|---|---|---|---|
handle | string | required | The CodeChef handle to look up. |
Deprecated alias — returns the standard envelope wrapping the legacy payload.