This README provides detailed instructions on how to use various MotoGP APIs to retrieve results, seasons, categories, events, and session details.
This API are from MOTOGP OFFICIAL WEBSITE
on my github you can find the code to import the data from the API to the database.
These instructions will guide you through the process of fetching data from the MotoGP APIs.
Before you start, ensure you have a stable internet connection and an API client like Postman or a similar tool to make requests to the provided URLs.
https://api.motogp.pulselive.com/motogp/v1/results/seasons
{
"id": "db8dc197-c7b2-4c1b-b3a4-6dc534c023ef",
"name": null,
"year": 2023,
"current": true
}
https://api.motogp.pulselive.com/motogp/v1/results/categories?seasonUuid=<season_id>
[
{"id": "e8c110ad-64aa-4e8e-8a86-f2f152f6a942", "name": "MotoGP™", "legacy_id": 3},
...
]
https://api.motogp.pulselive.com/motogp/v1/results/events?seasonUuid=<season_id>&isFinished=true
[
{
"country": {"iso": "PT", "name": "Portugal"},
"event_files": {...},
...
}
]
https://api.motogp.pulselive.com/motogp/v1/results/sessions?eventUuid=<event_id>&categoryUuid=<category_id>
[
{
"date": "2023-03-24T10:45:00+00:00",
"number": 1,
"condition": {...},
...
}
]
This section explains how to fetch results for a particular MotoGP race session.
https://api.motogp.pulselive.com/motogp/v1/results/session/<session_id>/classification?test=false
GET
session_id
: The unique identifier for the session.To retrieve results for a specific race session, use the session ID obtained from the 'List Sessions' API. For instance, to get results for the session with the ID cb7655d9-387b-4247-9bbe-a067bbe484ff
, the request URL will be:
https://api.motogp.pulselive.com/motogp/v1/results/session/cb7655d9-387b-4247-9bbe-a067bbe484ff/classification?test=false
A successful request will return a JSON response containing the classification of riders for the session. Here is a snippet of what the response might look like:
{
"classification": [
{
"id": "f5315e45-c742-4e94-a1d3-5dbee24b5edb",
"position": 1,
"rider": {
"full_name": "Alex Marquez",
"country": {"iso": "ES", "name": "Spain"},
"number": 73
// more rider details...
},
"team": {
"name": "Gresini Racing MotoGP",
// more team details...
},
"constructor": {
"name": "Ducati",
// more constructor details...
},
"best_lap": {"number": 12, "time": "01:38.7820"},
"total_laps": 15,
"top_speed": 339.6,
"gap": {"first": "0.000", "prev": "0.000"},
"status": "INSTND"
},
// more riders...
]
}
This section details how to obtain the standings for a specific MotoGP season and category.
https://api.motogp.pulselive.com/motogp/v1/results/standings?seasonUuid=<season_id>&categoryUuid=<category_id>
GET
seasonUuid
: The unique identifier for the season.categoryUuid
: The unique identifier for the category.To get the standings for the MotoGP category in the 2023 season, use the following request URL:
https://api.motogp.pulselive.com/motogp/v1/results/standings?seasonUuid=db8dc197-c7b2-4c1b-b3a4-6dc534c023ef&categoryUuid=e8c110ad-64aa-4e8e-8a86-f2f152f6a942
The API response provides details about the riders' standings, including their position, points, team, and more. Here's a snippet of the response:
{
"classification": [
{
"position": 1,
"rider": {"full_name": "Francesco Bagnaia", "country": {"iso": "IT", "name": "Italy"}, "number": 1},
"team": {"name": "Ducati Lenovo Team"},
"constructor": {"name": "Ducati"},
"session": "RAC",
"points": 412
},
// More riders...
],
"file": "https://resources.motogp.com/files/results/2023/MAL/MotoGP/RAC/worldstanding.pdf"
}
This project is licensed under the MIT License - see the LICENSE.md file for details.
The data utilized in this project is sourced from the official MotoGP APIs. This includes race results, standings, and other related information.
All data provided through these APIs is the property of MotoGP or its respective owners. The use of this data within this project is for informational and non-commercial purposes.
This project is not affiliated with, endorsed by, or in any way officially connected with MotoGP or any of its subsidiaries or affiliates. The official MotoGP website can be found at https://www.motogp.com.
If there are any concerns or questions regarding the use of MotoGP data in this project, or if it is believed that the data usage infringes on any rights or terms of use, please reach out to hello@micheleberardi.com for immediate action.
https://api.motogp.pulselive.com/motogp/v1/timing-gateway/livetiming-lite