Documentation to read Rugby League Match Data | version 1.0
This documentation is aimed at developers who have been granted access with the relevant credentials to read Editorial and/or Match Data from the RFL.
Before you can make any calls you will need the following:
Please keep these credentials safe and do NOT share them.
Your personal credentials may limit access to some of the End Points and/or levels of data detail. Therefore, if you can not access an End Point this will most likely be due to your access level.
Your calls will be limited and you must hard sufficient middleware in place to store any data retreived from the API. Direct calls from Web Sites or Apps will incurr too many calls and could potentially throttle your access.
All data is accessed by calling the relevant End Point with the follow base URL:
https://secure.rugby-league.com/api
In order to access the data you must pass in a valid signature as a GET parameter ie.
https://secure.rugby-league.com/api?sig={my-signature}
Using your API Key and Secret create a keyed hash value of the current time in seconds from the Epoch.
Hashes are only valid for a maximum of 60 secs, therefore a new hash must be created for every call
The hashing algorithm should be set to sha256.
See the PHP example below:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | // replace these values with the credtials provided $apiKey = '{YOUR_API_KEY}' ; $secret = '{YOUR_SECRET}' ; $sig = hash_hmac( 'sha256' , time(), $apiKey . $secret ); // create curl resource $ch = curl_init(); $headers = array ( 'Accept: application/json' , 'x-api-key: ' . $apiKey , 'sig: ' . $sig ); //return the transfer as a string curl_setopt( $ch , CURLOPT_RETURNTRANSFER, 1); curl_setopt( $ch , CURLOPT_HTTPHEADER, $headers ); $output = curl_exec( $ch ); header( 'Content-Type: application/json' ); echo $output ; |
Parameter | Value | Description | Required | Default |
---|---|---|---|---|
sig | Valid Signature | N/A | True | N/A |
sl | Boolean 1 or 0 | Combines news from Super League | false | 0 |
Example Response:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | { "status" : 200, "date" : "2019-07-10T15:02:14:000Z" , "data" : [ { "id" : "55291" , "type" : "news" , "date" : "2019-07-10T12:00:00:000Z" , "title" : "RFL Board decision: Ineligible player, Coral Women's Challenge Cup" , "teaser" : "" , "articleUrl" : "https://www.rugby-league.com/article/55291/rfl-board-decision-ineligible-player-coral-womens-challenge-cup" , "primaryTag" : "womens_rugby_league" , "primaryTagPairs" : { "womens_rugby_league" : "Womens Rugby League" }, "tags" : [ "ChallengeCup" , "therfl" , "womens_rugby_league" ], "tagsPairs" : { "ChallengeCup" : "Challenge Cup" , "therfl" : "The RFL" , "womens_rugby_league" : "Womens Rugby League" }, "content" : "<p>Castleford Tigers' Francesca Townend, who played...</p>" }, |
Returns a list of matches with extensive match details.
Parameter | Value | Description | Required | Default |
---|---|---|---|---|
sig | Valid Signature | N/A | true | N/A |
compIDs | Comma seperated list of Competition IDs | Returns matches in these competitions. Check the Competitions endpoint for a list of competition IDs. | true | All |
divisionIDs | Comma seperated list of Division IDs | Returns matches in these divisions. You pass the relevant parent competition ID otherwise the matches will not be returned. | true | All |
matchIDs | Comma seperated list of Match IDs | Returns matches with these IDs | false | All |
startDate | Date format yyyy-mm-dd ie. 2018-07-31 | Returns matches from this date | false | Blank |
endDate | Date format yyyy-mm-dd ie. 2018-07-31 | Returns matches to this date | false | Blank |
fixtures | String of true or false | Returns matches with status of 'fixture' | false | true |
results | String of true or false | Returns matches with status of 'result' | false | true |
limit | integer | Limits the matches returned to the given number | false | 50 |
startRow | integer | Skips the number of rows specified | false | 0 |
Example Response:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | { "status" : 200, "date" : "2019-07-10T15:33:33:000Z" , "rows_returned" : 6, "total_rows" : 6, "start_row" : 0, "displaying_rows" : "0 - 50" , "data" : [ { "updated" : "2019-07-10 15:10:40" , "matchID" : "95765" , "paMatchID" : "4116085" , "optaID" : "124201" , "compID" : "1" , "compName" : "Super League" , "seasonID" : "274" , "divisionID" : "1183" , "divName" : "Betfred Super League" , "date" : "2019-06-27" , "round" : "20" , "kickoffLocal" : "19:45:00" , "kickoffUK" : "19:45:00" , "matchStatus" : "result" , "status" : "active" , "postponed" : "0" , "homeScore" : { "halfTime" : "6" , "fullTime" : "18" , "trys" : "Ben Crooks, Joel Tomkins, Matt Parcell" , "goals" : "Ryan Shaw (3)" , "dropGoals" : false }, "awayScore" : { "halfTime" : "6" , "fullTime" : "10" , "trys" : "Bureta Faraimo, Andre Savelio" , "goals" : "Marc Sneyd" , "dropGoals" : false }, "homeTeam" : { "name" : "Hull Kingston Rovers" , "shortName" : "Hull KR" , "rflID" : "33512" , "paID" : "33512" , "optaID" : "3600" }, "awayTeam" : { "name" : "Hull FC" , "shortName" : "Hull" , "rflID" : "33467" , "paID" : "33467" , "optaID" : "200" }, "venue" : "KCOM Craven Park" , "attendance" : "10,221" , "official" : "R Hicks" , "hashTag" : null , "channels" : [ "skyHD" , "5live_sportsextra" ] |
Returns a list of competitions with each season and divisions relating to each season. Also details teams entered into each division.
Parameter | Value | Description | Required | Default |
---|---|---|---|---|
sig | Valid Signature | N/A | true | N/A |
compIDs | Comma seperated list of Competition IDs | Returns competititons for the specified IDs | false | All |
year | Year value i.e. 2010 | Returns competititons for the given year | false | All |
type | full or structure | Full returns the full competition structure including teams, whereas structure will omit the teams | false | structure |
Example Response:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | { "status" : 200, "date" : "2019-07-11T12:52:01:000Z" , "data" : [ { "compID" : "116" , "name" : "Barrow & District Open Age" , "priority" : "18" , "seasons" : [ { "seasonID" : 306, "seasonName" : "2019" , "divisions" : { "1527" : { "divisionID" : "1527" , "divisionName" : "Barrow & District Open Age" , "stgCompID" : "404455" , "displayFixtures" : "yes" , "displayResults" : "yes" , "teams" : [ { "id" : "1737364" , "name" : "Askam" , "shortName" : null , "paID" : null , "optaID" : null , "stgID" : "1737364" }, { "id" : "1737365" , "name" : "Barrow Island" , "shortName" : null , "paID" : null , "optaID" : null , "stgID" : "1737365" }, |
Returns a the full league table for a given division.
Parameter | Value | Description | Required | Default |
---|---|---|---|---|
sig | Valid Signature | N/A | true | N/A |
divisionID | Integer | Returns the league table for the specified division | true | N/A |
Example Response:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | { "status" : 200, "date" : "2019-07-11T13:00:23:000Z" , "data" : { "compID" : "3" , "competition" : "Championship" , "seasonID" : "276" , "season" : "2019" , "divisionID" : "1184" , "divisionName" : "Betfred Championship" , "table" : { "1" : { "teamID" : "70539" , "teamName" : "Toronto Wolfpack" , "P" : "20" , "W" : "19" , "L" : "1" , "D" : "0" , "PF" : "729" , "PA" : "273" , "DIFF" : "456" , "PTS" : "38" }, "2" : { "teamID" : "17" , "teamName" : "York City Knights" , "P" : "20" , "W" : "14" , "L" : "6" , "D" : "0" , "PF" : "483" , "PA" : "370" , "DIFF" : "113" , "PTS" : "28" }, |
Returns player stats for a given division.
Parameter | Value | Description | Required | Default |
---|---|---|---|---|
sig | Valid Signature | N/A | true | N/A |
divisionID | Integer | Returns the player stats for the specified division | true | N/A |
Example Response:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | { "status" : 200, "date" : "2019-07-11T13:09:38:000Z" , "data" : { "compID" : "3" , "competition" : "Championship" , "season" : "2019" , "divisionID" : "1184" , "divisionName" : "Betfred Championship" , "updated" : "2019-07-11 01:00:05" , "stats" : [ { "playerID" : "2264" , "firstname" : "Jack" , "surname" : "Owens" , "teamID" : "2" , "team" : "Widnes Vikings" , "tries" : "10" , "goals" : "62" , "dgoals" : "0" , "mom" : "0" , "sinbin" : "0" , "dismisal" : "0" , "points" : "164" , "appears" : "17" }, { "playerID" : "249257" , "firstname" : "Keanan" , "surname" : "Brand" , "teamID" : "2" , "team" : "Widnes Vikings" , "tries" : "4" , "goals" : "0" , "dgoals" : "0" , "mom" : "0" , "sinbin" : "0" , "dismisal" : "0" , "points" : "16" , "appears" : "20" }, |
Returns Opta player stats for a given fixture.
Parameter | Value | Description | Required | Default |
---|---|---|---|---|
sig | Valid Signature | N/A | true | N/A |
matchID | Comma seperated list of match ID's | Returns the Opta player stats for the specified match | true | N/A |
Example Response:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | { "status" : 200, "date" : "2019-07-11T13:16:34:000Z" , "data" : { "rflMatchID" : "96187" , "optaFixID" : "124161" , "matchDate" : "2019-05-25" , "lastUpdate" : "2019-05-25 22:40:09" , "home" : { "rfl_team_id" : "33502" , "opta_team_id" : "450" , "players" : { "1" : { "firstname" : "Max" , "surname" : "Jowitt" , "opta_player_id" : "20837" , "rfl_player_id" : "4334" , "position_id" : "1" , "shirt_number" : "0" , "stats" : { "attacking_kicks" : "0" , "av_gain" : "7" , "carries" : "9" , "clean_break" : "0" , "drop_goals" : "0" , "errors" : "2" , "forty_twenty" : "0" , "goals" : "0" , "kicks_in_gen_play" : "0" , "marker_tackles" : "0" , "metres" : "63" , "missed_goals" : "0" , "missed_tackles" : "1" , "offload" : "0" , "penalties" : "0" , "red_card" : "0" , "run_from_dummy_half" : "0" , "tackle_busts" : "2" , "tackles" : "7" , "tries" : "0" , "try_assists" : "1" , "yellow_card" : "0" } }, |
Returns Opta player stats totals for the given season. ie. Top Try Scorer, Most Carries etc.
Parameter | Value | Description | Required | Default |
---|---|---|---|---|
sig | Valid Signature | N/A | true | N/A |
season | Four digit year ie. 2018 | Returns totals for the given year | false | Current year |
opta_comp_id | Integer | Returns totals for the given competition | false | 1 |
Example Response:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | { "status" : 200, "date" : "2019-07-11T13:20:42:000Z" , "season" : "2019" , "opta_comp_id" : 1, "data" : { "108" : { "rfl_player_id" : "108" , "rfl_team_id" : "33503" , "player_first_name" : "Ryan" , "player_last_name" : "Atkins" , "stats" : { "attacking_kicks" : "1" , "av_gain" : "8.14" , "carries" : "111" , "clean_break" : "7" , "drop_goals" : "0" , "errors" : "16" , "forty_twenty" : "0" , "goals" : "0" , "kicks_in_gen_play" : "1" , "marker_tackles" : "10" , "metres" : "903" , "missed_goals" : "0" , "missed_tackles" : "30" , "offload" : "11" , "penalties" : "4" , "red_card" : "0" , "run_from_dummy_half" : "8" , "tackle_busts" : "48" , "tackles" : "116" , "tries" : "4" , "try_assists" : "2" , "yellow_card" : "0" , "appears" : "11" } }, "116" : { "rfl_player_id" : "116" , "rfl_team_id" : "33503" , "player_first_name" : "Ben" , "player_last_name" : "Westwood" , "stats" : { "attacking_kicks" : "0" , "av_gain" : "8.36" , "carries" : "42" , "clean_break" : "0" , "drop_goals" : "0" , "errors" : "1" , "forty_twenty" : "0" , "goals" : "0" , |
Returns the current Opta playing squads by team and includes player detail where available
Parameter | Value | Description | Required | Default |
---|---|---|---|---|
sig | Valid Signature | N/A | true | N/A |
Example Response:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | { "status" : 200, "date" : "2019-07-11T13:29:29:000Z" , "count" : 368, "data" : { "players" : { "271" : { "id" : "271" , "birth_date" : "1981-08-01" , "comments" : "" , "created" : "2016-11-04 14:00:11" , "height" : "181" , "language_id" : "0" , "last_edited" : "2018-11-28 11:12:01" , "nationality_id" : "0" , "place_birth" : "Leeds, England" , "player_caps" : "0" , "player_first_name" : "Jamie" , "player_initials" : "J" , "player_known_name" : "Jamie Jones-Buchanan" , "player_last_name" : "Jones-Buchanan" , "player_middle_name" : "" , "position" : "BACK ROW" , "position_id" : "11" , "profile" : "" , "squad_no" : "20" , "team_id" : "250" , "weight" : "97" , "rfl_player_id" : "183" , "teamName" : "Leeds Rhinos" , "teamID" : "33476" }, "280" : { "id" : "280" , "birth_date" : "1982-12-06" , "comments" : "" , "created" : "2017-12-05 10:58:03" , "height" : "180" , "language_id" : "0" , "last_edited" : "2019-01-10 09:22:50" , "nationality_id" : "0" , "place_birth" : "Leeds, England" , "player_caps" : "0" , "player_first_name" : "Danny" , "player_initials" : "D" , |
Returns the current Super League teams current stats and team records
Parameter | Value | Description | Required | Default |
---|---|---|---|---|
sig | Valid Signature | N/A | true | N/A |
Example Response:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | { "status" : 200, "date" : "2019-07-11T13:43:11:000Z" , "count" : 0, "data" : { "teams" : { "33448" : { "teamName" : "Castleford Tigers" , "shortName" : "Tigers" , "twitter" : "CTRLFC" , "opta_id" : "50" , "pa_id" : "33448" , "ground" : "Mend-a-Hose Jungle" , "coach" : "Daryl Powell" , "address" : "Wheldon Road, Castleford" , "postcode" : "WF10 2SD" , "tel" : "01977 552674" , "ticketLine" : "01977 555 336" , "web" : "www.castlefordtigers.com" , "email" : "info@castigers.com" , "lat" : "53.7307454" , "lng" : "-1.3398777" , "honours" : { "superleague" : "" , "challengecup" : "1935, 1969, 1970, 1986" , "worldclub" : "" }, "records" : [ { "Stat" : "Longest unbeaten run" , "Matches" : "6" , "Run started" : "2016-09-08" , "Run ended" : "2017-03-12" }, { "Stat" : "Longest winless run" , "Matches" : "12" , "Run started" : "2003-09-14" , "Run ended" : "2004-05-23" }, { "stat" : "Biggest Score in a Super League match" , "value" : "Scored: 74 points against unknown on Sunday 7th April 2002" }, { "stat" : "Biggest Winning Margin in a Super League match" , "value" : "Winning margin: 68 against unknown on Sunday 7th April 2002" } ], "opta_stats" : { "2011" : { "attacking_kicks" : "345" , "av_gain" : "3039" , "carries" : "5333" , |
Returns the Match Officials appointed to officiate each game
Parameter | Value | Description | Required | Default |
---|---|---|---|---|
sig | Valid Signature | N/A | true | N/A |
Example Response:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | { "status" : 200, "date" : "2021-05-25T10:31:28:000Z" , "data" : [ { "matchID" : "146007" , "compID" : "26" , "compName" : "Scholarship" , "homeName" : "Wakefield Trinity U16s" , "awayName" : "Bradford Bulls U16s" , "divisionID" : "2273" , "div_name" : "Scholarship U16s" , "matchDate" : "2021-05-26" , "kickoff" : "18:00:00" , "venue" : "The Mobile Rocket Stadium " , "officials" : { "referee_name" : "A. Smith" , "touch_1_name" : "B. Jones" , "touch_2_name" : "C. Jenkins" , "in_goal_1_name" : ". " , "in_goal_2_name" : ". " , "reserve_name" : ". " , "reserve_tj_name" : ". " , "video_ref_name" : ". " , "m_com_name" : ". " , "time_keeper_name" : ". " } }, |
Returns the Players list
Parameter | Value | Description | Required | Default |
---|---|---|---|---|
sig | Valid Signature | N/A | true | N/A |
rflID | Integer | Returns the player matching the RFL ID | false | N/A |
stgID | Integer | Returns the player matching the Gameday ID | false | N/A |
paID | Integer | Returns the player matching the Press Association ID | false | N/A |
optaID | Integer | Returns the player matching the Stats Perform ID | false | N/A |
name | String | Returns the player where the firstname or surname matches the value | false | N/A |
limit | Integer | Limits the rows returned to the value provided | false | 100 |
updated | Date/Time Stamp | Returns rows that have been updated since the timestamp provided | false | N/A |
Example Response:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | { "status" : 200, "date" : "2023-03-31T13:59:43:000Z" , "data" : { "count" : 3, "players" : [ { "rflID" : "272720" , "firstname" : "Lewis" , "lastname" : "Knott" , "optaID" : null , "paIDs" : null , "stg_member_id" : "21065683" , "updated" : "2023-03-30 19:41:46" }, { "rflID" : "227265" , "firstname" : "Saskia" , "lastname" : "Lewis" , "optaID" : null , "paIDs" : null , "stg_member_id" : "15114342" , "updated" : "2023-03-30 15:25:49" }, { "rflID" : "86249" , "firstname" : "Lewis" , "lastname" : "Worrall" , "optaID" : null , "paIDs" : null , "stg_member_id" : "15131554" , "updated" : "2023-03-30 16:33:42" } ] } } |
All data will return as a JSON string with STATUS as the first node. The values of status are shown below;
Value | Description |
---|---|
200 | Valid response |
403 | Invalid credentials |
204 | No data found |