PHPackages                             wimski/nominatim-geocoding-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. wimski/nominatim-geocoding-api-client

ActiveLibrary[API Development](/categories/api)

wimski/nominatim-geocoding-api-client
=====================================

Nominatim Geocoding API Client

v1.2.0(4y ago)03.8k1MITPHPPHP ^8.0

Since Feb 21Pushed 4y ago1 watchersCompare

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

READMEChangelog (4)Dependencies (11)Versions (5)Used By (1)

[![Latest Stable Version](https://camo.githubusercontent.com/f5fbd4ac02970a20578f7484a988c90ca542dfcac1e8851a15f5df0dad34c5cd/687474703a2f2f706f7365722e707567782e6f72672f77696d736b692f6e6f6d696e6174696d2d67656f636f64696e672d6170692d636c69656e742f76)](https://packagist.org/packages/wimski/nominatim-geocoding-api-client)[![Coverage Status](https://camo.githubusercontent.com/a1adeb8b05e791c4508e4073b57280c6989f4e5fe0263ccb2f8fe086a18df8bd/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f77696d736b692f6e6f6d696e6174696d2d67656f636f64696e672d6170692d636c69656e742f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/wimski/nominatim-geocoding-api-client?branch=master)[![PHPUnit](https://github.com/wimski/nominatim-geocoding-api-client/actions/workflows/phpunit.yml/badge.svg)](https://github.com/wimski/nominatim-geocoding-api-client/actions/workflows/phpunit.yml)[![PHPStan](https://github.com/wimski/nominatim-geocoding-api-client/actions/workflows/phpstan.yml/badge.svg)](https://github.com/wimski/nominatim-geocoding-api-client/actions/workflows/phpstan.yml)

Nominatim Geocoding API Client
==============================

[](#nominatim-geocoding-api-client)

Changelog
---------

[](#changelog)

[View the changelog.](./CHANGELOG.md)

Usage
-----

[](#usage)

### Install package

[](#install-package)

```
composer require wimski/nominatim-geocoding-api-client
```

### Example

[](#example)

```
use Wimski\Nominatim\Client;
use Wimski\Nominatim\Config\NominatimConfig;
use Wimski\Nominatim\GeocoderServices\NominatimGeocoderService;
use Wimski\Nominatim\RequestParameters\ForwardGeocodingQueryRequestParameters;
use Wimski\Nominatim\Transformers\GeocodingResponseTransformer;

$config = new NominatimConfig(
    'my-custom-user-agent',
    'email@provider.net',
);

$service = new NominatimGeocoderService(
    new Client(),
    new GeocodingResponseTransformer(),
    $config,
);

$requestParameters = ForwardGeocodingQueryRequestParameters::make('some query')
    ->addCountryCode('nl')
    ->includeAddressDetails();

$response = $service->requestForwardGeocoding($requestParameters);

// Get data from the response
$latitude = $response->getItems()[0]->getCoordinate()->getLatitude();
```

### PSR HTTP

[](#psr-http)

The `Client` class uses [Discovery](https://docs.php-http.org/en/latest/discovery.html) by default to get instances of the following contracts:

- `Psr\Http\Client\ClientInterface`
- `Psr\Http\Message\RequestFactoryInterface`
- `Psr\Http\Message\UriFactoryInterface`

This means that you need to include (a) PSR compatible package(s) [in your project](https://docs.php-http.org/en/latest/httplug/users.html).

If you already have setup a specific HTTP client configuration in your project, which you would also like to use for Nominatim requests, you can pass that as a constructor argument to the `Client`:

```
$service = new NominatimGeocoderService(
    new Client($myCustomPsrHttpClient),
    new GeocodingResponseTransformer(),
    new NominatimConfig('user-agent', 'email@provider.net'),
);
```

### Services

[](#services)

Services for the following providers are currently available:

- [Nominatim](https://nominatim.org/release-docs/latest/api/Overview/)
- [LocationIQ](https://locationiq.com/docs)
- Generic: without any implementation specific headers or parameters.

Custom services can easily be created by extending the `AbstractGeocoderService`as long as the provider implements the Nominatim spec correctly.

PHPUnit
-------

[](#phpunit)

```
composer run phpunit
```

PHPStan
-------

[](#phpstan)

```
composer run phpstan
```

Credits
-------

[](#credits)

- [wimski](https://github.com/wimski)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 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

Every ~9 days

Total

4

Last Release

1519d ago

### Community

Maintainers

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

---

Top Contributors

[![wimski](https://avatars.githubusercontent.com/u/12373573?v=4)](https://github.com/wimski "wimski (33 commits)")

---

Tags

apiclientgeocodingnominatimapiclientgeocodingnominatimreversewimskiforward

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/wimski-nominatim-geocoding-api-client/health.svg)

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

###  Alternatives

[openai-php/client

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

5.8k22.6M232](/packages/openai-php-client)[getbrevo/brevo-php

Official Brevo provided RESTFul API V3 php library

963.1M35](/packages/getbrevo-brevo-php)[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.5k311.5k5](/packages/theodo-group-llphant)[jolicode/slack-php-api

An up to date PHP client for Slack's API

2534.4M12](/packages/jolicode-slack-php-api)[kbsali/redmine-api

Redmine API client

4221.1M24](/packages/kbsali-redmine-api)[wordpress/php-ai-client

A provider agnostic PHP AI client SDK to communicate with any generative AI models of various capabilities using a uniform API.

26236.6k14](/packages/wordpress-php-ai-client)

PHPackages © 2026

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