Codeforces

App · 14 actions

Follow competitive programming on Codeforces. Look up users, their rating history, submissions and blog posts; list upcoming and past contests and their submissions; find archive problems by tag and difficulty; and read the latest submissions, blog activity, posts and comments. Start a workflow when a contest is announced, a user submits a solution or a rating changes. No account or API key required.

Actions

ActionWhat it does
Find problemsFind problems in the Codeforces archive by tags, difficulty rating and title, newest, easiest, hardest or most solved first, with how many people solved each.
Get a blog entryGet a blog post, such as an announcement or an editorial: its title, author, rating, tags and full text, as plain text and as HTML.
Get a contestGet one contest: its name, rules, phase, start and end times and how many minutes away it starts.
Get a problemGet one problem from the archive by its code, such as 2000A: its title, difficulty rating, tags, how many solved it, and its link.
Get a userGet a user's public profile: rating and rank, best rating, name, country, organization, contribution and when they joined and were last online.
Get a user's rating historyList a user's rated contests, newest first, with their place and how their rating changed, plus their current and best rating.
Get several usersGet up to 100 users' profiles in one step, such as a team or a class, with the handles Codeforces does not know listed separately rather than failing the step.
List a blog entry's commentsList the comments on a blog post, oldest, newest or highest rated first, as plain text with the author and a link to each.
List a contest's submissionsList a contest's most recent submissions, newest first, optionally only one participant's or only one verdict.
List a user's blog entriesList the blog entries a user has written, newest first.
List a user's submissionsList a user's most recent submissions, newest first, with the problem, language, verdict, time and memory, optionally only one verdict or only since a date.
List contestsList contests by phase: upcoming ones soonest first with when they start and how long they last, or running and finished ones newest first, optionally from the Gym or by name.
List recent blog activityList the latest activity on Codeforces' blogs, newest first: new and edited posts and new comments, with links.
List the latest submissionsList the submissions just made to the problem archive by anyone, newest first, optionally only one verdict.

Find problems

Find problems in the Codeforces archive by tags, difficulty rating and title, newest, easiest, hardest or most solved first, with how many people solved each.

Inputs

Tagstagslist
Only problems with every one of these tags.One or more of: *special (Special problem), 2-sat, binary search, bitmasks, brute force, chinese remainder theorem, combinatorics, communication, constructive algorithms, data structures, and 28 more.
Lowest ratingmin_ratingnumber
Only problems rated at least this, from 800. Setting a rating leaves out problems not rated yet.From 800 to 3500.
Highest ratingmax_ratingnumber
Only problems rated at most this, up to 3500.From 800 to 3500.
Title containsname_containstext
Only problems whose title contains this text.
Ordersorttext
Newest first by default.One of: newest (Newest first), easiest (Easiest first), hardest (Hardest first), most_solved (Most solved first). Default: newest.
How manylimitnumber
How many problems to return, up to 1000.From 1 to 1000. Default: 20.

Outputs

countnumber
How many problems this answer holds
matched_countnumber
How many matched before the limit
problemslist
The problems found
tagslist
The tags asked for
Example output
{
  "count": 1,
  "matched_count": 293,
  "problems": [
    {
      "contest_id": 2259,
      "id": "2259H",
      "index": "H",
      "name": "Treasure Map Destruction (Counting Version)",
      "points": 0,
      "rating": 2200,
      "solved_count": 1025,
      "tags": [
        "dfs and similar",
        "dp",
        "dsu",
        "graphs",
        "math"
      ],
      "url": "https://codeforces.com/problemset/problem/2259/H"
    }
  ],
  "tags": [
    "dp",
    "graphs"
  ]
}

Get a blog entry

Get a blog post, such as an announcement or an editorial: its title, author, rating, tags and full text, as plain text and as HTML.

Inputs

Blog entryblog_entrytextRequired
The blog entry's ID, the number in its address (79 in codeforces.com/blog/entry/79), or the address itself.

Outputs

authortext
The author's handle
content_htmltext
The post as Codeforces shows it, in HTML
content_texttext
The post, as plain text
created_attext
When it was posted, ISO 8601 in UTC
idnumber
The blog entry's ID
localetext
The language it is shown in, such as en
modified_attext
When it was last edited, ISO 8601 in UTC
ratingnumber
Its rating from votes
tagslist
Its tags
titletext
Its title, as plain text
urltext
The blog entry's page on codeforces.com
Example output
{
  "author": "MikeMirzayanov",
  "content_html": "<div class=\"ttypography\"><p>This post is no longer relevant; it has become outdated.</p></div>",
  "content_text": "This post is no longer relevant; it has become outdated.",
  "created_at": "2010-02-17T09:32:18Z",
  "id": 79,
  "locale": "en",
  "modified_at": "2023-10-06T09:04:27Z",
  "rating": 0,
  "tags": [
    "codeforces",
    "compilers",
    "rules"
  ],
  "title": "About the programming languages",
  "url": "https://codeforces.com/blog/entry/79"
}

Get a contest

Get one contest: its name, rules, phase, start and end times and how many minutes away it starts.

Inputs

ContestcontesttextRequired
The contest's ID, the number in its address (2000 in codeforces.com/contest/2000), or the address itself.

Outputs

contest_kindtext
For a Gym contest, its kind, such as Official ICPC Contest
difficultynumber
For a Gym contest, its difficulty from 1 to 5, 0 when unset
duration_minutesnumber
How long it lasts, in minutes
end_timetext
When it ends, ISO 8601 in UTC
frozentrue/false
True while the standings are frozen
idnumber
The contest's ID
is_gymtrue/false
True for a contest in the Gym, Codeforces' training area
nametext
The contest's name
phasetext
BEFORE, CODING, PENDING_SYSTEM_TEST, SYSTEM_TEST or FINISHED
prepared_bytext
For a Gym contest, who prepared it
seasontext
For a Gym contest, its season
start_timetext
When it starts, ISO 8601 in UTC, empty when not scheduled
starts_in_minutesnumber
Minutes from now until it starts, negative once it has started
statustext
The phase in words: Upcoming, Running, System testing or Finished
typetext
Its scoring rules: CF, IOI or ICPC
urltext
The contest's page on codeforces.com
Example output
{
  "contest_kind": "",
  "difficulty": 0,
  "duration_minutes": 150,
  "end_time": "2026-11-07T17:05:00Z",
  "frozen": false,
  "id": 2279,
  "is_gym": false,
  "name": "Codeforces Round (Div. 1)",
  "phase": "BEFORE",
  "prepared_by": "",
  "season": "",
  "start_time": "2026-11-07T14:35:00Z",
  "starts_in_minutes": 24368,
  "status": "Upcoming",
  "type": "CF",
  "url": "https://codeforces.com/contest/2279"
}

Get a problem

Get one problem from the archive by its code, such as 2000A: its title, difficulty rating, tags, how many solved it, and its link.

Inputs

ProblemproblemtextRequired
The problem's code, contest ID then letter (2000A), or its address.

Outputs

contest_idnumber
The contest it belongs to
idtext
The problem's code, contest ID then index, such as 2000A
indextext
Its letter in that contest, such as A or B1
nametext
The problem's title
pointsnumber
Its points in the contest, 0 when not scored by points
ratingnumber
Its difficulty rating, 0 when not rated yet
solved_countnumber
How many people have solved it, 0 when not known
tagslist
Its tags, such as dp or greedy
urltext
The problem's page on codeforces.com
Example output
{
  "contest_id": 2259,
  "id": "2259H",
  "index": "H",
  "name": "Treasure Map Destruction (Counting Version)",
  "points": 0,
  "rating": 2200,
  "solved_count": 1025,
  "tags": [
    "dfs and similar",
    "dp",
    "dsu",
    "graphs",
    "math"
  ],
  "url": "https://codeforces.com/problemset/problem/2259/H"
}

Get a user

Get a user's public profile: rating and rank, best rating, name, country, organization, contribution and when they joined and were last online.

Inputs

HandlehandletextRequired
A Codeforces handle, such as tourist, or the profile's address (codeforces.com/profile/tourist).

Outputs

avatar_urltext
Their avatar image
citytext
Their city, when published
contributionnumber
Their contribution score from blog votes
countrytext
Their country, when published
first_nametext
Their first name, when published
friend_of_countnumber
How many users have them as a friend
handletext
The user's handle, such as tourist
last_nametext
Their last name, when published
last_onlinetext
When they were last online, ISO 8601 in UTC
max_ranktext
The highest rank they have reached
max_ratingnumber
The highest rating they have reached
nametext
Their first and last name, when they publish them
organizationtext
Their school or company, when published
ranktext
Their current rank, such as legendary grandmaster
ratedtrue/false
True once they have a rating
ratingnumber
Their current rating, 0 when unrated
registeredtext
When they joined Codeforces, ISO 8601 in UTC
title_photo_urltext
Their profile photo
urltext
Their profile on codeforces.com
Example output
{
  "avatar_url": "https://userpic.codeforces.org/422/avatar/2b5dbe87f0d859a2.jpg",
  "city": "Gomel",
  "contribution": 111,
  "country": "Belarus",
  "first_name": "Gennady",
  "friend_of_count": 91436,
  "handle": "tourist",
  "last_name": "Korotkevich",
  "last_online": "2026-10-21T02:58:41Z",
  "max_rank": "tourist",
  "max_rating": 4009,
  "name": "Gennady Korotkevich",
  "organization": "ITMO University",
  "rank": "legendary grandmaster",
  "rated": true,
  "rating": 3380,
  "registered": "2010-02-12T15:08:08Z",
  "title_photo_url": "https://userpic.codeforces.org/422/title/50a270ed4a722867.jpg",
  "url": "https://codeforces.com/profile/tourist"
}

Get a user's rating history

List a user's rated contests, newest first, with their place and how their rating changed, plus their current and best rating.

Inputs

HandlehandletextRequired
A Codeforces handle, such as tourist, or the profile's address (codeforces.com/profile/tourist).
How manylimitnumber
How many contests to return, up to 1000.From 1 to 1000. Default: 50.

Outputs

best_ranknumber
Their best place in a rated contest
changeslist
The rated contests, newest first
countnumber
How many contests this answer holds
current_ratingnumber
Their rating after their latest rated contest
handletext
The handle asked about
max_ratingnumber
The highest rating they have had
total_contestsnumber
How many rated contests they have taken part in
Example output
{
  "best_rank": 1,
  "changes": [
    {
      "contest_id": 2261,
      "contest_name": "WorldQuant Round 1 (Codeforces Round 1128, Div. 1 + Div. 2)",
      "contest_url": "https://codeforces.com/contest/2261",
      "delta": 37,
      "handle": "tourist",
      "new_rating": 3380,
      "old_rating": 3343,
      "rank": 4,
      "rated_at": "2026-10-17T17:35:00Z"
    }
  ],
  "count": 1,
  "current_rating": 3380,
  "handle": "tourist",
  "max_rating": 4009,
  "total_contests": 310
}

Get several users

Get up to 100 users' profiles in one step, such as a team or a class, with the handles Codeforces does not know listed separately rather than failing the step.

Inputs

HandleshandleslistRequired
The handles to look up.

Outputs

countnumber
How many users were found
not_foundlist
The handles Codeforces does not know
userslist
The users found, in the order asked
Example output
{
  "count": 1,
  "not_found": [],
  "users": [
    {
      "avatar_url": "https://userpic.codeforces.org/422/avatar/2b5dbe87f0d859a2.jpg",
      "city": "Gomel",
      "contribution": 111,
      "country": "Belarus",
      "first_name": "Gennady",
      "friend_of_count": 91436,
      "handle": "tourist",
      "last_name": "Korotkevich",
      "last_online": "2026-10-21T02:58:41Z",
      "max_rank": "tourist",
      "max_rating": 4009,
      "name": "Gennady Korotkevich",
      "organization": "ITMO University",
      "rank": "legendary grandmaster",
      "rated": true,
      "rating": 3380,
      "registered": "2010-02-12T15:08:08Z",
      "title_photo_url": "https://userpic.codeforces.org/422/title/50a270ed4a722867.jpg",
      "url": "https://codeforces.com/profile/tourist"
    }
  ]
}

List a blog entry's comments

List the comments on a blog post, oldest, newest or highest rated first, as plain text with the author and a link to each.

Inputs

Blog entryblog_entrytextRequired
The blog entry's ID, the number in its address (79 in codeforces.com/blog/entry/79), or the address itself.
Ordersorttext
Oldest first by default, the order the page shows them.One of: oldest (Oldest first), newest (Newest first), top (Highest rated first). Default: oldest.
How manylimitnumber
How many comments to return, up to 1000.From 1 to 1000. Default: 50.

Outputs

blog_entry_idnumber
The blog entry's ID
commentslist
The comments
countnumber
How many comments this answer holds
total_countnumber
How many comments the entry has
Example output
{
  "blog_entry_id": 79,
  "comments": [
    {
      "author": "andreyv",
      "created_at": "2015-05-15T20:10:04Z",
      "html": "<div class=\"ttypography\"><p>Rust 1.0 is released: http://blog.rust-lang.org/2015/05/15/Rust-1.0.html</p></div>",
      "id": 227612,
      "parent_id": 214139,
      "rating": 37,
      "text": "Rust 1.0 is released: http://blog.rust-lang.org/2015/05/15/Rust-1.0.html",
      "url": "https://codeforces.com/blog/entry/79#comment-227612"
    }
  ],
  "count": 1,
  "total_count": 273
}

List a contest's submissions

List a contest's most recent submissions, newest first, optionally only one participant's or only one verdict.

Inputs

ContestcontesttextRequired
The contest's ID, the number in its address (2000 in codeforces.com/contest/2000), or the address itself.
Handlehandletext
Only this participant's submissions. Leave empty for everyone's.
Verdictverdicttext
Only submissions with this verdict, such as Accepted, or Anything but Accepted. Leave empty for every verdict.
How many to readlimitnumber
How many of the most recent submissions to read, up to 1000; the verdict filter applies to these.From 1 to 1000. Default: 20.

Outputs

contest_idnumber
The contest's ID
countnumber
How many submissions matched
read_countnumber
How many submissions were read
submissionslist
The submissions, newest first
Example output
{
  "contest_id": 2261,
  "count": 1,
  "read_count": 1,
  "submissions": [
    {
      "accepted": true,
      "contest_id": 2261,
      "handle": "tourist",
      "handles": [
        "tourist"
      ],
      "id": 395033187,
      "language": "C++23 (GCC 14-64, msys2)",
      "memory_bytes": 0,
      "participant_type": "CONTESTANT",
      "passed_test_count": 55,
      "problem_id": "2261H",
      "problem_name": "Oh Tree Tree Tree, No Need to Leave",
      "problem_rating": 3500,
      "problem_tags": [
        "bitmasks",
        "interactive",
        "trees"
      ],
      "problem_url": "https://codeforces.com/problemset/problem/2261/H",
      "submitted_at": "2026-10-17T17:34:23Z",
      "team_name": "",
      "time_ms": 250,
      "url": "https://codeforces.com/contest/2261/submission/395033187",
      "verdict": "OK",
      "verdict_label": "Accepted"
    }
  ]
}

List a user's blog entries

List the blog entries a user has written, newest first.

Inputs

HandlehandletextRequired
A Codeforces handle, such as tourist, or the profile's address (codeforces.com/profile/tourist).

Outputs

blog_entrieslist
Their blog entries, newest first
countnumber
How many they have written
handletext
The handle asked about
Example output
{
  "blog_entries": [
    {
      "author": "tourist",
      "created_at": "2026-08-08T01:42:57Z",
      "id": 155784,
      "locale": "en",
      "modified_at": "2026-08-08T01:42:57Z",
      "rating": 521,
      "tags": [],
      "title": "Cognition @ IOI 2026",
      "url": "https://codeforces.com/blog/entry/155784"
    }
  ],
  "count": 1,
  "handle": "tourist"
}

List a user's submissions

List a user's most recent submissions, newest first, with the problem, language, verdict, time and memory, optionally only one verdict or only since a date.

Inputs

HandlehandletextRequired
A Codeforces handle, such as tourist, or the profile's address (codeforces.com/profile/tourist).
Verdictverdicttext
Only submissions with this verdict, such as Accepted, or Anything but Accepted. Leave empty for every verdict.
Submitted sincesincedate and time
Only submissions made at or after this time.
How many to readlimitnumber
How many of their most recent submissions to read, up to 1000; the filters apply to these.From 1 to 1000. Default: 20.

Outputs

accepted_countnumber
How many of those matched were accepted
countnumber
How many submissions matched
handletext
The handle asked about
read_countnumber
How many recent submissions were read
submissionslist
The submissions, newest first
Example output
{
  "accepted_count": 1,
  "count": 1,
  "handle": "tourist",
  "read_count": 5,
  "submissions": [
    {
      "accepted": true,
      "contest_id": 2261,
      "handle": "tourist",
      "handles": [
        "tourist"
      ],
      "id": 395033187,
      "language": "C++23 (GCC 14-64, msys2)",
      "memory_bytes": 0,
      "participant_type": "CONTESTANT",
      "passed_test_count": 55,
      "problem_id": "2261H",
      "problem_name": "Oh Tree Tree Tree, No Need to Leave",
      "problem_rating": 3500,
      "problem_tags": [
        "bitmasks",
        "interactive",
        "trees"
      ],
      "problem_url": "https://codeforces.com/problemset/problem/2261/H",
      "submitted_at": "2026-10-17T17:34:23Z",
      "team_name": "",
      "time_ms": 250,
      "url": "https://codeforces.com/contest/2261/submission/395033187",
      "verdict": "OK",
      "verdict_label": "Accepted"
    }
  ]
}

List contests

List contests by phase: upcoming ones soonest first with when they start and how long they last, or running and finished ones newest first, optionally from the Gym or by name.

Inputs

Which contestsphasetext
Upcoming contests by default.One of: upcoming, running (Running or being tested), finished, any. Default: upcoming.
Gym contestsgymtrue/false
List the Gym, Codeforces' archive of training contests, instead of its own rounds. The Gym list is long and takes about 20 seconds.Default: false.
Name containsname_containstext
Only contests whose name contains this text.
How manylimitnumber
How many contests to return, up to 1000.From 1 to 1000. Default: 20.

Outputs

contestslist
The contests
countnumber
How many contests this answer holds
gymtrue/false
True when the Gym was listed
matched_countnumber
How many matched before the limit
phasetext
Which contests were listed
Example output
{
  "contests": [
    {
      "contest_kind": "",
      "difficulty": 0,
      "duration_minutes": 150,
      "end_time": "2026-11-07T17:05:00Z",
      "frozen": false,
      "id": 2279,
      "is_gym": false,
      "name": "Codeforces Round (Div. 1)",
      "phase": "BEFORE",
      "prepared_by": "",
      "season": "",
      "start_time": "2026-11-07T14:35:00Z",
      "starts_in_minutes": 24368,
      "status": "Upcoming",
      "type": "CF",
      "url": "https://codeforces.com/contest/2279"
    }
  ],
  "count": 1,
  "gym": false,
  "matched_count": 6,
  "phase": "upcoming"
}

List recent blog activity

List the latest activity on Codeforces' blogs, newest first: new and edited posts and new comments, with links.

Inputs

How manycountnumber
How many of the latest actions to read, up to 100.From 1 to 100. Default: 20.
Onlyactivitytext
Comments only, or posts only. Leave empty for both.One of: comment (Comments only), blog_entry (New and edited posts only).

Outputs

actionslist
The actions, newest first
countnumber
How many actions this answer holds
Example output
{
  "actions": [
    {
      "blog_author": "omsincoconut",
      "blog_entry_id": 157917,
      "blog_title": "WorldQuant Round 1 (Codeforces Round 1128, Div. 1 + 2) Editorial",
      "comment_author": "dolaisubhrabijoy",
      "comment_id": 1400916,
      "comment_text": "Sample testcase for D1 could be stronger.",
      "time": "2026-10-21T05:55:33Z",
      "type": "comment",
      "url": "https://codeforces.com/blog/entry/157917#comment-1400916"
    }
  ],
  "count": 1
}

List the latest submissions

List the submissions just made to the problem archive by anyone, newest first, optionally only one verdict.

Inputs

How many to readcountnumber
How many of the latest submissions to read, up to 1000.From 1 to 1000. Default: 20.
Verdictverdicttext
Only submissions with this verdict, such as Accepted, or Anything but Accepted. Leave empty for every verdict.

Outputs

countnumber
How many submissions matched
read_countnumber
How many submissions were read
submissionslist
The submissions, newest first
Example output
{
  "count": 1,
  "read_count": 1,
  "submissions": [
    {
      "accepted": true,
      "contest_id": 2261,
      "handle": "tourist",
      "handles": [
        "tourist"
      ],
      "id": 395033187,
      "language": "C++23 (GCC 14-64, msys2)",
      "memory_bytes": 0,
      "participant_type": "CONTESTANT",
      "passed_test_count": 55,
      "problem_id": "2261H",
      "problem_name": "Oh Tree Tree Tree, No Need to Leave",
      "problem_rating": 3500,
      "problem_tags": [
        "bitmasks",
        "interactive",
        "trees"
      ],
      "problem_url": "https://codeforces.com/problemset/problem/2261/H",
      "submitted_at": "2026-10-17T17:34:23Z",
      "team_name": "",
      "time_ms": 250,
      "url": "https://codeforces.com/contest/2261/submission/395033187",
      "verdict": "OK",
      "verdict_label": "Accepted"
    }
  ]
}

On this page