PHPackages                             iseed838/graphhopper-api - 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. iseed838/graphhopper-api

ActiveLibrary[API Development](/categories/api)

iseed838/graphhopper-api
========================

Project graphhopper-api wrapper

0.2.5(4y ago)03.8k↓55.6%MITPHPPHP &gt;=7.4CI failing

Since Jan 22Pushed 4y ago1 watchersCompare

[ Source](https://github.com/iseed838/graphhopper-api)[ Packagist](https://packagist.org/packages/iseed838/graphhopper-api)[ Docs](https://github.com/iseed838/graphhopper-api)[ RSS](/packages/iseed838-graphhopper-api/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (3)Versions (6)Used By (0)

graphhopper-api
===============

[](#graphhopper-api)

Graphhopper is powerful direction api to plannin you application [graphhopper](https://www.graphhopper.com/)

This project is a wrapper for making api requests to the direction api

The wrapper can be installed with the command

- **composer require "iseed838/graphhopper-api" "~0.2"**

Currently 2 types of services are tied:

- Route Api
- Geocode Api

1. **Make route request:**

```
$pathRequest = new \Graphhopper\Models\RouteRequest([
    'points'   => [
        '55.630358,37.516776',
        '55.6916244,37.7225474'
    ],
]);

$client = new \Graphhopper\Models\Clients\RouteClient(new \GuzzleHttp\Client(), [
    'key'                => '123-asd',
]);
$pathResponse = $client->paths($pathRequest);

```

**will be response:**

```
Graphhopper\Models\RouteResponse Object
(
    [info:Graphhopper\Models\RouteResponse:private] => Array
        (
            [copyrights] => Array
                (
                    [0] => GraphHopper
                    [1] => OpenStreetMap contributors
                )

            [took] => 2
        )

    [paths:Graphhopper\Models\RouteResponse:private] => Array
        (
            [0] => Array
                (
                    [distance] => 20048.589
                    [weight] => 1276.548563
                    [time] => 1276419
                    [transfers] => 0
                    [snapped_waypoints] => wiprIik~cFi|Jyjg@
                    [points] => [
                        [type] => LineString
                        [coordinates] => [
                            [
                                [0] => 37.516213
                                [1] => 55.630528
                            ],
                            [
                                    [0] => 37.515701
                                    [1] => 55.629986
                            ]
                        ]
                    ],
                    [legs] => [

                    ],
                    [details] => [
                        [distance] => [
                            [
                                [0] => 0
                                [1] => 1
                                [2] => 68.227871223281
                            ],
                            [
                                [0] => 1
                                [1] => 2
                                [2] => 32.217
                            ],
                        ]
                    ]
                )

        )

    [hints:Graphhopper\Models\RouteResponse:private] => Array
        (
            [visited_nodes.average] => 268.0
            [visited_nodes.sum] => 268
        )

)

```

2. **Make geocode request:**

- *query request*

```
$queryGeocodeRequest = new \Graphhopper\Models\GeocodeQueryRequest([
    'query' => 'Moscow Vavilova 6',
    'language' => \Graphhopper\Factory::LANGUAGE_EN
]);

$client = new \Graphhopper\Models\Clients\GeocodeClient(new \GuzzleHttp\Client(), [
    'key'                => '123-asd',
]);
$geocodeResponse = $client->query($queryGeocodeRequest);

```

- *reverse request*

```
$reverseGeocodeRequest = new \Graphhopper\Models\GeocodeReverseRequest([
    'point' => '55.630358,37.516776',
    'language' => \Graphhopper\Factory::LANGUAGE_RU
]);

$client = new \Graphhopper\Models\Clients\GeocodeClient(new \GuzzleHttp\Client(), [
    'key'                => '123-123',
]);
$geocodeReverseResponse = $client->reverse($reverseGeocodeRequest);

```

**will be return:**

```
Graphhopper\Models\GeocodeResponse Object
(
    [took:Graphhopper\Models\GeocodeResponse:private] => 1470
    [copyrights:Graphhopper\Models\GeocodeResponse:private] => Array
        (
        )

    [hits:Graphhopper\Models\GeocodeResponse:private] => Array
        (
            [0] => Array
                (
                    [osm_id] => 5607914901
                    [osm_type] => N
                    [country] => India
                    [osm_key] => place
                    [city] => Thiruvanchoor
                    [osm_value] => locality
                    [postcode] => 686010
                    [name] => Moscow Junction
                    [state] => Kerala
                    [point] => Array
                        (
                            [lng] => 76.560045
                            [lat] => 9.613103
                        )

                )
        )

    [locale:Graphhopper\Models\GeocodeResponse:private] =>
)

```

The route request model has the following parameters:

- points (required|string\[\]|count&gt;1) - Point coordinate
- vehicle (required|string) - Vehicle type. Available car,foot,bike, Default car;
- language (required|string) - Request language. Available en,ru,de,fr,it. Default en;
- is\_calc\_points (string) - Is need calculate points. Default false;
- limit (required|integer) - Count response variants
- is\_instructions (string) - Is need text instructions for paths. Default false;
- is\_point\_encoded (string) - Is need point encoded points. Default false;
- details (string\[\]) - Response Detail. Available 'distance', 'time', 'weight', 'line'. Default 'distance';

The geocode query request model has the following parameters:

- query (required|string) - Address string;
- point (string) - Point coordinate;
- language (required|string) - Request language. Available en,ru,de,fr,it. Default en;
- provider (required|string) - Query provider. Available 'default', 'nominatim'. Default 'default'
- limit (required|integer) - Count response variants. Default 5;

The geocode reverse request model has the following parameters:

- point (required|string) - Point coordinate;
- language (required|string) - Request language. Available en,ru,de,fr,it. Default en;
- provider (required|string) - Query provider. Available 'default', 'nominatim'. Default 'default';
- limit (required|integer) - Count response variants. Default 1;

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90% 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 ~223 days

Total

4

Last Release

1638d ago

PHP version history (3 changes)0.2.2PHP ^7.2

0.2.3PHP &gt;=7.2

0.2.5PHP &gt;=7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/90b89e89a1a57c872db9d2eaeb9c188ce71bd6d9d5b7529d003dfab5ad29694a?d=identicon)[iseed](/maintainers/iseed)

---

Top Contributors

[![iseed838](https://avatars.githubusercontent.com/u/48585343?v=4)](https://github.com/iseed838 "iseed838 (18 commits)")[![alviden](https://avatars.githubusercontent.com/u/60569398?v=4)](https://github.com/alviden "alviden (2 commits)")

---

Tags

apigraphhopper

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/iseed838-graphhopper-api/health.svg)

```
[![Health](https://phpackages.com/badges/iseed838-graphhopper-api/health.svg)](https://phpackages.com/packages/iseed838-graphhopper-api)
```

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[mailchimp/transactional

458.9M16](/packages/mailchimp-transactional)[get-stream/stream-chat

A PHP client for Stream Chat (https://getstream.io/chat/)

301.8M2](/packages/get-stream-stream-chat)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)

PHPackages © 2026

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