Site
Home / Forum / Developers / Formula 1 or MotoGP API


Formula 1 or MotoGP API


Posted: 29 May 2024 20:59
qwarz987
User
Edits: 0
Posts: 3
Joined: 2024

Hello Everyone! I'm searching this site but I really can't find or simply figure out if there is Formula 1, or MotoGP, free API here. As web designer and former F1 fun I thought to build small website feeded with Json format data, just as small personal project with which I can learn and play with Angular and Vue.js. I found this page: thesportsdb.com/free_sports_api , but no Formula1 API there. I found, for example, this page: thesportsdb.com/event/1963777-Monaco-Grand-Prix , but I can't see any Json format data. Can You enlight me or just give my some advice what could I do? Thanks in advance. Kind regards, Yuriy.

transparent spacer
Posted: 29 May 2024 21:32

curswine
Admin
Edits: 1,133,455
Posts: 1,269
Joined: 2020

https://www.thesportsdb.com/api/v1/json/3/searchevents.php?e=Monaco_Grand_Prix&s=2024

Is a free method for getting event data. Switch around the event names and season for other events.

transparent spacer
Posted: 30 May 2024 07:34
qwarz987
User
Edits: 0
Posts: 3
Joined: 2024

https://www.thesportsdb.com/api/v1/json/3/searchevents.php?e=Monaco_Grand_Prix&s=2024

Is a free method for getting event data. Switch around the event names and season for other events.


Hi @curswine,
and thanks for reply. Ok, but as I understand it's not lets say so called "dedicated" Formula 1 API, is it? I can not see for example who was the winner of the race in the query above. For example, how can I "connect" seasons / years with circuits, or circuits with drivers, or drivers with all the races they did etc etc? Do You understand what I'm talking about?.. Thanks. And wish You have a good day! Y

transparent spacer
Posted: 30 May 2024 07:47

curswine
Admin
Edits: 1,133,455
Posts: 1,269
Joined: 2020

For results you would get the idEvent - '1963777' from that first API call and then feed it into this API call https://www.thesportsdb.com/api/v1/json/3/eventresults.php?id=1963777 which will give you the results from the race.

qwarz987, zag
transparent spacer
Posted: 30 May 2024 12:18
qwarz987
User
Edits: 0
Posts: 3
Joined: 2024

For results you would get the idEvent - '1963777' from that first API call and then feed it into this API call https://www.thesportsdb.com/api/v1/json/3/eventresults.php?id=1963777 which will give you the results from the race.
Thanks again for reply. Ok, so as I understand You want to say that even with these lets call'em very "generic" or "universal" queries it's possible to build something basic about F1 seasons, teams, and players, and it could work for past years too perhaps. Just putting and combining those "universal" queries right way. Well, I probably have to give it a deeper look and study it better. Thanks again. Regards, Yuriy.

transparent spacer
Posted: 30 May 2024 13:24

curswine
Admin
Edits: 1,133,455
Posts: 1,269
Joined: 2020

If the data is there, yes. Most of the result data is only applicable to more recent seasons.

You're welcome to register as an editor and add historical data yourself.

zag
transparent spacer
Posted: 30 May 2024 18:12

zag
Admin
Edits: 186,048
Posts: 4,042
Joined: 2020

F1 and MotoGP is pretty well filled for the latest season:

https://www.thesportsdb.com/season/4370-Formula-1/2024
https://www.thesportsdb.com/season/4407-MotoGP/2024

Data available on our API includes event times, artwork, TV schedules, event rating, Youtube Highlights, Twitter links, Circuit Maps, Driver standings as well as usually an event report.

It's pretty good once you dig into the data

transparent spacer
Posted: 28 Feb 2025 09:42

curswine
Admin
Edits: 1,133,455
Posts: 1,269
Joined: 2020

@exotic308 Please don't post entire JSONs it makes your message hard to read.

Please just post the endpoints and what you expect to find and what you're looking for.

transparent spacer
Posted: 24 Mar 2025 08:51
francescofipertani
Editor Premium
Edits: 0
Posts: 9
Joined: 2025

Hello, I'm looking for the API to get the updated standings for formula 1. Can you please help me?

transparent spacer
Posted: 24 Mar 2025 08:54

curswine
Admin
Edits: 1,133,455
Posts: 1,269
Joined: 2020

Its not something we can provide.

transparent spacer
Posted: 12 Aug 2026 10:11
JFieldsend
Editor Premium
Posts: 15
Joined: 2026

Hi — I’m testing the F1 results endpoints and noticed that eventresults.php appears to return only classified finishers for the races - not those who retired.

For example, the 2026 Australian Grand Prix (id=2408111) returns 16 results, whereas the official F1 classification has 22 entries, including DNFs/DNSs/non-classified drivers.

Is that an intentional limitation of the current data import/source, or is there another endpoint or field that includes the full classification and driver statuses?

I’m building a TV sports-results app and, for F1 fans, showing a result without retirements and non-starters would be misleading—so I’d be very interested in helping validate or contribute a solution if that is useful.

Thanks in advance.

transparent spacer
Posted: 12 Aug 2026 11:00

curswine
Admin
Edits: 1,133,455
Posts: 1,269
Joined: 2020

Hi — I’m testing the F1 results endpoints and noticed that eventresults.php appears to return only classified finishers for the races - not those who retired.

For example, the 2026 Australian Grand Prix (id=2408111) returns 16 results, whereas the official F1 classification has 22 entries, including DNFs/DNSs/non-classified drivers.

Is that an intentional limitation of the current data import/source, or is there another endpoint or field that includes the full classification and driver statuses?

I’m building a TV sports-results app and, for F1 fans, showing a result without retirements and non-starters would be misleading—so I’d be very interested in helping validate or contribute a solution if that is useful.

Thanks in advance.


The website is crowd sourced, if something is missing then please add it.


transparent spacer
Posted: 12 Aug 2026 12:09
JFieldsend
Editor Premium
Posts: 15
Joined: 2026

Thanks — I don’t mind helping populate missing information where I can. My question was really whether the omissions are intentional or a known limitation of the F1 import/data model.

It seems unusual that every DNF, DNS and non-classified entry is omitted, rather than appearing with its correct status. Is the source data only importing classified finishers, or is there another reason those rows are excluded?

transparent spacer
Posted: 12 Aug 2026 16:00

curswine
Admin
Edits: 1,133,455
Posts: 1,269
Joined: 2020

As as F1 goes, I just built a rudimentary scraper to get the results from formula1.com and post them to the race here.

I'll check what my scraper is doing. Could be dropping those rows before adding, or the website might be rejecting dnf as an input rather than a time. I think it might be the former.

But please add anything you see missing,and thanks for pointing out a potential problem with my scraper.

You can also input the results as csvs in the results field with the position, driver name, and time and it can be synced to the results.


transparent spacer
Posted: 12 Aug 2026 18:39
JFieldsend
Editor Premium
Posts: 15
Joined: 2026

Thanks - I tried to add Lance Stroll’s 2026 Australian Grand Prix result. He was NC (not classified), having completed 43 laps and finished 15 laps down. The edit form requires a numeric Race Position and does not accept NC or a blank value, so the record cannot be entered accurately.
Could Race Position accept non-numeric classification statuses such as NC and DQ?

transparent spacer
Posted: 12 Aug 2026 19:23

curswine
Admin
Edits: 1,133,455
Posts: 1,269
Joined: 2020

Thanks - I tried to add Lance Stroll’s 2026 Australian Grand Prix result. He was NC (not classified), having completed 43 laps and finished 15 laps down. The edit form requires a numeric Race Position and does not accept NC or a blank value, so the record cannot be entered accurately.
Could Race Position accept non-numeric classification statuses such as NC and DQ?


Thanks for looking into that for me, That is probably what my script is failing on, as there is no numeric position it just doesn't add them.

I am unable to alter anything backend related myself. Looking at how the DNF has been handled here in this MotoGP event https://www.thesportsdb.com/event/2368486-great-britain-gp I think assigning the next possible numerical value and writing in the number of laps which is what I've done on the Australia GP event you mentioned using the 'csv' method. https://www.thesportsdb.com/event/2408111-australian-grand-prix

transparent spacer
Posted: 12 Aug 2026 20:24
JFieldsend
Editor Premium
Posts: 15
Joined: 2026

Thanks - that structure makes sense. Just a couple of corrections for the Australian GP result, Oscar Piastri and Nico Hulkenberg should be marked as DNS (Did not start) - i've updated the results description field, but i don't know how to get it to update the results table.

curswine
transparent spacer
Posted: 12 Aug 2026 20:48

curswine
Admin
Edits: 1,133,455
Posts: 1,269
Joined: 2020

Thanks - that structure makes sense. Just a couple of corrections for the Australian GP result, Oscar Piastri and Nico Hulkenberg should be marked as DNS (Did not start) - i've updated the results description field, but i don't know how to get it to update the results table.

You might not have the rights to delete and sync results. If you do there would be a little red cross (x) icon next to each result, and a blue refresh icon next to 'Result Description'.

I have deleted the ones you mentioned and refreshed the results.

transparent spacer
Posted: 12 Aug 2026 20:55
JFieldsend
Editor Premium
Posts: 15
Joined: 2026

Thanks - i have the sync but not the delete capability.

zag
transparent spacer
Posted: 13 Aug 2026 06:31

curswine
Admin
Edits: 1,133,455
Posts: 1,269
Joined: 2020

Thanks - i have the sync but not the delete capability.

Just post here any result you might require deleting and I'll get them done for you.

transparent spacer
Showing 0 to 20 (Total: 20)