Description
Get detailed match events and commentary for a specific World Cup match. Includes goals, cards, substitutions, and other match events with timestamps and player information.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
key |
string | Yes | Your API key for authentication |
match_id |
integer | Yes | The unique identifier of the match |
lang |
string | No | Language code (es, fr, de, etc.) - defaults to English |
Example Request
GET /events?key=YOUR_API_KEY
Example Response
{
"match": {
"id": "335680",
"date": "2022-06-13",
"time": "FT",
"status": "FINISHED",
"last_changed": "2022-06-13 20:38:40",
"location": "Stade de France",
"fixture_id": "1527012",
"scheduled": "18:45",
"odds": {
"pre": {
"1": 1.44,
"2": 8,
"X": 4.5
},
"live": {
"1": 506.96,
"2": 1.02,
"X": 26.31
}
},
"outcomes": {
"half_time": "2",
"full_time": "2",
"extra_time": null,
"penalty_shootout": null
},
"scores": {
"score": "0 - 1",
"ht_score": "0 - 1",
"ft_score": "0 - 1",
"et_score": "",
"ps_score": ""
},
"home": {
"id": 1439,
"name": "France",
"logo": "https://cdn.worldcupapi.com/teams/f762fd07a14509496998fff35234ffdb.png"
},
"away": {
"id": 211,
"name": "Croatia",
"logo": "https://cdn.worldcupapi.com/teams/5359e81da2c5812b807dc8d1c00d45b1.png"
}
},
"event": [
{
"id": 301311568,
"player": {
"id": 14958,
"name": "Luka Modric"
},
"time": 5,
"event": "GOAL_PENALTY",
"sort": 0,
"info": null,
"is_home": false,
"is_away": false,
"label": "Goal from penalty"
},
{
"id": 301311569,
"player": {
"id": 1331,
"name": "Matteo Guendouzi"
},
"time": 18,
"event": "YELLOW_CARD",
"sort": 1,
"info": null,
"is_home": false,
"is_away": false,
"label": "Yellow card"
},
{
"id": 301311570,
"player": {
"id": 2377,
"name": "Benjamin Pavard"
},
"time": 45,
"event": "SUBSTITUTION",
"sort": 2,
"info": {
"id": 16226,
"name": "Jules Kounde"
},
"is_home": false,
"is_away": false,
"label": "Substitution"
},
{
"id": 301311571,
"player": {
"id": 12034,
"name": "Aurelien Tchouameni"
},
"time": 45,
"event": "SUBSTITUTION",
"sort": 3,
"info": {
"id": 11571,
"name": "Boubacar Kamara"
},
"is_home": false,
"is_away": false,
"label": "Substitution"
},
{
"id": 301311572,
"player": {
"id": 9161,
"name": "Marcelo Brozovic"
},
"time": 50,
"event": "YELLOW_CARD",
"sort": 4,
"info": null,
"is_home": false,
"is_away": false,
"label": "Yellow card"
},
{
"id": 301311573,
"player": {
"id": 2377,
"name": "Benjamin Pavard"
},
"time": 62,
"event": "YELLOW_CARD",
"sort": 5,
"info": null,
"is_home": false,
"is_away": false,
"label": "Yellow card"
},
{
"id": 301311574,
"player": {
"id": 5320,
"name": "Lovro Majer"
},
"time": 65,
"event": "SUBSTITUTION",
"sort": 6,
"info": {
"id": 1502,
"name": "Mario Pasalic"
},
"is_home": false,
"is_away": false,
"label": "Substitution"
},
{
"id": 301311575,
"player": {
"id": 9562,
"name": "Adrien Rabiot"
},
"time": 67,
"event": "YELLOW_CARD",
"sort": 7,
"info": null,
"is_home": false,
"is_away": false,
"label": "Yellow card"
},
{
"id": 301311576,
"player": {
"id": 8816,
"name": "Andrej Kramaric"
},
"time": 72,
"event": "SUBSTITUTION",
"sort": 8,
"info": {
"id": 11341,
"name": "Ante Budimir"
},
"is_home": false,
"is_away": false,
"label": "Substitution"
},
{
"id": 301311577,
"player": {
"id": 2368,
"name": "Kingsley Coman"
},
"time": 73,
"event": "SUBSTITUTION",
"sort": 9,
"info": {
"id": 14842,
"name": "Christopher Nkunku"
},
"is_home": false,
"is_away": false,
"label": "Substitution"
},
{
"id": 301311578,
"player": {
"id": 4961,
"name": "Nikola Vlasic"
},
"time": 73,
"event": "SUBSTITUTION",
"sort": 10,
"info": {
"id": 20113,
"name": "Josip Brekalo"
},
"is_home": false,
"is_away": false,
"label": "Substitution"
},
{
"id": 301311579,
"player": {
"id": 2185,
"name": "Antoine Griezmann"
},
"time": 80,
"event": "SUBSTITUTION",
"sort": 11,
"info": {
"id": 1331,
"name": "Matteo Guendouzi"
},
"is_home": false,
"is_away": false,
"label": "Substitution"
},
{
"id": 301311580,
"player": {
"id": 44535,
"name": "Luka Sucic"
},
"time": 91,
"event": "SUBSTITUTION",
"sort": 12,
"info": {
"id": 4346,
"name": "Mateo Kovacic"
},
"is_home": false,
"is_away": false,
"label": "Substitution"
}
]
}
Code Examples
JavaScript (Fetch)
const response = await fetch('https://api.worldcupapi.com/events?key=YOUR_API_KEY');
const data = await response.json();
console.log(data);
Python (Requests)
import requests
url = 'https://api.worldcupapi.com/events'
params = {'key': 'YOUR_API_KEY'}
response = requests.get(url, params=params)
data = response.json()
print(data)
PHP (cURL)
$url = 'https://api.worldcupapi.com/events?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/events?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/events?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/events?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/events?key=YOUR_API_KEY')
response = Net::HTTP.get_response(uri)
data = JSON.parse(response.body)