Discover/CSES API
live

CSES APIcses.fi

Access CSES problem lists, full problem statements, category filters, courses, and contests via a structured JSON API with 5 endpoints.

Endpoint health
verified 3d ago
get_problems_by_category
get_courses_list
get_problem_set_list
get_problem_detail
get_contests_list
5/5 passing latest checkself-healing
Endpoints
5
Updated
26d ago

What is the CSES API?

The CSES API gives programmatic access to the cses.fi competitive programming platform across 5 endpoints, returning problem lists grouped by category, full problem statements with time and memory limits, and catalogs of courses and contests. The get_problem_detail endpoint alone returns 10 structured fields per problem, including description text, input/output format, constraints, and example cases.

Try it

No input parameters required.

api.parse.bot/scraper/1b9e55e4-6851-41ea-ba8a-1383ad8800c0/<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/1b9e55e4-6851-41ea-ba8a-1383ad8800c0/get_problem_set_list' \
  -H 'X-API-Key: $PARSE_API_KEY'
Python SDK · recommended

Typed, relational, agent-ready

A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.

  • Fully typed · autocompletes
  • Objects link to objects
  • Typed errors & pagination

Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:

uv add parse-sdk
uv run parse init
uv run parse add --marketplace cses-fi-api

uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.

"""CSES Problem Set API — browse categories, drill into problems, explore resources."""
from parse_apis.cses_problem_set_api import CSES, ProblemCategory, NotFoundError_

client = CSES()

# List all categories and print their names + problem counts.
for cat in client.categories.list(limit=5):
    print(cat.name, len(cat.problems))

# Get a specific category by enum, then inspect its first problem summary.
dp = client.categories.get(name=ProblemCategory.DYNAMIC_PROGRAMMING)
first_problem = dp.problems[0]
print(first_problem.name, first_problem.task_id, first_problem.stats)

# Drill from a summary into the full problem detail.
detail = first_problem.details()
print(detail.title, detail.time_limit, detail.memory_limit)
for ex in detail.examples:
    print(ex.input, "->", ex.output)

# Fetch a problem directly by task_id.
try:
    problem = client.problems.get(task_id="1068")
    print(problem.title, problem.technique)
except NotFoundError_ as exc:
    print(f"problem not found: {exc}")

# List courses and contests.
for course in client.courses.list(limit=3):
    print(course.name, course.url)

for contest in client.contests.list(limit=3):
    print(contest.name, contest.description)

print("exercised: categories.list / categories.get / problems.get / ProblemSummary.details / courses.list / contests.list")
All endpoints · 5 totalmissing one? ·

Returns all problems in the CSES Problem Set grouped by category. Each category contains its name and a list of problem summaries with task IDs, acceptance stats, technique hints, and URLs. Single-page response; no pagination parameters.

Input

No input parameters required.

Response
{
  "type": "object",
  "fields": {
    "categories": "array of category objects, each containing category name and problems array"
  },
  "sample": {
    "data": {
      "categories": [
        {
          "category": "Introductory Problems",
          "problems": [
            {
              "url": "https://cses.fi/problemset/task/1068",
              "name": "Weird Algorithm",
              "stats": "167888 / 175510",
              "task_id": "1068",
              "technique": "Simulation (Collatz conjecture)"
            }
          ]
        }
      ]
    },
    "status": "success"
  }
}

About the CSES API

Problem Set Browsing

The get_problem_set_list endpoint returns every problem on the CSES Problem Set organized into category objects. Each category contains an array of problems with their names, numeric task_id values, acceptance statistics, suggested technique labels, and direct URLs. This gives a full structural snapshot of the problem set in one call — no parameters required.

To drill down to a specific topic, get_problems_by_category accepts a category string (e.g. 'Dynamic Programming', 'Graph Algorithms', 'Sorting and Searching') and returns matching problems with the same per-problem fields: name, task_id, stats, technique, and url.

Problem Detail

get_problem_detail takes a single required parameter — task_id — and returns the complete problem statement. Response fields include title, description, input_format, output_format, constraints, time_limit (e.g. '1.00 s'), memory_limit (e.g. '512 MB'), a technique hint, and an examples array with input / output pairs. This is enough to render a full problem view or feed it into automated analysis.

Courses and Contests

get_courses_list and get_contests_list each return flat arrays of objects with name, description, and url. These cover the educational courses hosted on CSES alongside any active or past contests, making it straightforward to enumerate the full learning and competition offering alongside the problem data.

Reliability & maintenanceVerified

The CSES API is a managed, monitored endpoint for cses.fi — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when cses.fi 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 cses.fi 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
3d ago
Latest check
5/5 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 personal study tracker that maps CSES problems by category using get_problems_by_category and tracks which technique labels appear most often.
  • Render full problem statements in a custom offline reader using the description, input_format, output_format, and examples fields from get_problem_detail.
  • Generate flashcard decks for competitive programming techniques by extracting the technique field across all problems returned by get_problem_set_list.
  • Create a difficulty or acceptance-rate leaderboard by aggregating the stats field from problems across all categories.
  • Enumerate CSES courses and contests for a competitive programming resource directory using get_courses_list and get_contests_list.
  • Automate problem recommendation by filtering categories and cross-referencing technique hints against a user's solved-problem history.
  • Index the full CSES problem corpus into a search engine using title, description, and constraints from bulk get_problem_detail calls.
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 req/min

One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.

Frequently asked questions
Does cses.fi have an official developer API?+
No. cses.fi does not publish an official public API or developer documentation for programmatic access to its problem set or contest data.
What does `get_problem_detail` return beyond the problem text?+
get_problem_detail returns 10 fields: title, task_id, description, input_format, output_format, constraints, time_limit, memory_limit, technique, and an examples array. Each object in examples contains an input string and an output string matching the sample cases shown on the problem page.
Does the API return user submission history or solution code?+
Not currently. The API covers problem metadata, full problem statements, courses, and contests. User accounts, submission records, accepted solutions, and personal statistics are not exposed. You can fork this API on Parse and revise it to add an endpoint targeting submission or leaderboard data if that access is available without authentication.
Are editorial or solution hints included in the problem detail response?+
Not currently. The get_problem_detail response includes a technique field with a short label for the suggested approach, but full editorial text and solution explanations are not part of the response. You can fork this API on Parse and revise it to add an editorial endpoint if that content is accessible on cses.fi.
How specific are the category names accepted by `get_problems_by_category`?+
The category parameter must match a category name as it appears in the CSES Problem Set — for example, 'Introductory Problems', 'Sorting and Searching', or 'Dynamic Programming'. You can retrieve the full list of valid category names by calling get_problem_set_list first and extracting the category name field from each returned category object.
Page content last updated . Spec covers 5 endpoints from cses.fi.
Related APIs in EducationSee 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.
leetcode.com API
Search and filter LeetCode coding problems by difficulty, category, and tags, browse upcoming programming contests, and view public user profiles including their problem statistics and submission history. Perfect for finding practice problems, tracking competition schedules, and researching other coders' progress.
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.
quizbowlpackets.com API
Search and browse thousands of quizbowl question sets across all competition levels, then access detailed metadata like difficulty, subjects, and download links for each packet. Find the perfect practice materials for High School, Collegiate, Middle School, or Pop Culture quizbowl competitions.
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.
takeuforward.org API
Access Striver's complete A2Z and SDE DSA sheets along with detailed problem information and TUF+ subscription pricing directly from takeuforward.org. Streamline your interview preparation by retrieving curated coding problems, their solutions, and course pricing all in one place.
hyperskill.org API
Explore Hyperskill.org's learning content by browsing tracks, projects, stages, and topics, or retrieve detailed information about any specific course component and educational provider. Search and filter through the platform's complete curriculum to find exactly what you need for your learning journey.
su.se API
Search and explore Stockholm University's complete course catalog to find specific courses, browse academic programs, check class schedules, and discover available subjects. Get detailed information about any course offering to plan your studies and manage your academic schedule.