PHPackages                             lukasznetkoncept/php-googleplaces - 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. lukasznetkoncept/php-googleplaces

ActiveLibrary[API Development](/categories/api)

lukasznetkoncept/php-googleplaces
=================================

PHP Wrapper for the Google Places API

1.0.0(11y ago)025MITPHPPHP &gt;=5.3.0

Since Sep 20Pushed 10y ago1 watchersCompare

[ Source](https://github.com/lukasznetkoncept/php-googleplaces)[ Packagist](https://packagist.org/packages/lukasznetkoncept/php-googleplaces)[ Docs](https://github.com/joshtronic/php-googleplaces)[ RSS](/packages/lukasznetkoncept-php-googleplaces/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

php-googleplaces
================

[](#php-googleplaces)

[![Build Status](https://camo.githubusercontent.com/0bade0a0424c0cb6a16ab2e0b24ec8701d5cd63e84f8a9918be55cd52a12470c/687474703a2f2f696d672e736869656c64732e696f2f7472617669732f6a6f736874726f6e69632f7068702d676f6f676c65706c616365732e7376673f7374796c653d666c6174)](http://travis-ci.org/joshtronic/php-googleplaces)[![Coverage Status](https://camo.githubusercontent.com/ab719ee2605346d2d97b7f2f3bc844f4e213abe77f03f2bcce8b8cc6b2da912e/687474703a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f6a6f736874726f6e69632f7068702d676f6f676c65706c616365732e7376673f7374796c653d666c6174)](https://coveralls.io/r/joshtronic/php-googleplaces)[![Downloads](https://camo.githubusercontent.com/212f4406761ad9b70f54a30dcef793b087c8a824aef175447b4869c877c3bb47/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f6a6f736874726f6e69632f7068702d676f6f676c65706c616365732e7376673f7374796c653d666c6174)](https://packagist.org/packages/lukasznetkoncept/php-googleplaces)[![Gittip](https://camo.githubusercontent.com/2f56298ebae36668b2cacdc37eeeeb8d02da9228e6739853bc755015ad0763d7/687474703a2f2f696d672e736869656c64732e696f2f6769747469702f6a6f736874726f6e69632e7376673f7374796c653d666c6174)](https://www.gittip.com/lukasznetkoncept/)

PHP Wrapper for the Google Places API.

Origins
-------

[](#origins)

Simply put, when I Googled “php google places” I was presented with [Google-Places---PHP-](https://github.com/anthony-mills/Google-Places---PHP-). I attempted to use it, and it was fine as I was able to make it work, but there seemed to be a huge assumption that you already knew a lot of the quirks of the Google Places API.

I did not fit into this assumption and set out to built my own wrapper with a heavy focus on sanity checking inputs, utilizing the magical parts of PHP (reads: you interact directly with the object as you would the API) and avoiding setter methods as they were put here by the devil.

I opted not to fork because I was going to change too much and I highly doubt my pull requests would have even been accepted.

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

[](#installation)

The preferred installation is via `composer`. First add the following to your `composer.json`

```
"require": {
    "lukasznetkoncept/php-googleplaces": "dev-master"
}
```

Then run `composer update`

or run:

composer require "lukasznetkoncept/php-googleplaces"

Usage
-----

[](#usage)

### Getting started

[](#getting-started)

```
$google_places = new lukasznetkoncept\GooglePlaces('_YOUR_API_KEY_');
```

### Search nearby, ranked by prominence

[](#search-nearby-ranked-by-prominence)

```
$google_places->location = array(-33.86820, 151.1945860);
$google_places->radius   = 800;
$results                 = $google_places->nearbySearch();
```

### Search nearby, ranked by distance

[](#search-nearby-ranked-by-distance)

```
$google_places->location = array(-33.86820, 151.1945860);
$google_places->rankby   = 'distance';
$google_places->types    = 'restaurant'; // Requires keyword, name or types
$results                 = $google_places->nearbySearch();
```

### Second page of search nearby results

[](#second-page-of-search-nearby-results)

```
$google_places->pagetoken = $results['next_page_token'];
$page2_results            = $google_places->nearbySearch();
```

### Radar search

[](#radar-search)

```
$google_places->location = array(-33.86820, 151.1945860);
$google_places->radius   = 800;
$google_places->types    = 'restaurant'; // Requires keyword, name or types
$results                 = $google_places->radarSearch();
```

### Place details

[](#place-details)

```
$google_places->reference = '#reference#'; // Reference from search results
$details                  = $google_places->details();
```

The Future
----------

[](#the-future)

The project that I created this library for is now defunct so I’m not actively using it or hacking on it. That being said, if there’s something you want to see included or you find a bug, just open an issue or grow a pair and fork, hack and send a pull request ;)

###  Health Score

26

—

LowBetter than 40% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 76.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

Unknown

Total

1

Last Release

4339d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/977f8b71d6cf038d8c9a7ac1ca61eabf0147a38add14df51d0baffbeefbc4fc6?d=identicon)[lukasznetkoncept](/maintainers/lukasznetkoncept)

---

Top Contributors

[![joshtronic](https://avatars.githubusercontent.com/u/112741?v=4)](https://github.com/joshtronic "joshtronic (35 commits)")[![lukasznetkoncept](https://avatars.githubusercontent.com/u/18006487?v=4)](https://github.com/lukasznetkoncept "lukasznetkoncept (5 commits)")[![jonathanstanley](https://avatars.githubusercontent.com/u/2755958?v=4)](https://github.com/jonathanstanley "jonathanstanley (3 commits)")[![daniyals](https://avatars.githubusercontent.com/u/6114038?v=4)](https://github.com/daniyals "daniyals (1 commits)")[![rasmusbe](https://avatars.githubusercontent.com/u/2124386?v=4)](https://github.com/rasmusbe "rasmusbe (1 commits)")[![Zn4rK](https://avatars.githubusercontent.com/u/873043?v=4)](https://github.com/Zn4rK "Zn4rK (1 commits)")

---

Tags

apigoogleplaces

### Embed Badge

![Health badge](/badges/lukasznetkoncept-php-googleplaces/health.svg)

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

###  Alternatives

[statickidz/php-google-translate-free

Google Translate Free library for PHP

288283.8k9](/packages/statickidz-php-google-translate-free)[jcf/geocode

Google Geocoding API for Laravel

48162.8k](/packages/jcf-geocode)[ozankurt/google-analytics

Laravel Google Analytics

7617.3k](/packages/ozankurt-google-analytics)[skeeks/yii2-google-api

Component for work with google api based on google/apiclient

1244.0k1](/packages/skeeks-yii2-google-api)

PHPackages © 2026

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