Programming — entry 001 of 4

Codeforces

Verified Jul 2026

Codeforces exposes a JSON API over its own contest and user database, covering problems, contests, submissions, ratings, and hacks through methods like contest.standings, user.info, and problemset.problems. Most methods are fully public and callable with no key at all — a live call to user.info returned real rating and rank data with zero authentication — while a handful of privacy-sensitive methods (e.g. user.friends) require a signed apiKey/apiSig pair generated from a registered account. There's no paid tier or usage fee; the service is entirely free.

Codeforces exposes a JSON API over its own contest and user database. Every method returns a `{status, comment, result}` envelope — `status` is `"OK"` or `"FAILED"`, with `comment` explaining a failure and `result` holding the method-specific payload on success. Most methods, including user.info used below, are fully public and callable with no key at all; only a handful of privacy-scoped methods (e.g. user.friends, contest.hacks for a running contest) require a signed apiKey/apiSig pair generated from a registered account.

competitive-programmingcontestsratingsproblems
AuthenticationNone requiredCall it straight away — no key, no signup.
HTTPSSupportedTraffic is encrypted in transit.
CORSEnabledCallable directly from browser JavaScript.
PricingFreeNo paid tier — free for the documented use case.
FormatsJSONResponses can be requested as JSON.

GreatAPIs Score

Score74out of 100
Authentication25/25No authentication required
Pricing20/20Free to use
Docs0/20No docs or spec available
Formats9/15Single response format
Freshness20/20Verified within 6 months

Embed this badge

Scored 74 on greatapis.com
<a href="https://greatapis.com/api/codeforces/"><img src="https://greatapis.com/badge/codeforces.svg" alt="Scored 74 on greatapis.com"></a>

Auth quickstart

  1. No API key required for public methods. A live `GET /user.info?handles=tourist` with no credentials at all returned real rating/rank data. For the privacy-scoped methods that do need a key, generate an `apiKey`/`secret` pair at codeforces.com/settings/api, then add `apiKey`, a Unix `time` parameter, and an `apiSig` — a rand-prefixed hex SHA-512 of `<rand>/<methodName>?<sorted param1=value1&param2=value2...>#<secret>` — to every request; the docs reject any request whose `time` differs from server time by more than 5 minutes.
Stored keyNo key stored

Your key is stored only in this browser (localStorage) and sent directly to the API — never to greatapis.

Get a user's public profile

GEThttps://codeforces.com/api/user.info?handles=tourist

200 application/json;charset=UTF-8

{"status":"OK","result":[{"lastName":"Korotkevich","country":"Belarus","lastOnlineTimeSeconds":1785223598,"city":"Gomel","rating":3530,"friendOfCount":89946,"titlePhoto":"https://userpic.codeforces.org/422/title/50a270ed4a722867.jpg","handle":"tourist","avatar":"https://userpic.codeforces.org/422/avatar/2b5dbe87f0d859a2.jpg","firstName":"Gennady","contribution":55,"organization":"ITMO University","rank":"legendary grandmaster","maxRating":4009,"registrationTimeSeconds":1265987288,"maxRank":"tourist"}]}

Developer reference

Base URLhttps://codeforces.com/api
Rate limit

Documented at 1 request every 2 seconds (codeforces.com/apiHelp: "API may be requested at most 1 time per two seconds"); exceeding it returns HTTP 200 with {"status":"FAILED","comment":"...Call limit exceeded"} rather than an HTTP error. Confirmed via a recent archive.org snapshot of the docs page since the live docs page itself returns a Cloudflare interactive challenge to this sandbox (the API endpoints are never challenged).

Gotchas & limits

  • codeforces.com/apiHelp documents a hard rate limit — "API may be requested at most 1 time per two seconds" — and states that exceeding it still returns a normal HTTP 200, with the body carrying `{"status":"FAILED","comment":"...Call limit exceeded"}` instead of an HTTP error. Confirmed via a recent archive.org snapshot of the docs page, since the live docs page itself returns a Cloudflare interactive challenge to this sandbox's automated requests (the API endpoints themselves are never challenged).
  • Calling a privacy-scoped method with no credentials fails at the application layer, not with a generic 401: a live `GET /user.friends` with no apiKey returned HTTP 400 with `{"status":"FAILED","comment":"onlyOnline: You have to be authenticated to use this method"}`.
  • An unknown handle also fails as an HTTP 400 rather than a 404: a live `GET /user.info?handles=<a handle that does not exist>` returned `{"status":"FAILED","comment":"handles: User with handle <handle> not found"}` — every error case observed this run used the same `{status:"FAILED", comment}` shape regardless of the underlying cause, so branch on `status`, not the HTTP code.