PHPackages                             geocoder-php/photon-provider - 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. geocoder-php/photon-provider

ActiveLibrary[API Development](/categories/api)

geocoder-php/photon-provider
============================

Geocoder Photon adapter

0.10.0(1y ago)5314.3k—2.9%41MITPHPPHP ^8.0CI failing

Since Jan 5Pushed 5mo ago2 watchersCompare

[ Source](https://github.com/geocoder-php/photon-provider)[ Packagist](https://packagist.org/packages/geocoder-php/photon-provider)[ Docs](http://geocoder-php.org/Geocoder/)[ RSS](/packages/geocoder-php-photon-provider/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (5)Versions (12)Used By (1)

photon Geocoder provider
========================

[](#photon-geocoder-provider)

[![Build Status](https://camo.githubusercontent.com/b2e2de08acff749fff271fff1d2887141467c8c29dd0f001b7d53792c944ca52/68747470733a2f2f7472617669732d63692e6f72672f67656f636f6465722d7068702f70686f746f6e2d70726f76696465722e7376673f6272616e63683d6d6173746572)](http://travis-ci.org/geocoder-php/photon-provider)[![Latest Stable Version](https://camo.githubusercontent.com/10d8ff492e6112d423483212bb87b97c961f45a18dc345fe4a4a7f3c5f98439b/68747470733a2f2f706f7365722e707567782e6f72672f67656f636f6465722d7068702f70686f746f6e2d70726f76696465722f762f737461626c65)](https://packagist.org/packages/geocoder-php/photon-provider)[![Total Downloads](https://camo.githubusercontent.com/4e4db9e71facc34cef89532166e125e0ad3f629fa33bc648d3e58637bc31df4e/68747470733a2f2f706f7365722e707567782e6f72672f67656f636f6465722d7068702f70686f746f6e2d70726f76696465722f646f776e6c6f616473)](https://packagist.org/packages/geocoder-php/photon-provider)[![Monthly Downloads](https://camo.githubusercontent.com/40a854f221fe674dab182df94239e26765279da1c309ed9093d0e98e7be54d11/68747470733a2f2f706f7365722e707567782e6f72672f67656f636f6465722d7068702f70686f746f6e2d70726f76696465722f642f6d6f6e74686c792e706e67)](https://packagist.org/packages/geocoder-php/photon-provider)[![Code Coverage](https://camo.githubusercontent.com/f49c94406d62b1e479d92167fdc27747d02dc39a44e76130cc89e6ef66e4cba1/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f67656f636f6465722d7068702f70686f746f6e2d70726f76696465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/geocoder-php/photon-provider)[![Quality Score](https://camo.githubusercontent.com/f83db680a56f007cdfe281cba052c6f43f1ff4f85888cc2d48dea44f97121b49/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f67656f636f6465722d7068702f70686f746f6e2d70726f76696465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/geocoder-php/photon-provider)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)

This is the photon provider from the PHP Geocoder. This is a **READ ONLY** repository. See the [main repo](https://github.com/geocoder-php/Geocoder) for information and documentation.

Install
-------

[](#install)

```
composer require geocoder-php/photon-provider
```

API Documentation
-----------------

[](#api-documentation)

Usage
-----

[](#usage)

### Basic usage

[](#basic-usage)

You can use your own photon instance :

```
// New instance of the provider :
$provider = new Geocoder\Provider\Photon\Photon($httpClient, 'https://your-photon-root-url');
// Run geocode or reverse query
$query = $provider->geocodeQuery(\Geocoder\Query\GeocodeQuery::create('Paris'));
$reverseQuery = $provider->reverseQuery(\Geocoder\Query\ReverseQuery::fromCoordinates(48.86036 ,2.33852));
```

### OSM Tag Feature

[](#osm-tag-feature)

You can search for location data based on osm tag filters.

For example, you can filter a geocode query to only include results of type 'place'. You can even restrict it to only have places of type 'city'. In the reverse geocoding context you can search for the 3 pharmacies closest to a location.

To see what you can do with this feature, check [the official photon documentation](https://github.com/komoot/photon#filter-results-by-tags-and-values)

Below is an example to query the 3 pharmacies closest to a location :

```
$provider = new Geocoder\Provider\Photon\Photon($httpClient, 'https://your-photon-root-url');
$reverseQuery = \Geocoder\Query\ReverseQuery::fromCoordinates(52.51644, 13.38890)
    ->withData('osm_tag', 'amenity:pharmacy')
    ->withLimit(3);

$results = $provider->reverseQuery($reverseQuery);
```

You can combine multiple osm tag filters :

```
$provider = new Geocoder\Provider\Photon\Photon($httpClient, 'https://your-photon-root-url');
$reverseQuery = \Geocoder\Query\GeocodeQuery::create('Paris')
    ->withData('osm_tag', ['tourism:museum', 'tourism:gallery'])
    ->withLimit(5);
// Here we get 5 tourism results in Paris which are either museum or art gallery
$results = $provider->reverseQuery($reverseQuery);
```

Contribute
----------

[](#contribute)

Contributions are very welcome! Send a pull request to the [main repository](https://github.com/geocoder-php/Geocoder) or report any issues you find on the [issue tracker](https://github.com/geocoder-php/Geocoder/issues).

###  Health Score

50

—

FairBetter than 96% of packages

Maintenance59

Moderate activity, may be stable

Popularity42

Moderate usage in the ecosystem

Community24

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 55.8% 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 ~226 days

Recently: every ~155 days

Total

11

Last Release

421d ago

PHP version history (5 changes)0.1.0PHP ^7.1

0.2.0PHP ^7.2

0.3.0PHP ^7.3 || ^8.0

0.5.0PHP ^7.4 || ^8.0

0.7.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/401ccc5eea13c60cf807ae982af00e368e2166e2f26d8eb541dcd881a57385bc?d=identicon)[Nyholm](/maintainers/Nyholm)

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

---

Top Contributors

[![jbelien](https://avatars.githubusercontent.com/u/1150563?v=4)](https://github.com/jbelien "jbelien (29 commits)")[![Chris53897](https://avatars.githubusercontent.com/u/7104259?v=4)](https://github.com/Chris53897 "Chris53897 (6 commits)")[![Nyholm](https://avatars.githubusercontent.com/u/1275206?v=4)](https://github.com/Nyholm "Nyholm (4 commits)")[![ybert](https://avatars.githubusercontent.com/u/2513558?v=4)](https://github.com/ybert "ybert (3 commits)")[![fbuchlak](https://avatars.githubusercontent.com/u/30214087?v=4)](https://github.com/fbuchlak "fbuchlak (3 commits)")[![Persaeus](https://avatars.githubusercontent.com/u/32091869?v=4)](https://github.com/Persaeus "Persaeus (2 commits)")[![nicolas-grekas](https://avatars.githubusercontent.com/u/243674?v=4)](https://github.com/nicolas-grekas "nicolas-grekas (1 commits)")[![JaZo](https://avatars.githubusercontent.com/u/3475007?v=4)](https://github.com/JaZo "JaZo (1 commits)")[![alexsegura](https://avatars.githubusercontent.com/u/1162230?v=4)](https://github.com/alexsegura "alexsegura (1 commits)")[![norkunas](https://avatars.githubusercontent.com/u/2722872?v=4)](https://github.com/norkunas "norkunas (1 commits)")[![tobiasbaehr](https://avatars.githubusercontent.com/u/105220?v=4)](https://github.com/tobiasbaehr "tobiasbaehr (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/geocoder-php-photon-provider/health.svg)

```
[![Health](https://phpackages.com/badges/geocoder-php-photon-provider/health.svg)](https://phpackages.com/packages/geocoder-php-photon-provider)
```

###  Alternatives

[willdurand/geocoder-bundle

Integration of Geocoder into Symfony

3226.4M12](/packages/willdurand-geocoder-bundle)[geocoder-php/geo-plugin-provider

Geocoder GeoPlugin adapter

975.0M8](/packages/geocoder-php-geo-plugin-provider)[geocoder-php/chain-provider

Geocoder chain adapter

1046.8M13](/packages/geocoder-php-chain-provider)[geocoder-php/nominatim-provider

Geocoder Nominatim adapter

354.4M27](/packages/geocoder-php-nominatim-provider)[geocoder-php/ipstack-provider

Geocoder Ipstack adapter

60334.1k2](/packages/geocoder-php-ipstack-provider)[swisnl/geocoder-php-nationaal-georegister-provider

PDOK (formerly Nationaal Georegister) provider for Geocoder PHP

28330.8k2](/packages/swisnl-geocoder-php-nationaal-georegister-provider)

PHPackages © 2026

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