PHPackages                             daniels/tankerkoenig-php-client - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. daniels/tankerkoenig-php-client

ActiveLibrary[HTTP &amp; Networking](/categories/http)

daniels/tankerkoenig-php-client
===============================

1.0.0(3y ago)0261MITPHPPHP ^8.0.3

Since Jul 29Pushed 4mo agoCompare

[ Source](https://github.com/SeifertDaniel/tankerkoenig-php-client)[ Packagist](https://packagist.org/packages/daniels/tankerkoenig-php-client)[ Fund](https://github.com/sponsors/SeifertDaniel)[ Fund](https://www.buymeacoffee.com/DanielSeifert)[ RSS](/packages/daniels-tankerkoenig-php-client/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (4)Versions (4)Used By (1)

Tankstellenkönig API client
===========================

[](#tankstellenkönig-api-client)

Simple client for tankstellenkoenig.de json api.

Inspired by

Forked from

Install
-------

[](#install)

```
composer require daniels/tankerkoenig-php-client

```

API-KEY
-------

[](#api-key)

The free Tankerkönig-Spritpreis-API is under creative commons.

Get your own API-Key here:

Usage
-----

[](#usage)

### Init API client

[](#init-api-client)

```
use DanielS\Tankerkoenig\ApiClient;
$apiClient = new ApiClient("your-api-key-here");

```

### Search for gas stations by location

[](#search-for-gas-stations-by-location)

```
// get over
$petrolStations = $apiClient->search(
    50.538472, //lat
    8.649647, //lng
    $apiClient::TYPE_E10 //your type of fuel
);

//echo results for testing
print_r($petrolStations);

```

### Gas station details

[](#gas-station-details)

```
//unique id of a petrol station
$petrolStationUuid = '51d4b6a2-a095-1aa0-e100-80009459e03a';

// returns an object of type \Lang\Tankerkoenig\PetrolStation
$petrolStation = $apiClient->detail($petrolStationUuid);

print_r($petrolStation);

```

### Current prices by station list

[](#current-prices-by-station-list)

```
$prices = $apiClient->prices([
    '51d4b6a2-a095-1aa0-e100-80009459e03a'
]);

//echo results for testing
print_r($prices);

```

### Complaints

[](#complaints)

```
$apiClient->complaint(
    '51d4b6a2-a095-1aa0-e100-80009459e03a',
    Complaint::WRONG_PRICE_E10,
    1.599
);

```

Changelog
---------

[](#changelog)

See [CHANGELOG](CHANGELOG.md) for further informations.

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

[](#contributing)

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue. Don't forget to give the project a star! Thanks again!

- Fork the Project
- Create your Feature Branch (git checkout -b feature/AmazingFeature)
- Commit your Changes (git commit -m 'Add some AmazingFeature')
- Push to the Branch (git push origin feature/AmazingFeature)
- Open a Pull Request

License
-------

[](#license)

(status: 2022-07-29)

Distributed under the MIT license.

```
Copyright: (c) 2017 Tobias Lang
           (c) 2022-present Daniel Seifert

This software is distributed under the MIT LICENSE.

```

For full copyright and licensing information, please see the [LICENSE](LICENSE.md) file distributed with this source code.

###  Health Score

33

—

LowBetter than 74% of packages

Maintenance53

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 97.4% 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

Unknown

Total

1

Last Release

1380d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c387b4e6c4b3d9c5691f5a879d7e272c10fe90aaf6ccef559fc2cfa59d2fd0c7?d=identicon)[DanielS](/maintainers/DanielS)

---

Top Contributors

[![SeifertDaniel](https://avatars.githubusercontent.com/u/9882400?v=4)](https://github.com/SeifertDaniel "SeifertDaniel (37 commits)")[![lxlang](https://avatars.githubusercontent.com/u/7984421?v=4)](https://github.com/lxlang "lxlang (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/daniels-tankerkoenig-php-client/health.svg)

```
[![Health](https://phpackages.com/badges/daniels-tankerkoenig-php-client/health.svg)](https://phpackages.com/packages/daniels-tankerkoenig-php-client)
```

###  Alternatives

[spatie/crawler

Crawl all internal links found on a website

2.8k16.3M52](/packages/spatie-crawler)[omniphx/forrest

A Laravel library for Salesforce

2724.4M8](/packages/omniphx-forrest)[akamai-open/edgegrid-client

Implements the Akamai {OPEN} EdgeGrid Authentication specified by https://developer.akamai.com/introduction/Client\_Auth.html

482.5M6](/packages/akamai-open-edgegrid-client)[muhammadhuzaifa/telescope-guzzle-watcher

Telescope Guzzle Watcher provide a custom watcher for intercepting http requests made via guzzlehttp/guzzle php library. The package uses the on\_stats request option for extracting the request/response data. The watcher intercept and log the request into the Laravel Telescope HTTP Client Watcher.

98239.8k1](/packages/muhammadhuzaifa-telescope-guzzle-watcher)[onesignal/onesignal-php-api

A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com

34170.2k2](/packages/onesignal-onesignal-php-api)[ory/hydra-client-php

Documentation for all of Ory Hydra's APIs.

1710.8k](/packages/ory-hydra-client-php)

PHPackages © 2026

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