{
"get": "fixtures",
"parameters": {
"live": "all"
},
"errors": [],
"results": 43,
"paging": {
"current": 1,
"total": 1
},
"response": [
{
"fixture": {
"id": 1328845,
"referee": null,
"timezone": "UTC",
"date": "2025-07-12T12:30:00+00:00",
"timestamp": 1752323400,
"periods": {
"first": 1752323400,
"second": null
},
"venue": {
"id": 21763,
"name": "Skreia ipl kunstgress",
"city": "Skreia"
},
"status": {
"long": "First Half",
"short": "1H",
"elapsed": 25,
"extra": null
}
},
"league": {
"id": 774,
"name": "3. Division - Girone 1",
"country": "Norway",
"logo": "https://media.api-sports.io/football/leagues/774.png",
"flag": "https://media.api-sports.io/flags/no.svg",
"season": 2025,
"round": "Group 1 - 14",
"standings": true
},
"teams": {
"home": {
"id": 23420,
"name": "Sortland",
"logo": "https://media.api-sports.io/football/teams/23420.png",
"winner": null
},
"away": {
"id": 6974,
"name": "Bćrum",
"logo": "https://media.api-sports.io/football/teams/6974.png",
"winner": null
}
},
"goals": {
"home": 0,
"away": 0
},
"score": {
"halftime": {
"home": 0,
"away": 0
},
"fulltime": {
"home": null,
"away": null
},
"extratime": {
"home": null,
"away": null
},
"penalty": {
"home": null,
"away": null
}
},
"events": []
},
{
"fixture": {
"id": 1394987,
"referee": null,
"timezone": "UTC",
"date": "2025-07-12T12:00:00+00:00",
"timestamp": 1752321600,
"periods": {
"first": 1752321600,
"second": null
},
"venue": {
"id": 21680,
"name": "Estádio Deputado Galdino Leite",
"city": "Salvador, Bahia"
},
"status": {
"long": "Halftime",
"short": "HT",
"elapsed": 45,
"extra": null
}
},
"league": {
"id": 1073,
"name": "Baiano U20",
"country": "Brazil",
"logo": "https://media.api-sports.io/football/leagues/1073.png",
"flag": "https://media.api-sports.io/flags/br.svg",
"season": 2025,
"round": "Round of 16",
"standings": false
},
"teams": {
"home": {
"id": 25814,
"name": "Galícia U20",
"logo": "https://media.api-sports.io/football/teams/25814.png",
"winner": false
},
"away": {
"id": 13017,
"name": "Jacuipense U20",
"logo": "https://media.api-sports.io/football/teams/13017.png",
"winner": true
}
},
"goals": {
"home": 1,
"away": 2
},
"score": {
"halftime": {
"home": 1,
"away": 2
},
"fulltime": {
"home": null,
"away": null
},
"extratime": {
"home": null,
"away": null
},
"penalty": {
"home": null,
"away": null
}
},
"events": []
}
]
}
####
Bareword "name" not allowed while "strict subs" in use at rss.pl line 26.
Bareword "name" not allowed while "strict subs" in use at rss.pl line 27.
####
#!/usr/bin/perl
use warnings;
use LWP::UserAgent;
use HTTP::Request;
use JSON;
my $url = "https://v3.football.api-sports.io/fixtures?live=all";
my $ua = LWP::UserAgent->new;
my $req = HTTP::Request->new(GET => $url);
$req->header('x-rapidapi-host' => 'v3.football.api-sports.io');
$req->header('x-rapidapi-key' => '.......');
my $response = $ua->request($req);
my $parse_json = JSON::XS->new->decode ($response->content);
my @matches = $parse_json->[1]; # Get all results in "response": [ ]
if ($response->is_success) {
foreach my $results (@matches) {
my $matche_status = $results->{status}->{short};
my $teamA = $results->{teams}->{home}>{name};
my $teamB = $results->{teams}->{away}>{name};
my $teamA_scores_HT = $results->{score}->{halftime}->{home};
my $teamB_scores_HT = $results->{score}->{halftime}->{away};
my $teamA_scores_FT = $results->{score}->{fulltime}->{home};
my $teamB_scores_FT = $results->{score}->{fulltime}->{away};
print "$matche_status | $teamA has scored $teamA_scores_HT in Halftime | $teamA_scores_FT in fulltime"; # Get all Home teams results
print "$matche_status | $teamB has scored $teamB_scores_HT in Halftime | $teamB_scores_FT in fulltime"; # Get all Away teams results
# Print Such
# HT | Arsenal has scored 1 in halftime | 2 in fulltime
# FT | Chelsea has scored 2 in halftime | 3 in fulltime
}
} else {
print $response->status_line;
}