PHPackages                             anto80/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. [API Development](/categories/api)
4. /
5. anto80/osrm-api-client

ActiveLibrary[API Development](/categories/api)

anto80/osrm-api-client
======================

API client for the OSRM project

1.0-stable(9y ago)052PHP

Since Aug 12Pushed 9y ago1 watchersCompare

[ Source](https://github.com/anto80/osrm-api-client)[ Packagist](https://packagist.org/packages/anto80/osrm-api-client)[ RSS](/packages/anto80-osrm-api-client/feed)WikiDiscussions master Synced 4w 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": {
        "anto80/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

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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

Unknown

Total

1

Last Release

3609d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1218984?v=4)[Antonio De Patto](/maintainers/anto80)[@anto80](https://github.com/anto80)

---

Top Contributors

[![anto80](https://avatars.githubusercontent.com/u/1218984?v=4)](https://github.com/anto80 "anto80 (7 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172437.8k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

94452.6k6](/packages/botman-driver-telegram)

PHPackages © 2026

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