A
A
API 3.0 (BETA)
Football API 3.0 (BETA)
Search…
⌃K
🆕

Differences between API 2 and API 3

Updated syntax

The syntax for filtering and including works bit a bit different from API V2. The syntax is used across all endpoints: the documentation for each endpoint describes the exceptions regarding exclusions of some fields/relations. Find out everything about the new syntax.

New Endpoints

Available in core:
  • Base entities;
    • Continents
    • Regions
    • Countries
    • Cities
    • Filters
  • Types endpoint
    • All Types
    • Type By ID
  • My endpoints (to check your own data features)
    • Data Features endpoint
      • My Data Features
    • Endpoints
      • My Endpoints
    • Leagues
      • My Leagues
  • Search endpoints for all entities with a name field
  • Extra endpoints for each entity

New Data Features

  • Offsides events for major leagues
  • Detailed player positions
  • Shots on/off target events for major leagues
  • Placeholder games available (finals etc)
  • Ball coordinates (semi-live)
  • Forecast weather report
  • More predictions
  • Predictive lineup (Beta)
  • Coach statistics
  • Referee statistics
  • Period statistics
  • More statistics in general

Participants vs localTeam & visitorTeam include

This might be one of the most important model changes in API 3.0. Previously, localTeam and visitorTeam were the includes to use to get all team data. The previous includes are replaced by our new include: participants.From now on, this is the way to get information about the teams participating in a match.
Both teams that play in the fixture are present in the participants array and their location is located in the meta section of a team. Below is an example of how a fixture with this new include can look.
{
"id": 18528480,
"sport_id": 1,
"league_id": 271,
"season_id": 19686,
"stage_id": 77457696,
"group_id": null,
"aggregate_id": null,
"round_id": 273989,
"state_id": 5,
"venue_id": 1708,
"name": "AGF vs Viborg",
"starting_at": "2022-07-24 12:00:00",
"result_info": "AGF won after full-time.",
"leg": "1/1",
"details": null,
"length": 90,
"placeholder": false,
"last_processed_at": "2023-01-12 09:45:13",
"starting_at_timestamp": 1658664000,
"state": {
"id": 5,
"state": "FT",
"name": "Full Time",
"short_name": "FT",
"developer_name": "FT",
"is_live": false,
"is_pending": false,
"is_period_end": true,
"is_final_state": true,
"is_cancelled": false,
"is_final_standing_state": true,
"is_completed": true,
"type_id": 2,
"is_deleted": false,
"is_notstarted": false
},
"periods": [
{
"id": 4208948,
"fixture_id": 18528480,
"type_id": 1,
"started": 1658664146,
"ended": 1658666951,
"counts_from": 0,
"ticking": false,
"sort_order": 1,
"description": "1st-half",
"time_added": 1,
"minutes": null,
"seconds": null
},
{
"id": 4208988,
"fixture_id": 18528480,
"type_id": 2,
"started": 1658667939,
"ended": 1658670896,
"counts_from": 45,
"ticking": false,
"sort_order": 2,
"description": "2nd-half",
"time_added": 4,
"minutes": null,
"seconds": null
}
],
"participants": [
{
"id": 2905,
"sport_id": 1,
"country_id": 320,
"venue_id": 1708,
"gender": "male",
"name": "AGF",
"short_code": "AGF",
"image_path": "https://cdn.sportmonks.com/images/soccer/teams/25/2905.png",
"founded": 1902,
"type": "domestic",
"placeholder": false,
"last_played_at": "2023-01-13 11:30:00",
"meta": {
"location": "home"
}
},
{
"id": 2447,
"sport_id": 1,
"country_id": 320,
"venue_id": 1467,
"gender": "male",
"name": "Viborg",
"short_code": null,
"image_path": "https://cdn.sportmonks.com/images/soccer/teams/15/2447.png",
"founded": 1896,
"type": "domestic",
"placeholder": false,
"last_played_at": "2023-01-13 11:00:00",
"meta": {
"location": "away"
}
}
]
},
}

Data Features per league

There is a new endpoint for Leagues /{id}/enrichment that shows what kind of data features a league has. For example, if the league has lineups.

Filters

The filter system changed compared to the previous version. You can now select specific fields on the base entity or includes and it’s possible to filter your request. Below is a fixture shown with events.
// URL
https://api.sportmonks.com/v3/football/fixtures/18535517?api_token=YOUR_TOKEN&include=events
{
"data": {
"id": 18535517,
"sport_id": 1,
"league_id": 501,
"season_id": 19735,
"stage_id": 77457866,
"group_id": null,
"aggregate_id": null,
"round_id": 274719,
"state_id": 5,
"venue_id": 8909,
"name": "Celtic vs Rangers",
"home_score": 4,
"away_score": 0,
"starting_at": "2022-09-03 11:30:00",
"result_info": "Celtic won after full-time.",
"leg": "1/1",
"details": null,
"length": 90,
"placeholder": false,
"starting_at_timestamp": 1662204600,
"events": [
{
"id": 42645216,
"fixture_id": 18535517,
"period_id": 4295921,
"participant_id": 53,
"type_id": 18,
"section": "event",
"player_id": 108471,
"related_player_id": 460810,
"player_name": "Georgios Giakoumakis",
"related_player_name": "Kyogo Furuhashi",
"result": null,
"info": null,
"addition": null,
"minute": 5,
"extra_minute": null,
"injured": true,
"on_bench": false
},
{
"id": 42666547,
"fixture_id": 18535517,
"period_id": 4296154,
"participant_id": 62,
"type_id": 18,
"section": "event",
"player_id": 172985,
"related_player_id": 10504,
"player_name": "Scott Wright",
"related_player_name": "Glen Kamara",
"result": null,
"info": null,
"addition": null,
"minute": 46,
"extra_minute": null,
"injured": false,
"on_bench": false
},
//And more
As you can see in the response, you will receive all match events. But what if you’re only interested in a specific event like goals, cards or substitutions? You can filter on the specific data you're interested in. The URL now includes a &filters query parameter that shows the entity you want to filter on and the ID's you want to see in your results.
// URL
https://api.sportmonks.com/v3/football/fixtures/18535517?api_token=YOUR_TOKEN&include=events&filters=eventTypes:14
{
"id": 18535517,
"sport_id": 1,
"league_id": 501,
"season_id": 19735,
"stage_id": 77457866,
"group_id": null,
"aggregate_id": null,
"round_id": 274719,
"state_id": 5,
"venue_id": 8909,
"name": "Celtic vs Rangers",
"starting_at": "2022-09-03 11:30:00",
"result_info": "Celtic won after full-time.",
"leg": "1/1",
"details": null,
"length": 90,
"placeholder": false,
"last_processed_at": "2023-01-12 09:44:11",
"starting_at_timestamp": 1662204600,
"events": [
{
"id": 42688040,
"fixture_id": 18535517,
"period_id": 4296154,
"participant_id": 53,
"type_id": 14,
"section": "event",
"player_id": 173160,
"related_player_id": null,
"player_name": "David Turnbull",
"related_player_name": null,
"result": "4-0",
"info": "Shot",
"addition": "4th Goal",
"minute": 78,
"extra_minute": null,
"injured": null,
"on_bench": false,
"coach_id": null,
"sub_type_id": null
},
{
"id": 42646477,
"fixture_id": 18535517,
"period_id": 4295921,
"participant_id": 53,
"type_id": 14,
"section": "event",
"player_id": 9939171,
"related_player_id": null,
"player_name": "Liel Abada",
"related_player_name": null,
"result": "1-0",
"info": "Shot",
"addition": "1st Goal",
"minute": 8,
"extra_minute": null,
"injured": null,
"on_bench": false,
"coach_id": null,
"sub_type_id": null
},
```
More information and a more detailed explanation is covered on our request options page.​

Select the fields you need

You can request only the fields you need by using the new syntax. Filters can be uses to filter the data based on the fields you would like to display in your application.
: can be used for filtering the fields you want to see in the response. For example, you only want the name of a certain team. In this case you need to use participants:name.
A more detailed explanation is covered on our request options page​

League priority

You can now prioritize the leagues you want to view. In MySportmonks you can change the priority of all leagues in your subscription. You can simply sort them based to your liking and the API will show leagues in this specific order when requesting leagues.

Strict typing

Strictly typed languages enforce typing on all data being interacted with. All data types are strictly conform standard JSON notations. In addition to data types being stricter we also added types to various entities to ensure higher data consistency. You can read more about it below.

Rate limit per entity

The rate limit will now be based on requests per entity instead of being based on a single endpoint. For example, the Team entity is used in Teams endpoints. You can find out more about the rate limit here.

Core and odds

​Core and odds are no longer sport specific. Both have their own documentation and are related to all sports released on API 3.0. Odds contain bookmakers and markets which are not sport specific but Odds are still available on a per sport basis.

States and types

We introduced states and types to ensure data quality and consistency for specific fields. Something has a type, when there are multiple variants of a certain variant.
For example, types for referees. Referees can be the head referee, the assistant referee or the fourth official. Due to types we qualify which variant of the belonging entity the specific referee is.
This was introduced to ensure all sports will follow the exact same structure in API 3.0.
New types: Position ID and detailed position ID are new types. Also, periods, sidelined, referees, events, standings, metadata, formations, colors, injuries, suspensions, predictions, and stats contain fields that belong to a type.