Programming — entry 001 of 4
Codeforces
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.
GreatAPIs Score
Auth quickstart
- 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¶m2=value2...>#<secret>` — to every request; the docs reject any request whose `time` differs from server time by more than 5 minutes.
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
{"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
https://codeforces.com/apiDocumented 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.