PHPackages                             riverside/php-nominatim - 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. riverside/php-nominatim

ActiveLibrary[API Development](/categories/api)

riverside/php-nominatim
=======================

PHP client for Nominatim, a search engine for OpenStreetMap data.

2.0.0(1y ago)1225.9k↓30.2%31MITPHPPHP &gt;=7.0CI failing

Since Jan 6Pushed 1y ago2 watchersCompare

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

READMEChangelog (5)Dependencies (1)Versions (6)Used By (1)

php-nominatim
=============

[](#php-nominatim)

A PHP client for Nominatim, the search engine for OpenStreetMap data.

BuildStableLicense[![CI](https://github.com/riverside/php-nominatim/actions/workflows/test.yml/badge.svg)](https://github.com/riverside/php-nominatim/actions/workflows/test.yml)[![Latest Stable Version](https://camo.githubusercontent.com/9ad2e7ec2e28820b16398d3452d587e6f39a1602eb34d3f46b55ca90ef23429a/68747470733a2f2f706f7365722e707567782e6f72672f7269766572736964652f7068702d6e6f6d696e6174696d2f762f737461626c65)](https://packagist.org/packages/riverside/php-nominatim)[![License](https://camo.githubusercontent.com/1ba729f5e2f6153b0aeb1b4c46d2bcd6d5e4c2ccca913fe66c4efb914c6cb398/68747470733a2f2f706f7365722e707567782e6f72672f7269766572736964652f7068702d6e6f6d696e6174696d2f6c6963656e7365)](https://packagist.org/packages/riverside/php-nominatim)### Installation

[](#installation)

- If Composer is already installed

```
composer require riverside/php-nominatim

```

- If Composer is not installed on your system yet, you may go ahead and install it using this command line:

```
$ curl -sS https://getcomposer.org/installer | php

```

Next, add the following require entry to the composer.json file in the root of your project.

```
{
    "require" : {
        "riverside/php-nominatim" : "^2.0"
    }
}
```

Finally, use Composer to install php-nominatim and its dependencies:

```
$ php composer.phar install

```

### Loading

[](#loading)

```
require __DIR__ . '/vendor/autoload.php';
```

### Search (geocoding)

[](#search-geocoding)

Look up a location from a textual description or address.

```
$client = new \Riverside\Nominatim\Client();
try {
    $response = $client->search('Madison Square Garden, NY');
    if ($response->isOK()) {
        echo $response->getLat(0) . ", " . $response->getLng(0);
    } else {
        echo 'Location not found.';
    }
} catch (InvalidArgumentException $e) {
    echo $e->getMessage();
} catch (Exception $e) {
    echo $e->getMessage();
}
```

### Reverse geocoding

[](#reverse-geocoding)

Generates an address from a latitude and longitude.

```
$client = new \Riverside\Nominatim\Client();
try {
    $response = $client->reverse(48.8539373, 2.2825966);
    if ($response->isOK()) {
        echo $response->getAddress(0);
    } else {
        echo 'Address not found';
    }
} catch (InvalidArgumentException $e) {
    echo $e->getMessage();
} catch (Exception $e) {
    echo $e->getMessage();
}
```

### Address lookup

[](#address-lookup)

Query the address and other details of one or multiple OSM objects like node, way or relation.

```
$client = new \Riverside\Nominatim\Client();
try {
    $client->setAddressDetails(1);
    $response = $client->lookup('R146656,W104393803,N240109189');
    if ($response->isOK()) {
        echo '';
        print_r($response->toArray());
    } else {
        echo 'Address not found';
    }
} catch (InvalidArgumentException $e) {
    echo $e->getMessage();
} catch (Exception $e) {
    echo $e->getMessage();
}
```

### Place details

[](#place-details)

Show all details about a single place saved in the database.

```
$client = new \Riverside\Nominatim\Client();
try {
    $client->setAddressDetails(1);
    $response = $client->details(199375150);
    if ($response->isOK())
    {
        echo '';
        print_r($response->toArray());
    } else {
        echo 'Place not found';
    }
} catch (InvalidArgumentException $e) {
    echo $e->getMessage();
} catch (Exception $e) {
    echo $e->getMessage();
}
```

### Status

[](#status)

Check if the service and database is running, and when the database was last updated.

```
$client = new \Riverside\Nominatim\Client();
try {
    $response = $client->status();
    if ($response->isOK())
    {
        echo '';
        print_r($response->toArray());
    } else {
        echo 'Status not found';
    }
} catch (InvalidArgumentException $e) {
    echo $e->getMessage();
} catch (Exception $e) {
    echo $e->getMessage();
}
```

### Deletable

[](#deletable)

List objects that have been deleted in OSM but are held back in Nominatim in case the deletion was accidental.

```
$client = new \Riverside\Nominatim\Client();
try {
    $response = $client->deletable();
    if ($response->isOK())
    {
        echo '';
        print_r($response->toArray());
    } else {
        echo 'Deletable objects not found';
    }
} catch (InvalidArgumentException $e) {
    echo $e->getMessage();
} catch (Exception $e) {
    echo $e->getMessage();
}
```

### Polygons

[](#polygons)

List of broken polygons detected by Nominatim.

```
$client = new \Riverside\Nominatim\Client();
try {
    $response = $client->polygons();
    if ($response->isOK())
    {
        echo '';
        print_r($response->toArray());
    } else {
        echo 'Polygons not found';
    }
} catch (InvalidArgumentException $e) {
    echo $e->getMessage();
} catch (Exception $e) {
    echo $e->getMessage();
}
```

### Links

[](#links)

-
-
-
-

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 98.1% 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 ~428 days

Total

5

Last Release

611d ago

Major Versions

1.2.0 → 2.0.02024-09-15

### Community

Maintainers

![](https://www.gravatar.com/avatar/17dd08ce9964258b22baca5a0a36d0dcf17d5cfb992462e40e6877e64c4fb453?d=identicon)[riverside](/maintainers/riverside)

---

Top Contributors

[![riverside](https://avatars.githubusercontent.com/u/43607?v=4)](https://github.com/riverside "riverside (51 commits)")[![vardumper](https://avatars.githubusercontent.com/u/21208397?v=4)](https://github.com/vardumper "vardumper (1 commits)")

---

Tags

address-lookupgeocodingnominatimopenstreetmaposmreverse-geocodingsearch-enginephpgeocodingnominatimosmOpenStreetMap

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/riverside-php-nominatim/health.svg)

```
[![Health](https://phpackages.com/badges/riverside-php-nominatim/health.svg)](https://phpackages.com/packages/riverside-php-nominatim)
```

###  Alternatives

[dantsu/php-osm-static-api

PHP library to easily get static image from OpenStreetMap (OSM), add markers and draw lines.

97141.0k1](/packages/dantsu-php-osm-static-api)[maxh/php-nominatim

Wrapper for Nominatim API

51396.0k2](/packages/maxh-php-nominatim)[mediawiki/maps

Adds various mapping features to MediaWiki

84145.0k3](/packages/mediawiki-maps)[riverside/php-osrm

PHP client for Project-OSRM.

1126.7k](/packages/riverside-php-osrm)

PHPackages © 2026

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