The API to get user profiles, submissions, and problems on LeetCode, with highly customizable GraphQL API and Rate Limiter.
- Get Public User Profile.
- Get User's Recent Submissions. (Public, Max: 20)
- Get User Contest Records. (thanks to @laporchen)
- Get All Problem List, or with filter of difficulty and tags.
- Get Problem Detail.
- Get Daily Challenge.
- Get All Submissions of The Authenticated User.
- Get Submission Details, including the code and percentiles.
- Customable GraphQL Query API.
- Customable Rate Limiter. (Default: 20 req / 10 sec)
Includes recent submissions and posts.
import { LeetCode } from "leetcode-query";
const leetcode = new LeetCode();
const user = await leetcode.user("username");
import { LeetCode, Credential } from "leetcode-query";
const credential = new Credential();
await credential.init("YOUR-LEETCODE-SESSION-COOKIE");
const leetcode = new LeetCode(credential);
console.log((await leetcode.submissions(100, 0)));
Documentation for this package is available on https://jacoblincool.github.io/LeetCode-Query/.
- NPM Package: https://www.npmjs.com/package/leetcode-query
- GitHub Repository: https://github.com/JacobLinCool/LeetCode-Query/