Site
Home / Forum / Developers / More than 5 latest events by team ID

More than 5 latest events by team ID


Posted: 11 Feb 2025 01:01
equilibrado
Editor
Posts: 2
Joined: 2023

Hello Guys, i am new in the community and newbie in programming too, is there any API call that i can see more than just 5 last events by team?

I am working on a personal project, but in my mapping I need the last 15 matches per team.

Could you help me? Is there any way to obtain this information via an API call?

transparent spacer
Posted: 11 Feb 2025 08:47

zag
Admin
Posts: 3,848
Joined: 2020

Hello Guys, i am new in the community and newbie in programming too, is there any API call that i can see more than just 5 last events by team?

I am working on a personal project, but in my mapping I need the last 15 matches per team.

Could you help me? Is there any way to obtain this information via an API call?


Sure just lookup the whole season then search for the team id.

That will give you all the upcoming fixtures.

transparent spacer
Posted: 15 Feb 2025 12:06

zag
Admin
Posts: 3,848
Joined: 2020

I've also introduced a method for the v2 api to show all events by team id for the season. Hopefully this helps.

transparent spacer
Posted: 15 Aug 2025 20:06
nextmatch
Editor Premium
Posts: 19
Joined: 2025

I agree that it would be nice to be able to get a bit more than 5 previous / next events of a team.
This is the most practical endpoint when your interested in a particular team.

Other endpoints such as https://www.thesportsdb.com/api/v2/json/schedule/full/team/ {id} seem to be limited to a single league, whereas a team can participate to multiple competitions.

By the way, the API v2 documentation states "Next 10 Events in Team" and then the deion says "List the next 5 events for a team using its unique ID {idTeam}".

Would be greatly appreciated if /api/v2/json/schedule/previous/team/{id} and /api/v2/json/schedule/previous/team/{id} could be increased to at least 10.

Many thanks for considering!
Cheers


zag
transparent spacer
Posted: 16 Aug 2025 21:25

zag
Admin
Posts: 3,848
Joined: 2020

Is there actually a use case for more than 5 events for teams? I can understand leagues as it needs to show the whole next round but for teams i'm not so sure. It would effectively double the payload data size to increase to 10.

transparent spacer
Posted: 17 Aug 2025 07:51
nextmatch
Editor Premium
Posts: 19
Joined: 2025

I've been tinkering with a small football schedule app where I want to show the recent results and upcoming matches of a team.
I find that 5 is a bit too low for this app.
You can check out the "beta" here: https://whenisthematch.com/
(match results aren't available yet)

I would consider keeping 5 events for the default /api/v2/json/schedule/previous/team/{id} and /api/v2/json/schedule/next/team/{id} APIs, but add support for a limit=xx query param to increase the number of results on demand, if that's possible?
This same principle could be applied to most /api/v2/json/schedule/* APIs

transparent spacer
Posted: 19 Aug 2025 10:03

zag
Admin
Posts: 3,848
Joined: 2020

I've been tinkering with a small football schedule app where I want to show the recent results and upcoming matches of a team.
I find that 5 is a bit too low for this app.
You can check out the "beta" here: https://whenisthematch.com/
(match results aren't available yet)

I would consider keeping 5 events for the default /api/v2/json/schedule/previous/team/{id} and /api/v2/json/schedule/next/team/{id} APIs, but add support for a limit=xx query param to increase the number of results on demand, if that's possible?
This same principle could be applied to most /api/v2/json/schedule/* APIs


Cool I have now increased to 10 for team and 20 for league next schedule.

transparent spacer
Posted: 19 Aug 2025 18:56
nextmatch
Editor Premium
Posts: 19
Joined: 2025

Very nice of you, thanks!

transparent spacer
Showing 0 to 8 (Total: 8)