How to use

You can call any of the service URL in the next sections directly from a client browser (it allows AJAX requests from any origin).
It will return a JSON formatted results. Only the Live Events API uses long polling (i.e., it will wait for a while until new data arrives or it will return empty result if no new data arrives within 12 seconds), the rest of the APIs returns immediately.

Submissions to Specific Problems

To view submissions to specific problems on a given submission date range.
{pids-csv} is a list of problem ids encoded in comma separated values.
{start-sbt} and {end-sbt} are the date range in unix timestamp.
Note that the submissions are returned in no particular order.
This API is suitable for virtual contests that run for a specific date range on a number of problems.

User Problem Ranklist

Returns nearby submissions (by runtime) for a particular user submission to a problem.
{pid} is the problem id. {uid} is the ICPC Live Archive user id.
{nabove} is the number of (faster) submissions ranked above the user to be shown.
{nbelow} is the number of (slower) submissions ranked below the user to be shown.

Live Events

This service is using long polling. It can hold the request for at most 1 minute for a new event. It will return immediately if there are at least one new event. The server will only keep track the last 100 submissions events. Thus, if the client is not polling after a while, it may lose some events.

The {poll-id} is the minimum requested id. For the first call, you can use value 0 (zero) to get the last 100 events. After receiving the events, keep track of the latest "id" of the events returned and use it to call the service again with {poll-id} = the_last_id to get the next, etc.

User Submissions

The {user-id} is the user id of the user.
The {min-sid} is optional (i.e., if specified, it will return submissions with submission id greater than {min-sid}).
The service return a JSON formatted object with 3 attributes:

Specific Users' Submissions on Specific Problems

The {user-ids-csv} is the user ids presented as comma-separated-values. Similarly, the {pids-csv} is the problem ids presented in comma-separated-values. The numbers in the both csvs are limited to 100 numbers. The {min-subs-id} is the minimum submission id to be returned (that is, to show all submissions set this value to zero, to see latest submissions, set it higher as appropriate).

The result is a hash map with the key is the user id and the value is the submissions of that user that associated with one of the specified problem ids. The format of the submissions is identical with the above description.

User Ranklist

The {nabove} is the number of users above the {user-id} that you want to display. Similarly for the {nbelow}. Both {nabove} and {nbelow} is capped to 100. The result is a JSON formatted array where each element is a single user's rank with attributes:

rank : The rank of the user

old : Non zero if the user is an old ICPC Live Archive user that hasn't migrate

name : The name of the user

username : The username of the user

ac : The number of accepted problems

nos : The number of submissions of the user

activity : The number of accepted problems of the user in 2 days, 7 days, 31 days, 3 months, and 1 year.