The most powerful, high-performance API to fetch CodeChef user data.
Build leaderboards, analytics dashboards, and stunning portfolios in minutes.
Built for performance and scalability.
Powered by Cheerio and Node-Cache. Responses are cached for 1 hour to ensure sub-millisecond latency.
Fetch data for up to 100 users in a single request. Perfect for college clubs and organizations.
Clean JSON responses, granular endpoints, and pre-built embeddable widgets for your site.
/handle/{username}
Get full profile data including ratings, ranks, and heatmap.
https://sm-codechef.vercel.app/handle/gennady.korotkevich
/api/users
New
Fetch multiple users at once. Ideal for leaderboards.
https://sm-codechef.vercel.app/api/users?handles=neal,gennady.korotkevich
/api/rating/{username}
Get only rating history data (lighter response).
https://sm-codechef.vercel.app/api/rating/neal
/handle/{username}?fields={...}
Advanced
Fetch only specific data fields to reduce payload size.
Available fields: contestCount, currentRating, highestRating, stars, globalRank, countryRank, profile, totalProblemsSolved, lastRatingChange
https://sm-codechef.vercel.app/handle/neal?fields=stars,currentRating,globalRank
Response Preview:
{
"success": true,
"status": 200,
"stars": "7★",
"currentRating": 2650,
"globalRank": 12
}
/handle/{username}
Returns comprehensive data about a user, including their current rating, ranks, submission heatmap, and rating history.
{
"success": true,
"status": 200,
"profile": "https://cdn.codechef.com/sites/...",
"name": "Gennady Korotkevich",
"currentRating": 3979,
"highestRating": 3979,
"countryFlag": "https://cdn.codechef.com/...",
"countryName": "Belarus",
"globalRank": 1,
"countryRank": 1,
"stars": "7★",
"totalProblemsSolved": 1680,
"contestCount": 85,
"lastRatingChange": 0,
"heatMap": [
{ "date": "2023-10-01", "value": 5 },
{ "date": "2023-10-02", "value": 12 }
],
"ratingData": [
{ "code": "COOK100", "getyear": "2018", "getmonth": "10", "getday": "21", "reason": "Cook-Off", "penality": 0, "rank": "1", "rating": "3000" }
]
}
/api/users
Returns a list of lightweight user objects. Does not include heavy data like heatmaps or full rating history to ensure fast response times.
{
"success": true,
"users": [
{
"success": true,
"status": 200,
"profile": "https://cdn.codechef.com/...",
"name": "Neal Wu",
"currentRating": 2650,
"highestRating": 2700,
"countryName": "United States",
"globalRank": 12,
"stars": "6★"
},
{
"success": true,
"status": 200,
"profile": "https://cdn.codechef.com/...",
"name": "Gennady",
"currentRating": 3979,
"stars": "7★"
}
]
}
/api/rating/{username}
Returns only the array of rating changes for a user. Useful for building custom charts or analyzing contest performance over time.
{
"success": true,
"ratingData": [
{
"code": "START100",
"getyear": "2023",
"getmonth": "08",
"getday": "30",
"reason": "Starters 100",
"penality": 0,
"rank": "5",
"rating": "2650"
},
{
"code": "COOK140",
"getyear": "2023",
"getmonth": "07",
"getday": "15",
"reason": "Cook-Off",
"penality": 0,
"rank": "12",
"rating": "2610"
}
]
}
/api/heatmap-data/{username}
Returns raw heatmap data points. Each object represents a day with submissions.
{
"success": true,
"heatMap": [
{
"date": "2023-10-01",
"value": 5
},
{
"date": "2023-10-02",
"value": 12
},
{
"date": "2023-10-03",
"value": 0
}
]
}
<iframe src="https://sm-codechef.vercel.app/heatmap/{handle}?theme=night" width="100%" height="200"></iframe>
<iframe src="https://sm-codechef.vercel.app/rating/{handle}" width="100%" height="400"></iframe>