Site
Home / Forum / Developers / La Liga teams

La Liga teams


Posted: 29 Sep 2023 11:37
Sondrak

Posts: 4
Joined: 2023

Hello!

I'm trying to fetch all the Spanish La Liga teams using the free endpoint provided (https://www.thesportsdb.com/api/v1/json/3/search_all_teams.php?s=Soccer&c=Spain) but after filtering to match only the first division teams it only returns an array of 6 teams.

Is this response intended? I noticed i can fetch all 20 teams for the Premier League so i'm not sure if it's my fault or not. Is it beacause it's a free link?


Posted: 29 Sep 2023 13:07
curswine


Posts: 938
Joined: 2020

The free tier only returns 50 teams, so you're filtering the first 50 teams, 6 of which are LaLiga teams.

300 teams are returned using a Patreon key.

Sondrak, zag
Posted: 13 Feb 2024 02:13
Sondrak

Posts: 4
Joined: 2023

I bring this post up to ask if you could rename a few teams because it's hurting my eyes haha

Ath Madrid => Atletico Madrid
Ath Bilbao => Athletic Club (this is the official name)
Sociedad => Real Sociedad
Vallecano => Rayo Vallecano
Alaves => Deportivo Alaves
Betis = Real Betis (this one isn't as bad but it wouldn't hurt)

Thanks!

zag
Posted: 13 Feb 2024 08:24
curswine


Posts: 938
Joined: 2020

You could either use `strAlternate` or create your own dictionary in your code.

Posted: 13 Feb 2024 17:17

zag


Posts: 3,515
Joined: 2020

I bring this post up to ask if you could rename a few teams because it's hurting my eyes haha

Ath Madrid => Atletico Madrid
Ath Bilbao => Athletic Club (this is the official name)
Sociedad => Real Sociedad
Vallecano => Rayo Vallecano
Alaves => Deportivo Alaves
Betis = Real Betis (this one isn't as bad but it wouldn't hurt)

Thanks!


Agreed, I will rename at the end of the season though as not to cause issues with event names.

Posted: 13 Feb 2024 18:26
Sondrak

Posts: 4
Joined: 2023

You could either use `strAlternate` or create your own dictionary in your code.

There is no strAlternate in some responses i think, it's been a while since i used the api. About the dictionary i had no idea i could do that, i'll look into it.

Posted: 14 Feb 2024 07:31
curswine


Posts: 938
Joined: 2020

There is no strAlternate in some responses i think, it's been a while since i used the api. About the dictionary i had no idea i could do that, i'll look into it.

You can add them yourself, if you don't have editing rights you can apply for them here https://www.thesportsdb.com/forum_topic.php?t=5726


zag

Who is Online?

In total there are 68 users online :: 3 registered, 0 hidden and 65 guests (based on users active over the past 5 minutes) Most users ever online was 424 on Fri Nov 10, 2017 9:02 pm

About Us

Discussion forum for TheSportsDB.com site and related topics

Rules

- Be Polite
- Respect other users
- Always post log files with issues
- Try to be helpful
- No Piracy discussion

Showing 0 to 7 (Total: 7)