PHPackages                             spacedealer/geonames-api - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. spacedealer/geonames-api

ActiveLibrary[HTTP &amp; Networking](/categories/http)

spacedealer/geonames-api
========================

Geonames.org api client library based on guzzle 5

0.2.2(11y ago)39242[2 PRs](https://github.com/spacedealer/geonames-api/pulls)1BSD-3-ClausePHP

Since Dec 3Pushed 9y ago3 watchersCompare

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

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

Geonames.org REST api client PHP library
========================================

[](#geonamesorg-rest-api-client-php-library)

**Attention**: Please do not use in production environments. It‘s WIP.

This is a simple [geonames API](http://www.geonames.org/export/web-services.html) client based on [Guzzle 5](http://docs.guzzlephp.org/en/latest/).

[![Build Status](https://camo.githubusercontent.com/fb194c95ec28a73de8a49bf8c41e1b491bdbf8e264803035d627f04b3616b6e1/68747470733a2f2f7472617669732d63692e6f72672f73706163656465616c65722f67656f6e616d65732d6170692e737667)](https://travis-ci.org/spacedealer/geonames-api)[![SensioLabsInsight](https://camo.githubusercontent.com/9a8266c2c3613137128bebec319d2c49c64fb5dc9f2224646627bed211941b1c/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f31333132323064392d376132642d343163322d616132382d6630386137633839626366662f6d696e692e706e67)](https://insight.sensiolabs.com/projects/131220d9-7a2d-41c2-aa28-f08a7c89bcff)[![Dependency Status](https://camo.githubusercontent.com/52c4d3cec200d52b0a2e660747cb5d168b37a28e73e2246a5661463276a5dcfa/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f757365722f70726f6a656374732f3534373438626438393862326538356536373030303134322f62616467652e7376673f7374796c653d666c6174)](https://www.versioneye.com/user/projects/54748bd898b2e85e67000142)

Requirements
------------

[](#requirements)

- php &gt;= 5.4
- guzzle 5
- guzzle services 0.5
- guzzle command 0.7

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist spacedealer/geonames-api "*"

```

or add

```
"spacedealer/geonames-api": "*"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

```
$client = new \spacedealer\geonames\api\Geonames('your_username');
try {
    $response = $client->postalCodeSearch([
        'postalcode' => '10997',
        'country' => 'de',
    ]);

    if ($response->isOk()) {
        $count = $response->count();
        echo "Found entries: $count" . PHP_EOL;
        $placeName = $response->getPath('0/placeName');
        echo "Place name   : " . $placeName . PHP_EOL;
    } else {
        echo $response->getPath('message') . PHP_EOL;
    }
} catch (\RuntimeException $e) {
    echo $e->getMessage() . PHP_EOL;
}
```

Todos
-----

[](#todos)

- complete unit tests
- improve response model handling
- add support for xml only command: extendedFindNearby

Resources
---------

[](#resources)

- [Source](https://github.com/spacedealer/geonames-api)
- [Issues](https://github.com/spacedealer/geonames-api/issues)

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity56

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

Every ~50 days

Total

4

Last Release

4024d ago

### Community

Maintainers

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

---

Tags

apiclientrestGuzzlegeonames

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/spacedealer-geonames-api/health.svg)

```
[![Health](https://phpackages.com/badges/spacedealer-geonames-api/health.svg)](https://phpackages.com/packages/spacedealer-geonames-api)
```

###  Alternatives

[e-moe/guzzle6-bundle

Integrates Guzzle 6 into your Symfony application

11259.2k](/packages/e-moe-guzzle6-bundle)[jsor/hal-client

A lightweight client for consuming and manipulating Hypertext Application Language (HAL) resources.

2425.9k1](/packages/jsor-hal-client)

PHPackages © 2026

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