Discover/LeetCode API
live

LeetCode APIleetcode.com ↗

Search LeetCode problems by difficulty and tag, list contests, and fetch public user profiles and contest history via a clean REST API.

Endpoint health
verified 5d ago
search_problems
list_contests
get_user_profile
get_user_contest_history
4/4 passing latest checkself-healing
Endpoints
4
Updated
19d ago

What is the LeetCode API?

This API exposes four endpoints covering LeetCode's core public data: problem search, contest listings, user profiles, and contest participation history. Use search_problems to query the full problem set with filters for difficulty, topic tags, and category, then pull per-user stats like accepted submission counts broken down by difficulty or a full contest rating timeline from get_user_contest_history.

This call costs1 credit / call— charged only on success
Try it
Number of problems to skip for pagination (offset).
Comma-separated topic tag slugs to filter by (e.g. 'array,hash-table,dynamic-programming').
Maximum number of problems to return per page.
Search keyword to filter problems by title (e.g. 'two sum', 'binary tree').
Category slug filter. Accepts: algorithms, database, shell, concurrency. Empty string returns all categories.
Difficulty filter. Accepts exactly one of: EASY, MEDIUM, HARD. Case-insensitive input is uppercased internally.
→ api.parse.bot/scraper/e4e91877-8a33-4462-b5ed-1a5cd60da1f0/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/e4e91877-8a33-4462-b5ed-1a5cd60da1f0/search_problems?skip=0&tags=array&limit=5&keyword=two+sum&category=algorithms&difficulty=EASY' \
  -H 'X-API-Key: $PARSE_API_KEY'
All endpoints · 4 totalmissing one? ·

Search and filter LeetCode problems. Supports keyword search, difficulty filtering, topic tag filtering, category filtering, and offset-based pagination. Returns problems sorted by question number. Each problem includes acceptance rate, difficulty, question ID, paid-only status, title, slug, and topic tags.

Input
ParamTypeDescription
skipintegerNumber of problems to skip for pagination (offset).
tagsstringComma-separated topic tag slugs to filter by (e.g. 'array,hash-table,dynamic-programming').
limitintegerMaximum number of problems to return per page.
keywordstringSearch keyword to filter problems by title (e.g. 'two sum', 'binary tree').
categorystringCategory slug filter. Accepts: algorithms, database, shell, concurrency. Empty string returns all categories.
difficultystringDifficulty filter. Accepts exactly one of: EASY, MEDIUM, HARD. Case-insensitive input is uppercased internally.
Response
{
  "type": "object",
  "fields": {
    "total": "integer - total number of problems matching the filters",
    "questions": "array of Problem objects with acRate, difficulty, frontendQuestionId, paidOnly, title, titleSlug, topicTags"
  },
  "sample": {
    "data": {
      "total": 410,
      "questions": [
        {
          "title": "Two Sum",
          "acRate": 57.6,
          "paidOnly": false,
          "titleSlug": "two-sum",
          "topicTags": [
            {
              "name": "Array",
              "slug": "array"
            },
            {
              "name": "Hash Table",
              "slug": "hash-table"
            }
          ],
          "difficulty": "Easy",
          "frontendQuestionId": "1"
        }
      ]
    },
    "status": "success"
  }
}

About the LeetCode API

Problem Search

The search_problems endpoint accepts up to six filter parameters: keyword (title substring), difficulty (EASY, MEDIUM, or HARD), tags (comma-separated slugs such as array,hash-table,dynamic-programming), category (algorithms, database, shell, or concurrency), and skip/limit for offset-based pagination. Each item in the questions array carries acRate, difficulty, frontendQuestionId, paidOnly, title, titleSlug, and a topicTags list. The total field reflects the full count matching your filters, so you can page through results reliably.

Contests

list_contests returns every weekly and biweekly contest in a single response ordered by most recent first — no pagination required. Each contest object includes title, titleSlug, startTime (Unix timestamp), duration in seconds, originStartTime, and containsPremium. The total field gives the overall contest count.

User Profiles and Contest History

get_user_profile accepts a username and returns a profile object (realName, aboutMe, userAvatar, reputation, ranking, company, school, websites, countryName, skillTag) alongside submitStatsGlobal, which breaks accepted submission counts down by difficulty level. If the username does not exist the endpoint returns stale_input with kind input_not_found rather than a 404, so callers should check the response structure.

get_user_contest_history returns a contestRanking summary (attendedContestsCount, rating, globalRanking, totalParticipants, topPercentage, badge) that is null when the user has never participated in a rated contest. The contests array contains per-contest records including problemsSolved, totalProblems, finishTimeInSeconds, current rating, and trendDirection for rating change direction.

Reliability & maintenanceVerified

The LeetCode API is a managed, monitored endpoint for leetcode.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when leetcode.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.

This isn't an official leetcode.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.

Last verified
5d ago
Latest check
4/4 endpoints passing
Maintenance
Monitored & self-healing
Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • Build a study planner that pulls MEDIUM dynamic-programming problems via search_problems and tracks which ones a user has solved
  • Monitor contest schedules by polling list_contests and alerting when a new weekly or biweekly contest is added
  • Display a competitor's rating trajectory by charting the per-contest rating values from get_user_contest_history
  • Identify premium-only problems in a topic area by filtering paidOnly from search_problems results
  • Compare two users' global rankings and accepted submission counts using get_user_profile for each
  • Populate a leaderboard for an internal coding challenge using contestRanking.globalRanking and topPercentage fields
  • Filter shell or database category problems for non-algorithm interview prep using the category parameter in search_problems
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo2005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 req/min
Team$300/mo20,000300 req/min
Company$1,000/mo100,000500 req/min

Each endpoint has a fixed posted price per successful call — most fall between 1 and 10 credits — shown on this API's page before you run it. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.

Frequently asked questions
Does LeetCode have an official developer API?+
LeetCode does not publish an official public REST API or developer documentation for third-party access to its problem set, contest, or user data.
How does problem pagination work in `search_problems`?+
Pagination is offset-based. Pass skip to set the starting offset and limit to control page size. The total field in the response reflects the full count matching your current filters, so you can calculate how many pages remain by dividing total by your limit.
What happens when `get_user_contest_history` is called for a user who has never entered a contest?+
The contestRanking field returns null and attendedContestsCount will be zero. The contests array will be empty. The endpoint still returns a valid response rather than an error.
Does the API return the full problem description or test cases?+
No. search_problems returns metadata only: title, slug, difficulty, acceptance rate, topic tags, and paid-only status. Full problem statements and test cases are not included. You can fork this API on Parse and revise it to add an endpoint that fetches the full problem content by titleSlug.
Does the API expose a user's submission history or individual solution code?+
Not currently. The API covers aggregate accepted submission counts by difficulty via submitStatsGlobal in get_user_profile, but individual submission records and solution code are not exposed. You can fork this API on Parse and revise it to add a submissions endpoint if that data is publicly accessible on LeetCode.
Page content last updated . Spec covers 4 endpoints from leetcode.com.
Related APIs in Developer ToolsSee all →
codechef.com API
Access competitive programming data from CodeChef by retrieving problem lists, contest information with details, user profiles, and recent submission history. Explore coding challenges across multiple contests and browse problems by difficulty rating.
neetcode.io API
Access curated coding problem collections including Core Skills, Blind 75, NeetCode 150, and NeetCode 250, along with detailed problem solutions and course content organized by chapters and lessons. Perfect for preparing for technical interviews and mastering data structures and algorithms through structured learning paths.
pbinfo.ro API
Search and browse programming problems from pbinfo.ro, a Romanian informatics learning platform, with detailed information including problem statements, constraints, and metadata. Discover problems by keyword search or explore them by category with easy pagination through organized collections.
cses.fi API
Explore the CSES Problem Set by browsing problems across different categories, viewing detailed problem information, and discovering available courses and contests. Access comprehensive problem lists organized by topic to find coding challenges tailored to your learning goals.
hackerrank.com API
Retrieve challenge scores, difficulty ratings, success ratios, and track-level ranking data from HackerRank's public practice platform. Browse challenges by track, view submission statistics, and access ranking metrics across all available tracks.
linkedin.com API
Search LinkedIn job listings by job type, experience level, workplace type, salary range, and date posted, then retrieve detailed information about specific positions. Build job boards, career tools, or recruitment dashboards with access to comprehensive filtering options across LinkedIn's public job listings.
imo-official.org API
Access comprehensive International Mathematical Olympiad data including competition problems, shortlists, results by year, and participant information from the official IMO records. Retrieve hall of fame listings, search for specific competitors, and download problem sets and related materials from past competitions.
challenges.darkintaqt.com API
Search for League of Legends challenges by name or description to quickly find specific in-game objectives and track your progress toward completing them. Browse detailed information about each challenge to plan your gameplay strategy and discover new goals to pursue.