PHPackages                             jens-na/osrm-api-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. jens-na/osrm-api-client

ActiveLibrary

jens-na/osrm-api-client
=======================

API client for the OSRM project

1.0.0-alpha(12y ago)218.3k↓100%7[2 issues](https://github.com/jens-na/osrm-api-client/issues)PHP

Since Jul 7Pushed 12y ago2 watchersCompare

[ Source](https://github.com/jens-na/osrm-api-client)[ Packagist](https://packagist.org/packages/jens-na/osrm-api-client)[ RSS](/packages/jens-na-osrm-api-client/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

Overview
========

[](#overview)

**osrm-api-client** is a an open source PHP implementation of the [OSRM Server API](https://github.com/DennisOSRM/Project-OSRM/wiki/Server-api).

[![Latest Unstable Version](https://camo.githubusercontent.com/eaae292359c937ae55f6cfa1c74044aa8d028b34df0f75da366a1b3077f889f6/68747470733a2f2f706f7365722e707567782e6f72672f6a656e732d6e612f6f73726d2d6170692d636c69656e742f762f756e737461626c652e706e67)](https://packagist.org/packages/jens-na/osrm-api-client)[![Total Downloads](https://camo.githubusercontent.com/b0fa0b48c95e31de0e7c87fb05638cee6e06960f4628555a6c49c4e157be4a9f/68747470733a2f2f706f7365722e707567782e6f72672f6a656e732d6e612f6f73726d2d6170692d636c69656e742f646f776e6c6f6164732e706e67)](https://packagist.org/packages/jens-na/osrm-api-client)

\###Features

- viaroute (computation of the shortest path on the road network between two coordinates)
- locate (nearest node of the road network)
- nearest (nearest point on any street segment of the road network)

\###Installation To add osrm-api-client as a locally per-project dependency you can insert the following code to your composer.json file:

```
{
    "require": {
        "jens-na/osrm-api-client": "dev-master"
    }
}

```

\###API Usage Policy If you are using the server **router.project-osrm.org** with this API client, please read the [API Usage Policy](https://github.com/DennisOSRM/Project-OSRM/wiki/API%20Usage%20Policy) of Project-OSRM. Usage
==================================================================================================================================================================================================================================

[](#api-usage-policyif-you-are-using-the-server-routerproject-osrmorg-with-this-api-client-please-read-theapi-usage-policy-of-project-osrmusage)

\###viaroute $client = new Osrm\\OsrmClient(''); $from = new Osrm\\Coordinate(50.142739,9.122257); $to = new Osrm\\Coordinate(50.139631,9.107151); $route = $client-&gt;getRoute($from, $to);

\###locate

```
$client = new Osrm\OsrmClient('http://server:5000');
$mylocation = new Osrm\Coordinate(9.305283, 50.344735);
$nearestStreet = $client->getNearestNodePoint($mylocation);

```

\###nearest

```
$client = new Osrm\OsrmClient('http://server:5000');
$mylocation = new Osrm\Coordinate(9.305283, 50.344735);
$nearestStreet = $client->getNearestStreetPoint($mylocation);

```

References
==========

[](#references)

- [OSRM Server API](https://github.com/DennisOSRM/Project-OSRM/wiki/Server-api)
- [OSRM Json Output](https://github.com/DennisOSRM/Project-OSRM/wiki/Output-json)
- [OSRM Turn instructions](https://github.com/DennisOSRM/Project-OSRM/blob/master/DataStructures/TurnInstructions.h)
- [OSRM API Usage Policy](https://github.com/DennisOSRM/Project-OSRM/wiki/API%20Usage%20Policy)

License and Copyright
=====================

[](#license-and-copyright)

Licensed under the GNU General Public License 3.

(c) Jens Nazarenus, 2013

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

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

4689d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2a3a48c86abb05b2d2f4071f29b8296900b7544dba9fd6acc8b0bf37e89ffb07?d=identicon)[jens-na](/maintainers/jens-na)

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jens-na-osrm-api-client/health.svg)

```
[![Health](https://phpackages.com/badges/jens-na-osrm-api-client/health.svg)](https://phpackages.com/packages/jens-na-osrm-api-client)
```

PHPackages © 2026

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