alfaarghya/alfa-leetcode-api
关于
这是一个定制的 LeetCode API,提供用于获取用户个人资料、徽章、已解决题目、竞赛详情、竞赛历史、提交记录、日历,以及每日题目、精选题目和题目列表的端点。
效率与自动化实测星标增长
- 24小时
- -1
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文alfa-leetcode-api
The API for retrieving your LeetCode profile & Problems statistics
About ✨
At First, I struggled to find proper documentation for the leetcode.com/graphql. After scouring various articles about the LeetCode public API, I still couldn't find the comprehensive documentation I was looking for. Fueled by the desire to fill this gap I created alfa-leetcode-api.
alfa-leetcode-api is a custom solution born out of the need for a well-documented and detailed LeetCode API. This project is designed to provide developers with endpoints that offer insights into a user's profile, badges, solved questions, contest details, contest history, submissions, and also daily questions, selected problem, list of problems.
API URL 🌐
https://alfa-leetcode-api.onrender.com/
Run with docker 🐳
docker run -p 3000:3000 alfaarghya/alfa-leetcode-api:2.0.4
Endpoints 🚀
👤User Details
| Details | Endpoint | Description | Demo |
|---|---|---|---|
| Profile | /:username |
Get details about a user's profile. | click here |
| Full Profile | /:username/profile |
Get full profile details in one call | click here |
| Badges | /:username/badges |
Get the badges earned by the user. | click here |
| Solved | /:username/solved |
Get the total number of questions solved by the user. | click here |
| Contest | /:username/contest |
Get details about the user's contest participation. | click here |
| Contest History | /:username/contest/history |
Get all contest history. | click here |
| Submission | /:username/submission |
Get the last 20 submissions of the user. | click here |
| Limited Submission | /:username/submission?limit=number |
Get a specified number of the user's last submissions. | click here |
| Accepted Submission | /:username/acSubmission |
Get the last 20 accepted submission of the user. | click here |
| Limited Accepted Submission | /:username/acSubmission?limit=7 |
Get a specified number of the user's last accepted submission. | click here |
| Calendar | /:username/calendar |
Get the user's submission calendar. | click here |
| Calendar with year | /:username/calendar?year=2025 |
Get the user's submission calendar with year query |
click here |
| Skill Stats | /:username/skill |
Get the user's skill stats. | click here |
| Lang Stats | /:username/language |
Get the language stats of a user | click here |
| Question Progress | /:username/progress |
Get your question progress | click here |
❓Questions Details
| Details | Endpoint | Description | Demo |
|---|---|---|---|
| Daily Problem | /daily |
Get the daily question. | click here |
| Daily Problem Raw | /daily/raw |
Get the daily question in raw. | click here |
| Selected Problem | /select?titleSlug=selected-question |
Get details about a selected-question. | click here |
| Raw Selected Problem | /select/raw?titleSlug=selected-question |
Get raw selected question | click here |
| Tags | /tags |
Get a list of all problem topic tags. | |
| Problems | /problems |
Get a list of 20 problems. | click here |
| Limited Problems | /problems?limit=number |
Get a list of a specified number of problems. | click here |
| Filter Problems | /problems?tags=tag1+tag2 |
Get a list of problems based on selected tags. | click here |
| Skip Problems | /problems?skip=number |
Get a list of 20 problems, skipping a specified number of problems. | click here |
| Difficulty | /problems?difficulty=EASY |
Get a list of difficulty based problems, use MEDIUM to get medium level, HARD to get Hard level . | click here |
| Filter & Limited Problems | /problems?tags=tag1+tag2+tag3&limit=number |
Get a list of a specified number of problems based on selected tags. | click here |
| Skip & Limited Problems | /problems?limit=number&skip=number |
Get a list of a specified number of problems skipping a specified number of problems. | click here |
| Skip & Filter & Limited Problems | /problems?tags=tag1+tag2+tag3&limit=number&skip=number |
Get a list of a specified number of problems based on selected tags skipping a specified number of problems. | click here |
| Official Solution | /officialSolution?titleSlug=selected-question |
Get the official solution(leetcode) for a question | click here |
🏆 Contests
| Details | Endpoint | Description | Demo |
|---|---|---|---|
| All Contests | /contests |
Get all the contests | click here |
| Upcoming Contests | /contests/upcoming |
Get the upcoming contests. | click here |
🗪 Discussion
| Details | Endpoint | Description | Demo |
|---|---|---|---|
| Trending Discussion | /trendingDiscuss?first=20 |
Get top 20 trending discussions | click here |
| Discussion Topic | /discussTopic/:topicId |
Get discussion topic | click here |
| Discussion Comment | /discussComments/:topicId |
Get discussion comments | click here |
💡 Rate Limit
I've implemented a rate limit to prevent any potential server overload issues.
‼️ Note
During development, it's recommended to utilize the API locally. To do so, you can use docker image of our api.
MCP server integration 🤖
Follow this documentation MCP.md
Wanna Contribute 🤔??
Follow this documentation CONTRIBUTING.md
Author ✒️
Contributor ✏️
| Contributor | Contribution |
|---|---|
| @aryanpingle | AC submission |
| @jamesh48 | TypeScript Refactoring |
| @kvqn | PORT environment variable |
| @changchunlei | New Endpoints - language stats, integrated user profile, contest and discussions |
| @merakesh99 | Hot reload issue solved |
| @ajchili | Skip param to fetch problems |
| @theinit01 | Temp fix for skip |
| @sazsu | Docs improvements (capitalization, clarity, typo fixes) |
| @123xylem | Add Descriptions and Methods to API route documentation. |
| @P-M-Manmohan | Added filtering based on difficulty |
| @Ar0manKhan | Raw selected question API (/select/raw) |
| @Ahmed-Armaan | Update DOCS example with images |
| @Ayushman2004 | Contest API endpoints |
| @devroopsaha744 | MCP server |
| @nickbar01234 | Added Zod schema for contest route |
| @DarrylMathias | Updated demo images and typo fixes |
| @Morgan-Ngetich | Added Swagger documentation |
Connect with me 📲
探索相关项目
加载中…