PHPackages                             slvler/livescore-service - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. slvler/livescore-service

ActiveLibrary[API Development](/categories/api)

slvler/livescore-service
========================

live score service API for api-football.com

v2.0.0(1y ago)284406MITPHPPHP ^8.1

Since Mar 20Pushed 1y ago2 watchersCompare

[ Source](https://github.com/slvler/livescore-service)[ Packagist](https://packagist.org/packages/slvler/livescore-service)[ Docs](https://github.com/slvler/livescore-service)[ RSS](/packages/slvler-livescore-service/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (6)Versions (5)Used By (0)

Live Score Service
==================

[](#live-score-service)

[![tests](https://github.com/slvler/livescore-service/actions/workflows/Tests.yml/badge.svg)](https://github.com/slvler/livescore-service/actions/workflows/Tests.yml)[![Latest Stable Version](https://camo.githubusercontent.com/d91941123c7eb7d08ee33b480f7d6b12ed96c6e70bf6cdb40ee449f27d8b19a4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736c766c65722f6c69766573636f72652d736572766963652e737667)](https://packagist.org/packages/slvler/livescore-service)[![Total Downloads](https://camo.githubusercontent.com/4a18e42524afda33c88d3a612453705746169d3e9bc496e720ce8ccdcc6c3e8c/68747470733a2f2f706f7365722e707567782e6f72672f736c766c65722f6c69766573636f72652d736572766963652f646f776e6c6f616473)](https://packagist.org/packages/slvler/livescore-service)[![License](https://camo.githubusercontent.com/10c8d50351723c8fee6561bd02dd6f279db692298f6ffde959b8cb8014cbbec4/68747470733a2f2f706f7365722e707567782e6f72672f736c766c65722f6c69766573636f72652d736572766963652f6c6963656e7365)](https://packagist.org/packages/slvler/livescore-service)

Live Score Client for api-football.com

Welcome to Api-Football! You can use our API to access all API endpoints, which can get information about Football Leagues &amp; Cups.

Requirements
------------

[](#requirements)

- PHP 8.1
- Laravel 9.x | 10.x

Installation
------------

[](#installation)

To install this package tou can use composer:

```
composer require slvler/livescore-service
```

Usage
-----

[](#usage)

- First, you should extract the config/livescore.php file to the config folder.

```
php artisan vendor:publish --tag=livescore
```

- API key to be obtained from api-football.com address should be declared. This is your private API key, specific to this API.

```
'livescore' => [
    'base_url' => 'v3.football.api-sports.io',
    'api_key' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
]
```

Basic usage
-----------

[](#basic-usage)

### Example

[](#example)

```
use Slvler\LiveScoreService\LiveScoreClient;

$client = new LiveScoreClient();
```

Available methods
-----------------

[](#available-methods)

### General

[](#general)

#### [Status](https://www.api-football.com/documentation-v3)

[](#status)

Get the list status

```
$client->general()->getStatus();
```

### Countries

[](#countries)

#### [Countries](https://www.api-football.com/documentation-v3#tag/Countries)

[](#countries-1)

Get the list of available countries for the leagues endpoint.

```
$client->countries()->getAll();
```

The name and code fields can be used in other endpoints as filters.

```
$client->countries()->getAll(['code' => 'FR']);
```

### Leagues

[](#leagues)

#### [Countries](https://www.api-football.com/documentation-v3#tag/Leagues)

[](#countries-2)

Get the list of available leagues and cups. This endpoint also returns the coverage of each competition, which makes it possible to know what is available for that league or cup.

```
$client->leagues()->getLeagues(['season' => '2018', 'id' => '33']);
```

#### [Seasons](https://www.api-football.com/documentation-v3#tag/Leagues/operation/get-seasons)

[](#seasons)

All seasons are only 4-digit keys, so for a league whose season is 2018-2019 like the English Premier League (EPL), the 2018-2019 season in the API will be 2018.

```
$client->leagues()->getLeaguesSeasons();
```

### Teams

[](#teams)

#### [Teams Information](https://www.api-football.com/documentation-v3#tag/Teams)

[](#teams-information)

Get the list of available teams. The team id are unique in the API and teams keep it among all the leagues/cups in which they participate.

```
$client->team()->getTeamsInformation(['name' => 'manchester united']);
```

#### [Teams Statistics](https://www.api-football.com/documentation-v3#tag/Teams/operation/get-teams)

[](#teams-statistics)

The team id are unique in the API and teams keep it among all the leagues/cups in which they participate.

```
$client->team()->getTeamsStatistics(['league' => '39', 'team' => '33', 'season' => '2019']);
```

#### [Teams Seasons](https://www.api-football.com/documentation-v3#tag/Teams/operation/get-teams-seasons)

[](#teams-seasons)

Get the list of seasons available for a team.

```
$client->team()->getTeamsSeasons(['team' => '33']);
```

#### [Teams Countries](https://www.api-football.com/documentation-v3#tag/Teams/operation/get-teams-countries)

[](#teams-countries)

Get the list of countries available for the teams endpoint.

```
$client->team()->getTeamCountries();
```

### Venues

[](#venues)

#### [Venues](https://www.api-football.com/documentation-v3#tag/Venues)

[](#venues-1)

Get the list of available venues. The venue id are unique in the API.

```
$client->venues()->getVenues(['name' => 'Old Trafford']);
```

### Standings

[](#standings)

#### [Standings](https://www.api-football.com/documentation-v3#tag/Standings)

[](#standings-1)

Get the standings for a league or a team. Return a table of one or more rankings according to the league / cup.

```
$client->standings()->getStandings([ 'league' => '39', 'season' => '2019']);
```

### Fixtures

[](#fixtures)

#### [Rounds](https://www.api-football.com/documentation-v3#tag/Fixtures/operation/get-fixtures-rounds)

[](#rounds)

Get the rounds for a league or a cup. The round can be used in endpoint fixtures as filters

```
 $variable =  $client->fixtures()->getRounds(['league' => '39', 'season' => 2019]);
```

#### [Fixtures](https://www.api-football.com/documentation-v3#tag/Fixtures/operation/get-fixtures)

[](#fixtures-1)

For all requests to fixtures you can add the query parameter timezone to your request in order to retrieve the list of matches in the time zone of your choice like “Europe/London“

```
$client->fixtures()->getFixtures(['id' => '215662']);
```

#### [Head To Head](https://www.api-football.com/documentation-v3#tag/Fixtures/operation/get-fixtures-headtohead)

[](#head-to-head)

Get heads to heads between two teams.

```
$client->fixtures()->getHeadToHead(['h2h' => '33-34']);
```

#### [Statistics](https://www.api-football.com/documentation-v3#tag/Fixtures/operation/get-fixtures-statistics)

[](#statistics)

Get the statistics for one fixture.

```
$client->fixtures()->getStatistics(['fixture' => '215662']);
```

#### [Events](https://www.api-football.com/documentation-v3#tag/Fixtures/operation/get-fixtures-events)

[](#events)

Get the events from a fixture.

```
$client->fixtures()->getEvents(['fixture' => '215662']);
```

#### [Lineups](https://www.api-football.com/documentation-v3#tag/Fixtures/operation/get-fixtures-events)

[](#lineups)

Get the lineups for a fixture. Lineups are available between 20 and 40 minutes before the fixture when the competition covers this feature. You can check this with the endpoint leagues and the coverage field.

```
$client->fixtures()->getLineups(['fixture' => '592872']);
```

#### [Players statistics](https://www.api-football.com/documentation-v3#tag/Fixtures/operation/get-fixtures-players)

[](#players-statistics)

Get the players statistics from one fixture.

```
$client->fixtures()->getPlayersStatistics(['fixture' => '169080']);
```

### Injuries

[](#injuries)

#### [Injuries](https://www.api-football.com/documentation-v3#tag/Injuries/operation/get-injuries)

[](#injuries-1)

Get the list of players not participating in the fixtures for various reasons such as suspended, injured for example

```
$client->injuries()->getInjuries(['league' => '2', 'season' => '2020']);
```

### Predictions

[](#predictions)

#### [Predictions](https://www.api-football.com/documentation-v3#tag/Predictions/operation/get-predictions)

[](#predictions-1)

Get predictions about a fixture. The predictions are made using several algorithms including the poisson distribution, comparison of team statistics, last matches, players etc…

```
$client->predictions()->getPredictions(['fixture' => '198772']);
```

### Coachs

[](#coachs)

#### [Coachs](https://www.api-football.com/documentation-v3#tag/Coachs/operation/get-coachs)

[](#coachs-1)

Get all the information about the coachs and their careers.

```
$client->coachs()->getCoachs(['id' => '1']);
```

### Players

[](#players)

#### [Seasons](https://www.api-football.com/documentation-v3#tag/Players/operation/get-players-seasons)

[](#seasons-1)

Get all available seasons for players statistics.

```
$client->players()->getSeasons(['player' => '276']);
```

#### [Players](https://www.api-football.com/documentation-v3#tag/Players/operation/get-players)

[](#players-1)

Get players statistics.

```
$client->players()->getPlayers(['id' => '19088', 'season' => '2018']);
```

#### [Squads](https://www.api-football.com/documentation-v3#tag/Players/operation/get-players-squads)

[](#squads)

Return the current squad of a team when the team parameter is used. When the player parameter is used the endpoint returns the set of teams associated with the player.

```
$client->players()->getSquads(['team' => '33']);
```

#### [Top Scorers](https://www.api-football.com/documentation-v3#tag/Players/operation/get-players-topscorers)

[](#top-scorers)

Get the 20 best players for a league or cup.

```
$client->players()->getTopScorers(['season' => '2018', 'league' => '61']);
```

#### [Top Assists](https://www.api-football.com/documentation-v3#tag/Players/operation/get-players-topassists)

[](#top-assists)

Get the 20 best players assists for a league or cup.

```
$client->players()->getTopAssists(['season' => '2020', 'league' => '61']);
```

#### [Top Yellow Cards](https://www.api-football.com/documentation-v3#tag/Players/operation/get-players-topyellowcards)

[](#top-yellow-cards)

Get the 20 players with the most yellow cards for a league or cup.

```
$client->players()->getTopYellowCards(['season' => '2020', 'league' => '61']);
```

#### [Top Red Cards](https://www.api-football.com/documentation-v3#tag/Players/operation/get-players-topredcards)

[](#top-red-cards)

Get the 20 players with the most red cards for a league or cup.

```
$client->players()->getTopRedCards(['season' => '2020', 'league' => '61']);
```

### Transfers

[](#transfers)

#### [Transfers](https://www.api-football.com/documentation-v3#tag/Transfers/operation/get-transfers)

[](#transfers-1)

Get all available transfers for players and teams

```
$client->transfer()->getTransfer(['player' => '35845']);
```

### Trophies

[](#trophies)

#### [Transfers](https://www.api-football.com/documentation-v3#tag/Trophies/operation/get-trophies)

[](#transfers-2)

Get all available trophies for a player or a coach.

```
$client->trophies()->getTrophies(['player' => '35845']);
```

### Sidelined

[](#sidelined)

#### [Sidelined](https://www.api-football.com/documentation-v3#tag/Sidelined/operation/get-sidelined)

[](#sidelined-1)

Get all available sidelined for a player or a coach.

```
$client->sidelined()->getSidelined(['player' => '276']);
```

### Odds

[](#odds)

#### [Odds / Live](https://www.api-football.com/documentation-v3#tag/Odds-(In-Play)/operation/get-odds-live)

[](#odds--live)

This endpoint returns in-play odds for fixtures in progress.

```
$client->odds()->getOddsLive();
```

#### [Odds / Live / Bets](https://www.api-football.com/documentation-v3#tag/Odds-(In-Play)/operation/get-bets)

[](#odds--live--bets)

Get all available bets for in-play odds.

```
$client->odds()->getOddsLivBets(['id' => "1"]);
```

#### [Odds](https://www.api-football.com/documentation-v3#tag/Odds-(Pre-Match)/operation/get-odds)

[](#odds-1)

Get odds from fixtures, leagues or date.

```
$client->odds()->getOdds(['date' => "2020-05-15"]);
```

#### [Mapping](https://www.api-football.com/documentation-v3#tag/Odds-(Pre-Match)/operation/get-odds-mapping)

[](#mapping)

Get the list of available fixtures id for the endpoint odds.

```
$client->odds()->getOddsMapping();
```

#### [Bookmakers](https://www.api-football.com/documentation-v3#tag/Odds-(Pre-Match)/operation/get-bookmakers)

[](#bookmakers)

Get all available bookmakers.

```
$client->odds()->getOddsBookmakers();
```

#### [Bets](https://www.api-football.com/documentation-v3#tag/Odds-(Pre-Match)/operation/get-bets)

[](#bets)

Get all available bets for pre-match odds.

```
$client->odds()->getOddsBets();
```

### Testing

[](#testing)

```
    composer test
```

Credits
-------

[](#credits)

- [slvler](https://github.com/slvler)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](https://github.com/slvler/btcturk-api/blob/main/LICENSE) for more information.

Contributing
------------

[](#contributing)

You're very welcome to contribute. Please see [CONTRIBUTING](https://github.com/slvler/phone-validation/blob/main/CONTRIBUTING.md) for details.

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~207 days

Total

4

Last Release

531d ago

Major Versions

v1.0.2 → v2.0.02024-12-03

### Community

Maintainers

![](https://www.gravatar.com/avatar/0ab8128832fb3e8a0d513453a903d7c49475f5f89dbf7ec39cf1d0518026b7ea?d=identicon)[slvler](/maintainers/slvler)

---

Top Contributors

[![selviler](https://avatars.githubusercontent.com/u/56368718?v=4)](https://github.com/selviler "selviler (13 commits)")

---

Tags

api-clientapi-footballapi-restlarapilaravellaravel-apilaravel-frameworklaravel-rest-apisoccersoccer-analyticssoccer-datasoccer-gamephplaravellivescore

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/slvler-livescore-service/health.svg)

```
[![Health](https://phpackages.com/badges/slvler-livescore-service/health.svg)](https://phpackages.com/packages/slvler-livescore-service)
```

###  Alternatives

[dariusiii/tmdb-laravel

Laravel Package for TMDB ( The Movie Database ) API. Provides easy access to the wtfzdotnet/php-tmdb-api library.

1821.1k](/packages/dariusiii-tmdb-laravel)[madeitbelgium/wordpress-php-sdk

WordPress Laravel PHP SDK

4422.9k1](/packages/madeitbelgium-wordpress-php-sdk)[gufy/whmcs

WHMCS API for Laravel 5

201.7k](/packages/gufy-whmcs)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
