Teams By League
This endpoint allows you to retrieve the teams from a specific league.
Multi-language: This feature allows the user to manually change the language of the API response by adding value to the
lang
attribute. Example:lang=en
.
Pagination: The endpoint uses an offset and limit system. Specify the offset and limit parameters to fetch the desired range of results. The maximum and default number of results per request is 50.
Update Period: The endpoint is updated every day.
Recommended Calls: Limit calls to 1 per day.
Use Cases
Get teams from a specific league_idhttps://baseball.sportdevs.com/teams-by-league?league_id=eq.{league_id}
Query Parameters
- league_id integer
Default value:
eq.2866
The id of the league
- offset string
Default value:
0
Limiting and Pagination
- limit string
Default value:
50
Limiting and Pagination
- lang string
Default value:
en
Multi-language
- 200
OK
- application/json
- Schema
- Example (from schema)
Schema array
- league_id integer
The id of the league
Note: This is a Foreign Key to
leagues.id
. - league_name text
The name of the league
- league_hash_image character varying
Possible values:
<= 64 characters
The hash image of the league
- teams jsonb
The teams
[
{
"league_id": 2866,
"league_name": "LMB",
"league_hash_image": "48196787f2961e1022aa9c2b09f6df68e15f2d7a0f378986257f09fb08bfbafe",
"teams": [
{
"id": 1805,
"name": "Pericos de Puebla",
"hash_image": "c55fc3acc73d779d51887ca14a1da0e4a3c9e960cc724faf9e7312b98268cf41"
},
{
"id": 1870,
"name": "Diablos Rojos del México",
"hash_image": "469e664c546d06fc7bc9e194d4c73b729c65a662f952eb17bdddeb22d5b2f2de"
},
{
"id": 46099,
"name": "Sultanes de Monterrey",
"hash_image": "f83b3fcc4068364fac32f39f10b7925116887320ad795f11f104a82c8679442d"
},
{
"id": 46195,
"name": "Tecolotes de los Dos Laredos",
"hash_image": "4e6eb583680ad5dd083a7e23b3d5b2045ab94be8f00f2589df74423e442328b0"
},
{
"id": 46225,
"name": "Toros De Tijuana",
"hash_image": "9896cb1073bac59fe33f65484a86539ae62d58ed681a7fb887df2b1c3f41a179"
},
{
"id": 46246,
"name": "Saraperos de Saltillo",
"hash_image": "12fbdaa1fc1aa61e1d054bdf53833e0f3ab3ab8e314d0d9e212f577413822ab3"
},
{
"id": 46265,
"name": "Acereros de Monclova",
"hash_image": "cef27abc28fc72975a2adaddac0249534c3123e653840f8d6018854d297d4a59"
},
{
"id": 46298,
"name": "Algodoneros de Unión Laguna",
"hash_image": "1c6fc42faacf50e3ab4d395706d2c968ab359e08dde9e74b61c837462acabf80"
},
{
"id": 46303,
"name": "Olmecas de Tabasco",
"hash_image": "bb6446c2f6a5062ff570fb53147cf80291016c50129723d899ce42d8ceb8bf91"
},
{
"id": 46346,
"name": "Leones de Yucatán",
"hash_image": "db12054e328fe6f3e438753b1426455da9d84e77f2fc1f134836dc801e9200cb"
},
{
"id": 46348,
"name": "Generales de Durango",
"hash_image": "7cb3f8565533a71e39c429a880ab338e83e82c7746f76cded2bcda7a701e40eb"
},
{
"id": 46383,
"name": "Mariachis de Guadalajara",
"hash_image": "b222a9aaa7b370cbd2d4e282b644ceaa7b39998e5444da697327561965097377"
},
{
"id": 46390,
"name": "Tigres de Quintana Roo",
"hash_image": "dbdd75bd0e9c7258beb42d7fc1c36971302a5eb843a1c47d88ef80f29258f10c"
},
{
"id": 46395,
"name": "Rieleros de Aguascalientes",
"hash_image": "4264ac3a4d800e9d90202dba079fb748837629888d7a4dc8e1dc990528e6278c"
},
{
"id": 46400,
"name": "Mariachis de Guadalajara",
"hash_image": "0399394e48a1acdb890d5016fc4d3ffb242ccf45940d288704f130ee4b494f55"
},
{
"id": 46412,
"name": "El Águila de Veracruz",
"hash_image": "0801f92f55e84d194dd5dcb16d01c2a67614e559c9a7541cfb31708f01f8b730"
},
{
"id": 46426,
"name": "Guerreros de Oaxaca",
"hash_image": "f2c12338e977d261711bc435c132d33469a4970356587620721228590732bb24"
},
{
"id": 46443,
"name": "Piratas de Campeche",
"hash_image": "65c034d17add2faabcf34212fe7ad634fb953686240a311dc446c13c16e1a268"
},
{
"id": 46462,
"name": "Bravos de León",
"hash_image": "fd4f123caa0089c47ad939d68782dd58010a86eb8290aad9b6d532eafe3b1a9f"
},
{
"id": 276182,
"name": "Jalisco",
"hash_image": "7d68920227416465716c6620f05faa48a33051a87b4a3804cb669961f14b3a1f"
},
{
"id": 279249,
"name": "Reynosa",
"hash_image": "4de75b8ed1611787c797ee8a99ab2a3a2e2436bb4567a6077b8037c546b1dea3"
}
]
}
]