How to display injuries and suspensions for upcoming matches
Neste tutorial veremos como buscar e exibir lesoes e suspensoes de jogadores usando o endpoint /injuries.
In this tutorial we'll see how to fetch and display player injuries and suspensions using the /injuries endpoint.
O endpoint /injuries aceita filtros por time e temporada, ou por partida.
Vamos buscar as lesoes do Flamengo na temporada 2025.
The /injuries endpoint accepts filters by team and season, or by fixture.
Let's fetch Flamengo's injuries for the 2025 season.
const API_KEY = 'YOUR_API_KEY';
const BASE = 'https://football.api.insyde.one';
async function fetchApi(endpoint, params = {}) {
params.key = API_KEY;
const qs = new URLSearchParams(params).toString();
const res = await fetch(`${BASE}/${endpoint}?${qs}`);
return res.json();
}
// Get injuries for Flamengo, season 2025
const data = await fetchApi('injuries', { team: 127, season: 2025 });
console.log(`Injuries found: ${data.results}`);
A API retorna uma lista de jogadores lesionados ou suspensos, com dados do jogador, time, partida e liga:
The API returns a list of injured or suspended players, with player, team, fixture and league data:
{
"response": [
{
"player": {
"id": 10009,
"name": "Pedro",
"photo": "https://football.api.insyde.one/football/players/10009.png",
"type": "Missing Fixture",
"reason": "Knee Injury"
},
"team": {
"id": 127,
"name": "Flamengo",
"logo": "https://football.api.insyde.one/football/teams/127.png"
},
"fixture": {
"id": 1351048,
"timezone": "UTC",
"date": "2025-03-29T21:30:00+00:00"
},
"league": {
"id": 71,
"season": 2025,
"name": "Serie A",
"country": "Brazil"
}
},
...
]
}
O campo player.type indica o tipo de ausencia. O valor mais comum e "Missing Fixture", que indica que o jogador nao estara disponivel para a partida.
The player.type field indicates the type of absence. The most common value is "Missing Fixture", which means the player will not be available for the match.
O campo player.reason detalha o motivo. Valores comuns / The player.reason field details the cause. Common values:
"Knee Injury" — Lesao no joelho / Knee injury"Hamstring Injury" — Lesao muscular posterior da coxa / Hamstring injury"Muscle Injury" — Lesao muscular generica / Generic muscle injury"Suspended" — Suspenso por cartoes acumulados / Suspended due to accumulated cards"Inactive" — Inativo / Inactive"Red Card" — Suspenso por cartao vermelho / Suspended due to red cardreason para diferenciar visualmente lesoes (vermelho) de suspensoes (amarelo).
reason field to visually differentiate injuries (red) from suspensions (yellow).
O endpoint /injuries suporta as seguintes combinacoes de parametros / The /injuries endpoint supports the following parameter combinations:
?team=ID&season=YYYY&key=API_KEY — Todas as lesoes de um time na temporada / All injuries for a team in the season?fixture=ID&key=API_KEY — Lesoes de uma partida especifica / Injuries for a specific fixture?league=ID&season=YYYY&key=API_KEY — Todas as lesoes de uma liga na temporada / All injuries for a league in the season// By team + season
const byTeam = await fetchApi('injuries', { team: 127, season: 2025 });
// By fixture
const byFixture = await fetchApi('injuries', { fixture: 1351048 });
// By league + season
const byLeague = await fetchApi('injuries', { league: 71, season: 2025 });