← Back to Documentation

Top Disciplinary

GET https://api.worldcupapi.com/cards

Description

Get top disciplinary statistics (cards) for World Cup 2026. Includes yellow cards, red cards, and total disciplinary points for teams and players.

Parameters

Name Type Required Description
key string Yes Your API key for authentication
lang string No Language code (es, fr, de, etc.) - defaults to English

Example Request

GET /cards?key=YOUR_API_KEY

Example Response

[
	{
	  "red_cards": 1,
	  "yellow_cards": 3,
	  "played": 1,
	  "team": {
		"id": 1438,
		"name": "Spain",
		"logo": "https://cdn.worldcupapi.com/teams/0d9bf5d8117ac245f6fcb1e63af9c8ff.png"
	  },
	  "player": {
		"id": 14960,
		"name": "Dani Carvajal",
		"photo": "https://cdn.worldcupapi.com/players/4/f/c/5/4fc5e22514f6323e66d2226402fcc8fc.png"
	  }
	},
	{
	  "red_cards": 1,
	  "yellow_cards": 2,
	  "played": 1,
	  "team": {
		"id": 1722,
		"name": "Czech Republic",
		"logo": "https://cdn.worldcupapi.com/teams/b6bde8f91c8555f1b86f2a1efecafb22.png"
	  },
	  "player": {
		"id": 18814,
		"name": "Antonin Barak",
		"photo": "https://cdn.worldcupapi.com/players/7/d/a/1/7da14b79a1aa9f61a28f0f972290f420.png"
	  }
	},
	{
	  "red_cards": 1,
	  "yellow_cards": 0,
	  "played": 1,
	  "team": {
		"id": 1744,
		"name": "Turkey",
		"logo": "https://cdn.worldcupapi.com/teams/0540263e7247b8fc3417ea6b1fa353b1.png"
	  },
	  "player": {
		"id": 26363,
		"name": "Bertug Ozgur Yildirim",
		"photo": "https://cdn.worldcupapi.com/players/e/8/3/4/e8349b4c48f9678248af8c5e8148a16e.png"
	  }
	}
]

Code Examples

JavaScript (Fetch)

const response = await fetch('https://api.worldcupapi.com/cards?key=YOUR_API_KEY');
const data = await response.json();
console.log(data);

Python (Requests)

import requests

url = 'https://api.worldcupapi.com/cards'
params = {'key': 'YOUR_API_KEY'}
response = requests.get(url, params=params)
data = response.json()
print(data)
			

PHP (cURL)

$url = 'https://api.worldcupapi.com/cards?key=YOUR_API_KEY';
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
			

Java (HttpURLConnection)

URL url = new URL("https://api.worldcupapi.com/cards?key=YOUR_API_KEY");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String response = in.readLine();
			

C# (HttpClient)

using (var client = new HttpClient())
{
	var response = await client.GetAsync("https://api.worldcupapi.com/cards?key=YOUR_API_KEY");
	var content = await response.Content.ReadAsStringAsync();
	var data = JsonSerializer.Deserialize<object>(content);
}
			

Go

import (
	"encoding/json"
	"net/http"
)

resp, err := http.Get("https://api.worldcupapi.com/cards?key=YOUR_API_KEY")
if err != nil {
	log.Fatal(err)
}
defer resp.Body.Close()

var data map[string]interface{}
json.NewDecoder(resp.Body).Decode(&data)
			

Ruby

require 'net/http'
require 'json'

uri = URI('https://api.worldcupapi.com/cards?key=YOUR_API_KEY')
response = Net::HTTP.get_response(uri)
data = JSON.parse(response.body)