Is there any way still like I can get basic user information for their codechef profile like handle, contest rating, country Ranking, Globel Ranking, and the total number of questions solved all time?
Is there any way still like I can get basic user information for their codechef profile like handle, contest rating, country Ranking, Globel Ranking, and the total number of questions solved all time?
| # | User | Rating |
|---|---|---|
| 1 | Benq | 3792 |
| 2 | VivaciousAubergine | 3647 |
| 3 | Kevin114514 | 3603 |
| 4 | jiangly | 3583 |
| 5 | turmax | 3559 |
| 6 | tourist | 3541 |
| 7 | strapple | 3515 |
| 8 | ksun48 | 3461 |
| 9 | dXqwq | 3436 |
| 10 | Otomachi_Una | 3413 |
| # | User | Contrib. |
|---|---|---|
| 1 | Qingyu | 157 |
| 2 | adamant | 153 |
| 3 | Um_nik | 147 |
| 4 | Proof_by_QED | 146 |
| 5 | Dominater069 | 145 |
| 6 | errorgorn | 142 |
| 7 | cry | 139 |
| 8 | YuukiS | 135 |
| 9 | TheScrasse | 134 |
| 10 | chromate00 | 133 |
| Name |
|---|



Hey, see if this helps- https://codechef-api.vercel.app/{username} replace {username} with your codechef id
Thanks
direction_ the api worked for you?
yes
It's working.
This is not working now... My codechef handle is jai_kumar30 Could you please resolve the problem in my code? Am I doing something wrong?
// Fetch CodeChef data ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ async function fetchCodechefData() { const url=
https: //codechef-api.vercel.app/{jai_kumar30};try { const response=await fetch(url); if ( !response.ok) { throw new Error(`HTTP error ! status: $$$ { response.status }<br /><br /> '); }<br /><br /> const data=await response.json();<br /><br /> if (data.status==='OK') { const user=data.result; // Adjust based on the actual structure<br /><br /> document.getElementById('codechef-rating').textContent='Rating: $$$ { user.rating || 'Unrated' } `; } else { throw new Error('Failed to fetch data'); } } catch (error) { console.error('Error:', error); const ratingElement=document.getElementById('codechef-rating'); if (ratingElement) { ratingElement.textContent='Error fetching rating'; } else { console.error('Element not found'); } }} ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@J_A_I_KUMAR i think the error is here:
in the url you have to replace {username} with your username without the curly braces
try this: const url=https://codechef-api.vercel.app/jai_kumar30;
The deployment is temporarily paused. Can you please check?
Can there be an API for dead users as well? it will help a lot, as lot of programmers don't give contests upon reaching a desired rating range.
The deployment is paused now