Competition groups

  1. Endpoint
  2. Parameters
  3. Response
  4. Examples

Through this API endpoint, you are able to get all groups that a current edition of the competition has.

This football API endpoint will only work for competitions that do have groups. Cups like the FA CUP is an example of a competition without groups.

Many competitions supported through our football API have groups and these groups have standings. In many cases, there is only one group with all the teams there and this group is active for the whole season. An example of this would be the English Premier League.


However, there are also competitions that have either multiple groups like Copa America which has a group stage and then direct elimination stages. There are also competitions that have multiple groups in multiple group stages. Latin American national competitions are a good example of these leagues. Usually, they have an Apertura and Clausura stages with one or more groups. In these cases it would be helpful to have an API endpoint from which you can get the list of the groups so you can request from us or display the correct active standings.


Endpoint


GET:

Parameters


NameTypeRequiredExampleDescription
competition_idNumber1244The id of the competition which tables we want to get from our football api

Response


The response will contain an array of groups that will be empty if the competition does not have any groups, or it will contain the list of groups for the current season. If the competition has only one group for the whole season e.g. English Premier League, La Liga, Bundesliga it will contain a group with the name "1" and a stage named "Regular Season". This naming convention is standard for our football API.


Below, you will find an example response when requesting all the groups for the current edition of the UEFA Champuons League.


{
    "success": true,
    "data": [
        {
            "id": 897,
            "name": "A",
            "stage": "Group Stage"
        },
        {
            "id": 898,
            "name": "B",
            "stage": "Group Stage"
        },
        {
            "id": 899,
            "name": "C",
            "stage": "Group Stage"
        },
        {
            "id": 900,
            "name": "D",
            "stage": "Group Stage"
        },
        {
            "id": 901,
            "name": "E",
            "stage": "Group Stage"
        },
        {
            "id": 902,
            "name": "F",
            "stage": "Group Stage"
        },
        {
            "id": 903,
            "name": "G",
            "stage": "Group Stage"
        },
        {
            "id": 904,
            "name": "H",
            "stage": "Group Stage"
        }
    ]
}


NameTypeExampleDescription
idnumber1The id of the group
namestringAThe name of the group, like A, B, C, D ...
stagestringGroup StageThe name of the competition stage to which the group belongs to.

Examples


In the examples below, we show how you can get all the groups for the UEFA EURO using our UEFA EURO API. cUrl:

curl -XGET "https://livescore-api.com/api-client/competitions/groups.json?competition_id=387&key=demo_key&secret=demo_secret"
PHP:
file_get_contents('https://livescore-api.com/api-client/competitions/groups.json?competition_id=387\&key=demo_key\&secret=demo_secret');
Python:
import urllib2
req = urllib2.Request('https://livescore-api.com/api-client/competitions/groups.json?competition_id=387\&key=demo_key\&secret=demo_secret')
response = urllib2.urlopen(req)
print response.read()


Didn't find what you need?

Do no hesitate to contact us. We will get back to you as soon as possible.