REST/JSON API

Important

You can use the SRK FGC ranking API to query the database for player rankings and tournament results. This allows you to a lot of fancy stuff that we look forward to!
If you want to do datamining, it is advised to use the raw JSON data used as backup of this site. This can be found in the open-source code of this project at https://github.com/bavobbr/sf4ranking in the data folder. . This avoids you to query all one by one. You are free to use this data in any fashion that contributes back to the community. The data can not be commercialized or be used in closed databases.

How does it work?

There are two types of entities:
  1. Player: get player meta-information and all his results
  2. Tournament: get tournament meta-information and all the results

Search

One can search either for player or for tournament. This is speicfied with the 'type' query parameter. Other parameters:
  • query: search term, of 'string' type
  • fuzzy: do fuzzy search, of 'boolean' type
Examples:

Data fetch

You can fetch data either by id or by name. By ID is advised for scripts that cross-reference data between search/player/tournament. By name is simply human-friendly.

Rankings API and Widget

You can get a top player ranking per game and in multiple formats. Default is HTML for SF5. There is JSON and XML as well. The JSON and XML formats give you some high-level details on the player, but also the ID which you can use to get more info using for example /api/player/id/{id} Do not use the API as a remote database for clients such as mobile apps or websites. If you create clients that directly use this API, make sure it is efficient.