PHPackages                             teamzac/geocoder - 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. teamzac/geocoder

ActiveProject[API Development](/categories/api)

teamzac/geocoder
================

A simple wrapper about Google's geocoding and direction services

v5.0(5y ago)0103[4 PRs](https://github.com/teamzac/geocoder/pulls)MITPHPPHP &gt;=7.2.5

Since Aug 30Pushed 2y ago1 watchersCompare

[ Source](https://github.com/teamzac/geocoder)[ Packagist](https://packagist.org/packages/teamzac/geocoder)[ RSS](/packages/teamzac-geocoder/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (5)Versions (17)Used By (0)

A lightweight wrapper around the Google Maps geocoding service
==============================================================

[](#a-lightweight-wrapper-around-the-google-maps-geocoding-service)

[![Latest Version on Packagist](https://camo.githubusercontent.com/92dce74cf5658fe2868de91d3e25007b52df0ff28b07d8e2173e4fcce8dcc881/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7465616d7a61632f67656f636f6465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/teamzac/geocoder)

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

[](#installation)

You can install the package via composer:

```
composer require teamzac/geocoder
```

Usage
-----

[](#usage)

This package uses Laravel's autodiscovery feature, so you do not have to manually add the service provider.

You can publish the config file if you'd like, or simply add the following to your .env file:

```
GOOGLE_MAPS_API_KEY={{YOUR API KEY HERE}}
```

The `TeamZac\Geocoder\Geocoder` class can be resolved from the container, or you can use the facade. There are two primary methods on this class:

```
// get lat/lng from an address
Geocoder::geocode('1600 Pennsvylvania Ave, Washington DC 20500');

// get an address from lat/lng pair
Geocoder::reverseGeocode(38.8976633, -77.036573);
```

Both methods will return an instance of `TeamZac\Geocoder\GeocodeResult`, or throw an exception if no results were found.

The `GeocodeResult` class is a simple data transfer object that makes it more convenience to access information about the response.

```
$result = Geocoder::geocode('123 main street anywhere USA');

$result->getState();
$result->getLocality();
$result->getStreetNumber();
```

For a full list of available methods, just check out the class' implementation.

### Testing

[](#testing)

```
composer test
```

You'll want to copy the `.env.example` file as `.env.testing.php` and add your Google Maps API key to enable testing.

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Laravel Package Boilerplate](https://laravelpackageboilerplate.com)

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity66

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

Every ~165 days

Recently: every ~157 days

Total

11

Last Release

1894d ago

Major Versions

v1.0.3 → v2.0.02017-05-24

v2.0.0 → 3.0.02018-04-09

3.0.0 → 4.0.12019-06-17

v4.2 → v5.02021-03-08

PHP version history (4 changes)v1.0.0PHP &gt;=5.6.4

3.0.0PHP &gt;=7.0

4.0.1PHP &gt;=7.1.3

v5.0PHP &gt;=7.2.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/6fd7317d975889db1c4dc0aec0dfcd3f9f4e284634e6719891d3f47f46238be6?d=identicon)[teamzac](/maintainers/teamzac)

---

Top Contributors

[![chadjanicek](https://avatars.githubusercontent.com/u/18754689?v=4)](https://github.com/chadjanicek "chadjanicek (26 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/teamzac-geocoder/health.svg)

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

###  Alternatives

[skagarwal/google-places-api

Google Places Api

1913.0M8](/packages/skagarwal-google-places-api)[saloonphp/laravel-plugin

The official Laravel plugin for Saloon

765.7M125](/packages/saloonphp-laravel-plugin)[dcblogdev/laravel-microsoft-graph

A Laravel Microsoft Graph API (Office365) package

168285.5k1](/packages/dcblogdev-laravel-microsoft-graph)[vluzrmos/slack-api

Wrapper for Slack.com WEB API.

102589.1k3](/packages/vluzrmos-slack-api)[grantholle/powerschool-api

A Laravel package to make interacting with PowerSchool less painful.

1715.6k1](/packages/grantholle-powerschool-api)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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