Codeforces Scraper - 5 Modes, No Login, Official API avatar

Codeforces Scraper - 5 Modes, No Login, Official API

Pricing

from $0.50 / 1,000 record scrapeds

Go to Apify Store
Codeforces Scraper - 5 Modes, No Login, Official API

Codeforces Scraper - 5 Modes, No Login, Official API

Scrape Codeforces users, ratings, submissions, contests and problems via the official public API. No login, no browser, 5 modes in one actor. $0.0005 per record.

Pricing

from $0.50 / 1,000 record scrapeds

Rating

0.0

(0)

Developer

Gio

Gio

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

1

Monthly active users

a day ago

Last modified

Share

Pull structured data from Codeforces (codeforces.com), the largest competitive programming platform, without writing a single line of API client code.

Why use this scraper

Codeforces has a public REST API, but it is split across half a dozen undocumented edge cases: handles that changed, deleted submissions, rating deltas that only show up in the contest standings endpoint, and responses that silently return "status":"FAILED" with no HTTP error code. Recruiters screening competitive programmers, bootcamps tracking student progress, and researchers studying skill distribution all end up writing the same glue code to turn that API into a clean table. This actor does that once: give it handles or a mode, get back a dataset you can filter, join and export.

Overview

Input is a mode (users, submissions, rating history, contests or problems) plus the handles or filters that mode needs. Output is one JSON record per user, submission, contest or problem, ready to download as JSON, CSV or Excel. A batch of a few handles finishes in seconds because every mode is a single call to the official Codeforces API, not a browser render. Cost is per record scraped (see Pricing), so a lookup of 10 handles costs the same whether you need it once or run it daily.

Supported inputs

ModeWhat it returnsTypical input
usersProfile, rating, rank, max rating, contribution, organization, country, city, avatarsList of handles
user_submissionsRecent submissions for a user, with verdict, language, problem and timeList of handles
user_rating_historyEvery rated contest a user took part in, with rating before/afterList of handles
contestsFull list of past and upcoming contests, with type, phase and durationNo handles needed
problemsThe full Codeforces problemset, with tags, rating and solved countNo handles needed

All five modes share the same maxItems cap, so you control cost and run time per call. users, user_submissions and user_rating_history take a list of handles and return one record set per handle; contests and problems ignore handles entirely and return the platform-wide list, so you can run them on their own to build a reference table without naming a single user.

Use cases

  • Technical recruiters screening candidates who list a Codeforces handle on their resume: pull rating, rank and recent activity in one call instead of opening each profile by hand.
  • Coding bootcamps and training programs tracking a cohort's rating history over a semester to show measurable improvement.
  • Esports and contest organizers pulling the contests list to build a calendar or seed a leaderboard for an internal event.
  • Researchers and data journalists studying the global distribution of competitive programming skill by country or organization.
  • Competitive programmers themselves exporting their own submission history to analyze which problem tags they are weakest on.
  • University clubs and olympiad coaches pulling the rating history of an entire roster at once, instead of clicking through each student's profile page one at a time before a selection meeting.

How it works

The actor calls the official Codeforces public API directly and parses the JSON it returns. There is no HTML to render and no login wall: Codeforces publishes this API for exactly this kind of integration, so the data is always current and structurally stable release to release. Because the source is a JSON API rather than a web page, there is nothing to break when Codeforces redesigns its front end, and no risk of the request looking like scraping traffic to the site.

Input configuration

Profiles for two handles:

{
"mode": "users",
"handles": ["tourist", "Petr"],
"maxItems": 50
}

Recent submissions for one handle:

{
"mode": "user_submissions",
"handles": ["tourist"],
"maxItems": 100
}

Full contests list, no handles needed:

{
"mode": "contests",
"maxItems": 500
}

Full problemset, with a cap:

{
"mode": "problems",
"maxItems": 2000
}

Output sample

Real output from a live run, mode users, handles tourist and Petr:

[
{
"kind": "user",
"handle": "tourist",
"firstName": "Gennady",
"lastName": "Korotkevich",
"country": "Belarus",
"city": "Gomel",
"organization": "ITMO University",
"rating": 3343,
"maxRating": 4009,
"rank": "legendary grandmaster",
"maxRank": "tourist",
"contribution": 111,
"friendOfCount": 91250,
"registrationTimeSeconds": 1265987288,
"lastOnlineTimeSeconds": 1791786571,
"avatar": "https://userpic.codeforces.org/422/avatar/2b5dbe87f0d859a2.jpg",
"titlePhoto": "https://userpic.codeforces.org/422/title/50a270ed4a722867.jpg",
"url": "https://codeforces.com/profile/tourist"
},
{
"kind": "user",
"handle": "Petr",
"firstName": "Petr",
"lastName": "Mitrichev",
"country": "Switzerland",
"city": "Zurich",
"organization": "Google",
"rating": 2831,
"maxRating": 3597,
"rank": "international grandmaster",
"maxRank": "legendary grandmaster",
"contribution": 118,
"friendOfCount": 13755,
"registrationTimeSeconds": 1267103024,
"lastOnlineTimeSeconds": 1791786226,
"avatar": "https://userpic.codeforces.org/664/avatar/a113c1791cdcd2e1.jpg",
"titlePhoto": "https://userpic.codeforces.org/664/title/c1ef9e749cad14a0.jpg",
"url": "https://codeforces.com/profile/Petr"
}
]

Key output fields

FieldTypeDescription
kindStringRecord type: user, submission, rating change, contest or problem
handleStringCodeforces handle (user modes)
rating / maxRatingIntegerCurrent and all-time peak rating
rank / maxRankStringCurrent and all-time peak rank title
organizationStringSelf-reported affiliation
country / cityStringSelf-reported location
contributionIntegerCodeforces contribution score
registrationTimeSecondsIntegerUnix timestamp of account creation
urlStringLink to the public profile, submission or contest page

Submission, rating-history, contest and problem records carry their own fields (verdict, problem tags, contest phase, points) exactly as the Codeforces API returns them.

Pricing

Pay per event, no monthly fee:

EventPrice
Actor start$0.00005
Record scraped$0.0005

A pull of 50 handles costs about $0.025. There is no separate charge for failed lookups.

What makes this richer than the competition

Direct Codeforces coverage on the Apify Store is thin: the only other actor targeting the same site is parseforge/codeforces-scraper, which has not reported any usage in the last 30 days. Outside the Store, the alternative is writing and maintaining your own client against the five Codeforces API endpoints by hand. This actor covers all five in one input, with a single maxItems cap for cost control and no separate setup per mode.

Notes & limitations

  • Data comes from the official Codeforces public API, so it inherits that API's own limits: a handle that does not exist returns no record instead of an error row, and very old submissions may be missing fields Codeforces itself no longer tracks.
  • Country, city and organization are self-reported by the Codeforces user, not verified.
  • This actor does not scrape anything Codeforces does not already expose through its public API: no private contest data, no email addresses.
  • user_submissions only returns what Codeforces itself keeps in a user's public submission list; submissions the user deleted or hid are not recoverable from this or any other tool.
  • Very high maxItems values on problems or contests take slightly longer because the underlying API call returns the full list in one response that the actor then pages locally.

FAQ

Does this need a Codeforces account or API key? No. The public API this actor calls does not require authentication for the modes it supports.

Can I look up more than one handle at a time? Yes, handles accepts a list for every user-based mode.

Why did a handle come back with no record? The handle does not exist or was renamed. Codeforces handles can change, so verify the handle on codeforces.com first if a lookup comes back empty.

How fresh is the rating data? As fresh as Codeforces' own API. Ratings update right after a contest's standings are finalized.

Can I get every problem Codeforces has ever published? Yes, with mode: "problems" and maxItems set high enough to cover the full set (currently a few thousand).

Can I combine modes in one run? Not in a single call: each run takes one mode. Running two modes for the same handles means two separate calls, which keeps each call's cost and output predictable.

Does a private or unrated Codeforces account break the lookup? No. Every registered Codeforces handle has a public profile; rating and maxRating are simply absent until the account has taken part in at least one rated contest.

For AI Agents & LLM Apps

Call this actor from an MCP-compatible client via mcp.apify.com, or directly over the API:

curl "https://api.apify.com/v2/acts/gio21~codeforces-scraper/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"mode": "users", "handles": ["tourist"], "maxItems": 10}'

The run-sync-get-dataset-items endpoint returns the dataset items directly in the response, which fits a single tool call in an agent loop without a separate polling step.

Disclaimer

This actor is an independent tool that calls Codeforces' own public API. It is not affiliated with, endorsed by or sponsored by Codeforces. "Codeforces" is a trademark of its respective owner. Use it in line with Codeforces' own terms of use.

SEO Keywords

Codeforces scraper, Codeforces API scraper, Codeforces user rating scraper, Codeforces submissions scraper, competitive programming data scraper, Codeforces contests scraper, Codeforces problemset scraper.