Leetcode API
Introducing the LeetCode API, a powerful tool that allows you to retrieve comprehensive information about leetcode and their user information. With multiple endpoints available, you can access various details of a user, including their profile information, submission history, coding contest participation, and more. Get unparalleled access to valuable user data and elevate your LeetCode…
Leetcode API endpoints
| Method | Endpoint | Description |
|---|---|---|
| User | ||
| GET |
getUserInfo() /user/{username} |
This End point let's you to get bare minimum details of the User. |
| GET |
getProblemsSolved() /user/{username}/solved |
This end point gives the total number os questions solved by a user. |
| GET |
getSubmissions() /user/{username}/submissions |
This endpoint returns back latest submissions made by a user. The limit query params can help you retrieve upto 22 maximum submissions. |
| GET |
getActiveYears() /user/{username}/active-years |
This end point gives you the information regarding the active years of user. You can pass year query to get in depth details of that year. |
| GET |
getContestsAttended() /user/{username}/contests |
This end point gives you the information regarding the users contests history. |
| GET |
getUserBadges() /user/{username}/badges |
This endpoint gives you all badges of the user. |
| Leetcode | ||
| GET |
getHistogram() /leetcode/histogram |
This histogram gives you information to build a histogram graph like structure one shown on leetcode website. |
| GET |
getTodaysQuestion() /leetcode/todays-question |
This end point will return you daily question by Leetcode. |
| GET |
getTop100() /leetcode/top-100 |
This end point retrieves you top 100 questions with certain filters. |
Leetcode API pricing
| Plan | Price | Rate limit | Quotas |
|---|---|---|---|
| BASIC | Free | 30 / hour |
|
| PRO | $5 / month | 10 / second |
|
| ULTRA Recommended | $15 / month | 5000 / second |
|