Hi Codeforces team and MikeMirzayanov,
I know maintaining Codeforces is a huge amount of work, especially with the number of submissions and API requests every day, so thanks for all the effort.
I wanted to ask about a small issue with the API. I use it to hide problem tags while solving, so I can try problems completely on my own. Recently, without the API working properly, I can’t reveal the tags with View tags, and I also can’t see the problem rating unless I enable Show tags for unsolved problems on the Problemset page.
Also, could Codeforces maybe support this natively? Ideally, there would be an option to show only the problem rating by default, while keeping the tags hidden behind a button like View tags.
I think this would be useful for people who want to choose problems by rating but avoid spoilers from tags. Thanks again for everything you do for the platform.









can relate, also it would be better off if showing only the rating of the problem without the tags was built in into codeforces
It would be the best feature added in years
Tags can really spoil some problems for me , especially when I need to practice randomly and enhance my ability to recognize the problem tags, adding the option to hide it would be great.
This feature actually is embedded. However, rating is considered a tag (e.g. *1700) and thus it is not shown when tags are disabled. This is why extensions such as GetRating exist.
If you scroll to the bottom of https://codeforces.me/settings/general:
I think it is also in the problemset in the "Settings" section
Because they do not want their API LEEKING.
:) Just kiding
hahah this is so good though
You don't know how many times I've heard this joke and it's always funny ( ≧ᗜ≦)
HaHa!
Now I know ig.
:)
I can confirm that I have also been getting this error message for a while (at least the past few weeks, maybe even the past month or more). My guess is that this has something to do with the extension's code itself; perhaps the extension is using a certain feature in the API that has changed recently.
The API for the tags is not broken, your extension is broken
It is normal, my extension is working fine, here's the API for 2227H:
You can still see tags. Here's the API page: https://codeforces.me/api/problemset.problems
Please stop with the API is broken blogs
Most likely extension using contest.standings which is not broken but blocked somewhy
yea, that could be the case, contest.standings needs authentication like API key and signature to access but extensions don't have them, but does it have problems?
yes it have
upd: oops, you mean tasks by problems, not issues :) answers is yes too, response returns problems info
Ok fine, in the post I didn't explain the problem because MikeMirzayanov can easily identify it, but I'll explain it to you.
You can clearly see (in the
Console tab, at the bottom of the page) the message: Error: Uncaught Error: CF API: HTTP error 400:{"status":"FAILED","comment":"contestId: You have to be authenticated to use this method"}The Problem & Why It Exists
Codeforces recently tightened its API security, specifically locking down the
contest.standingsendpoint. In the past, extensions could fetch this data in the background anonymously or by piggybacking on your active browser login cookie. These older extensions just send naked, anonymous requests, the server instantly drops the hammer with that 400 error (check spoiler above).How to Fix It & What I Changed
Since the extensions lack the complex math to generate an
apiSig, I dug into the source code and bypassed the blocked endpoint entirely (another topic for another day). I changed the extension'srequestURLto point to https://codeforces.me/api/problemset.problems. Since this is a public endpoint, Codeforces still allows anonymous background fetching here.And it worked:
However, making this swap required a critical logic fix. When fetching
contest.standings, the code only had to search a list of ~10 problems, so it just checked if the problemindexmatched (e.g., "Is this problem A?"). Now that we are fetching the global problemset, checking only the index would grab the very first problem "A" in Codeforces history!To fix this, I updated the loop logic to match both the Contest ID and the Problem Index: from simple
if(problemsList[i].index == index)toif(problemsList[i].contestId == id && problemsList[i].index == index), which is roughly a 1000x increase in data being processed. It's noticeably slower, but manageable.TLDR;
While this new approach completely bypasses the security block and makes the extension work perfectly again, it is significantly heavier. The old method downloaded a tiny, lightning-fast JSON payload containing data for a single contest. The new method forces the browser to download a massive payload containing the entire history of Codeforces problems (nearly 10,000 problems) on every page load, which is roughly a 1000x increase in data being processed. It's noticeably slower, but manageable.
I hope MikeMirzayanov or KAN replies to this blog and lets us know what the plan is. If he isn't trying to fix this from the server side or revert the API restrictions, I may just fork these extensions, implement some local caching so it doesn't lag the browser, and release the fixes for the community myself. It will take a ton of my time, but it's still worth it.
I know that a very long time ago, also shorter version of your reply: contest.standings is blocked, but problemset.problems isn't blocked, so just change source code from accessing contest.standings to problemset.problems
Yea exactly this version is great ( ≧ᗜ≦)
But still as I said slower, and Carrot has no way to work right now I think
I'll check it later
way to bypass API access completely: https://codeforces.me/blog/entry/153381
You can use your trusty AI friend to create an extension that uses that idea
I'll surely check. Btw I didn't check. Is Carrot open sourced?
It would save a ton of time if it is. If not, I'll just vibe code a new extension, and surely check everything the AI does
Would you like to help?
https://github.com/meooow25/carrot/blob/master/carrot/src/content/content.js