Leeking's blog

By Leeking, history, 2 months ago, In English

Proposal: Standardized Editorial URLs (/contest/xxxx/editorial) & API Endpoint Support

Finding tutorials for past Codeforces contests is currently far more inconsistent than it needs to be.
Depending on the contest author and round, editorials are scattered across different formats:

For anyone upsolving or building community tools (like browser extensions and problem trackers), this unpredictability causes constant friction.

The Proposal
Introduce a standardized URL alias and API endpoint for contest tutorials.

1. Standardized Web Route
Allow users to access any contest editorial via a single, predictable URL:
codeforces.com/contest/{contestId}/editorial

Practical Implementation & Settings:

  • Contest Manager Settings: In the contest dashboard, coordinators or authors simply enter the blogEntryId (or external link) designated as the official tutorial.
  • Problem-Level Linking & Discussion: Errichto suggested supporting dedicated editorial pages/posts for individual problems (e.g., codeforces.com/contest/1900/editorial/A), giving each problem its own comment section for focused discussion of alternative solutions and edge cases.
  • Multi-resource Support: If there are multiple tutorials (e.g., Official Text, Video Editorial, or Russian/Chinese translations), the main editorial page or alias can render quick tabs/links for each option at the top of the post.
  • Update the UI: Add a prominent "Editorial" button directly on the contest sidebar and on the problem page headers once the contest ends and the tutorial is published.

2. Native API Endpoint (contest.editorial)
Browser extensions, IDE plugins (like Competitive Companion or CPH), and platforms like Vjudge currently rely on fragile web scraping, or regex matching.
Adding an official endpoint, such as contest.editorial in the Codeforces API, would return structured data for a given contest ID:

// Request: https://codeforces.me/api/contest.editorial?contestId=1900
{
  "status": "OK",
  "result": {
    "contestId": 1900,
    "editorialBlogId": 45678,
    "editorialUrl": "https://codeforces.me/blog/entry/45678",
    "videoEditorialUrl": "https://youtube.com/watch?v=...",
    "problemAnchors": {
      "A": "https://codeforces.me/blog/entry/45678#problem-A",
      "B": "https://codeforces.me/blog/entry/45678#problem-B"
    }
  }
}

3. Retroactive Backfilling for Past Rounds
To handle older rounds without manual labor from Codeforces staff:

  • Coordinators, authors, or trusted high-rated users (e.g., Grandmasters) could be given permission to tag/link the historical blog entry ID for older rounds.
  • Alternatively, a simple community-driven backfill tool or PR system could link historical contest IDs to their existing blog entries.

I believe this is a real upgrade. Codeforces needs care and this is great.
A suggestion you may find useful here MikeMirzayanov KAN

  • Vote: I like it
  • +127
  • Vote: I do not like it

»
2 months ago, hide # |
 
Vote: I like it +23 Vote: I do not like it

i do agree , its weird that there is no API endpoints for editorials.

I hope they add it.

please don't down vote my comments just cause im green

»
2 months ago, hide # |
 
Vote: I like it +4 Vote: I do not like it

Unfortunately nobody knows when did CF released a new feature.

»
2 months ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

Yes please for gods sake

»
2 months ago, hide # |
 
Vote: I like it +40 Vote: I do not like it

Instead of just "section anchors", I think it would be better to do a separate editorial for each problem. It would make it possible to actually discuss the solution(s) in the comments.

  • »
    »
    2 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    tbh, this is a great idea I didn't think of

    Yes, it would be a little hard to apply to old editorials, but definitely applicable

»
2 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by Leeking (previous revision, new revision, compare).

»
2 months ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

I agree I agreee

Codeforces is the same since 2013

»
2 months ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

KAN MikeMirzayanov please read it