Olympic Games - 2024 - API

The Olympic Games API is an API that brings the real data of the Olympic Games. It is used by the Mini Project Codante.

It is a set of endpoints that provide information about the events, venues, disciplines and participating countries of the Olympic Games.

The Codante.io Olympic Games API is a public and free API. It is updated in real-time (5 minutes delay) with the data from the 2024 Olympic Games.

Authentication

The Codante.io Olympic Games API does not require authentication to access the endpoints.

Rate Limit

The Codante.io Olympic Games API has a rate limit of 100 requests per minute. If you exceed this limit, you will receive a 429 status code. Excessive use may also result in your IP being blocked.

Base URL

The base URL for the Codante.io request API is https://apis.codante.io/olympic-games.


GET/events

List of Games/Events

This is the main endpoint of the API. Lists all events, with filtering options. It brings, for each event, the competitors, the venue, the date, the name of the event, the flag if the event is happening now, among others. The list is paginated and can be filtered by country, discipline, venue, date, competitor and page.

Optional attributes

  • Name
    country
    Type
    string
    Description

    Filter by country using 3-letter code (e.g. "BRA"). For the complete list, see the countries endpoint.

  • Name
    discipline
    Type
    string
    Description

    Filter by discipline/sport using 3-letter code. For the complete list, see the disciplines endpoint.

  • Name
    venue
    Type
    string
    Description

    Filter by venue using 3-letter code. For the complete list, see the venues endpoint.

  • Name
    date
    Type
    string
    Description

    Filter by date (YYYY-MM-DD).

  • Name
    competitor
    Type
    string
    Description

    Filter by competitor name or team name in case of team games.

  • Name
    page
    Type
    integer
    Description

    Page number. Default is 1.

Request

GET
/events
  curl -G https://apis.codante.io/olympic-games/events \
    -d page=1

Response

{
  "data": [
  {
    "id": 3407,
    "day": "2024-07-24",
    "discipline_name": "Football",
    "discipline_pictogram": "https://codante.s3.amazonaws.com/codante-apis/olympic-games/pictograms/FBL.avif",
    "name": null,
    "venue_name": "Geoffroy-Guichard Stadium",
    "event_name": "Men",
    "detailed_event_name": "Men's Group B",
    "start_date": "2024-07-24T15:00:00+02:00",
    "end_date": "2024-07-24T16:45:00+02:00",
    "status": "Finished",
    "is_medal_event": 0,
    "is_live": 0,
    "competitors": [
      {
        "country_id": "Argentina",
        "country_flag_url": "https://codante.s3.amazonaws.com/codante-apis/olympic-games/flags/ARG.png",
        "competitor_name": "Argentina",
        "position": 0,
        "result_position": "",
        "result_winnerLoserTie": "L",
        "result_mark": "1"
      },
      {
        "country_id": "Marrocos",
        "country_flag_url": "https://codante.s3.amazonaws.com/codante-apis/olympic-games/flags/MAR.png",
        "competitor_name": "Morocco",
        "position": 1,
        "result_position": "",
        "result_winnerLoserTie": "W",
        "result_mark": "2"
      }
    ]
  },
  ...
],
  "links": {
    "first": "...",
    "last": "...",
    "prev": "...",
    "next": "..."
  },
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 10,
    "path": "...",
    "per_page": 10,
    "to": 10,
    "total": 100
  }
}

GET/events/{id}

Game by ID

Displays details of a specific event by ID.

Request

GET
/events/{id}
  curl -G https://apis.codante.io/olympic-games/events/1 \
    -d page=1

Response

{
  "data": {
    "id": 3407,
    "day": "2024-07-24",
    "discipline_name": "Football",
    "discipline_pictogram": "https://codante.s3.amazonaws.com/codante-apis/olympic-games/pictograms/FBL.avif",
    "name": null,
    "venue_name": "Geoffroy-Guichard Stadium",
    "event_name": "Men",
    "detailed_event_name": "Men's Group B",
    "start_date": "2024-07-24T15:00:00+02:00",
    "end_date": "2024-07-24T16:45:00+02:00",
    "status": "Finished",
    "is_medal_event": 0,
    "is_live": 0,
    "competitors": [
      {
        "country_id": "Argentina",
        "country_flag_url": "https://codante.s3.amazonaws.com/codante-apis/olympic-games/flags/ARG.png",
        "competitor_name": "Argentina",
        "position": 0,
        "result_position": "",
        "result_winnerLoserTie": "L",
        "result_mark": "1"
      },
      {
        "country_id": "Marrocos",
        "country_flag_url": "https://codante.s3.amazonaws.com/codante-apis/olympic-games/flags/MAR.png",
        "competitor_name": "Morocco",
        "position": 1,
        "result_position": "",
        "result_winnerLoserTie": "W",
        "result_mark": "2"
      }
    ]
  },
}

List Venues

Lists all event venues. It brings the name and official URL of the venue.

Request

GET
/venues
  curl -G https://apis.codante.io/olympic-games/venues

Response

Response

{
  "data": [
    {
      "id": "AQC",
      "name": "Aquatics Centre",
      "url": "https://olympics.com/en/paris-2024/venues/aquatics-centre"
    },
    {
      "id": "BCY",
      "name": "Bercy Arena",
      "url": "https://olympics.com/en/paris-2024/venues/bercy-arena"
    },
  ...
]
}

GET/disciplines

List of Sports

Lists all disciplines (sports). It brings the pictograms (icons) of each sport.

Request

GET
/disciplines
  curl -G https://apis.codante.io/olympic-games/disciplines

Response

Response

{
  "data": [
    {
      "id": "BK3",
      "name": "3x3 Basketball",
      "pictogram_url": "https://codante.s3.amazonaws.com/codante-apis/olympic-games/pictograms/BK3.avif"
    },
    {
      "id": "ARC",
      "name": "Archery",
      "pictogram_url": "https://codante.s3.amazonaws.com/codante-apis/olympic-games/pictograms/ARC.avif"
    },
    ...
  ]
}

GET/countries

List of Medals and Countries

List all participating countries ordered by the medal ranking. Include the flags of each country as well as the quantities of gold, silver, bronze, and total medals.

Also provide two rankings: the official ranking determined by the type of medals (rank) - and the ranking of medals by total medals (rank_total_medals).

Request

GET
/countries
  curl -G https://apis.codante.io/olympic-games/countries

Response

Response

{
  "data": [
    {
      "id": "KOR",
      "name": "RepĆŗblica da CorĆ©ia",
      "continent": "ASI",
      "flag_url": "https:\/\/codante.s3.amazonaws.com\/codante-apis\/olympic-games\/flags\/KOR.png",
      "gold_medals": 5,
      "silver_medals": 3,
      "bronze_medals": 1,
      "total_medals": 9,
      "rank": 1,
      "rank_total_medals": 4
    },
    {
      "id": "JPN",
      "name": "JapĆ£o",
      "continent": "ASI",
      "flag_url": "https:\/\/codante.s3.amazonaws.com\/codante-apis\/olympic-games\/flags\/JPN.png",
      "gold_medals": 5,
      "silver_medals": 2,
      "bronze_medals": 4,
      "total_medals": 11,
      "rank": 2,
      "rank_total_medals": 3
    },
    ...
  ],
  "links": {
    "first": "...",
    "last": "...",
    "prev": "...",
    "next": "..."
  },
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 10,
    "path": "...",
    "per_page": 20,
    "to": 20,
    "total": 200
  }
}