Como exibir lesoes e suspensoes

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.

1. Buscar lesoes / Get injuries

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}`);

2. Resposta da API / API response

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"
      }
    },
    ...
  ]
}

3. Tipos / Types

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:

Dica: Voce pode usar o campo reason para diferenciar visualmente lesoes (vermelho) de suspensoes (amarelo).
Tip: You can use the reason field to visually differentiate injuries (red) from suspensions (yellow).

4. Parametros / Parameters

O endpoint /injuries suporta as seguintes combinacoes de parametros / The /injuries endpoint supports the following parameter combinations:

// 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 });

5. Cache

Cache: Os dados de lesoes sao atualizados a cada 1 hora. Planeje suas chamadas de acordo para otimizar o uso da API.
Injury data is cached for 1 hour. Plan your calls accordingly to optimize API usage.

Back to Football API docs