PHPackages                             peoplegogo/google-places - 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. peoplegogo/google-places

ActiveLibrary

peoplegogo/google-places
========================

A PHP wrapper for the Google Places API.

1.0.3(10y ago)152↓100%MITPHP

Since Mar 30Pushed 10y ago3 watchersCompare

[ Source](https://github.com/peoplegogo/google-places)[ Packagist](https://packagist.org/packages/peoplegogo/google-places)[ RSS](/packages/peoplegogo-google-places/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (1)Versions (6)Used By (0)

Google Places API - A PHP wrapper
=================================

[](#google-places-api---a-php-wrapper)

[![Latest Stable Version](https://camo.githubusercontent.com/28dd22f3bc819d8e452f93fa61c7f06bb2dbc60995f7cb2d1e042baec7fd60fd/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f70656f706c65676f676f2f676f6f676c652d706c616365732e737667)](https://packagist.org/packages/peoplegogo/google-places)[![License](https://camo.githubusercontent.com/5a911ddcd16b9110e7821386ffd8d637005a8b856c14a3c0861b955e91da4eba/687474703a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d6c69676874677265792e737667)](https://github.com/peoplegogo/google-places/blob/master/LICENSE)[![Build Status](https://camo.githubusercontent.com/b371aa153803d4843032d0e8e7d267ee2f33322429be28358c2f92bdf4bfdb96/687474703a2f2f696d672e736869656c64732e696f2f7472617669732f70656f706c65676f676f2f676f6f676c652d706c616365732e737667)](https://travis-ci.org/peoplegogo/google-places/)

[![Logo of Google Places API Web Service](https://raw.githubusercontent.com/peoplegogo/google-places/master/google-places.png)](https://raw.githubusercontent.com/peoplegogo/google-places/master/google-places.png)

This is a PHP wrapper for Google Places API Web Service.

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

[](#installation)

### Composer

[](#composer)

The recommended installation method is through [Composer](https://getcomposer.org/). Add to your composer.json file:

```
{
    "require": {
        "peoplegogo/google-places": "~1.0"
    }
}
```

or with the following command from your browser:

```
composer require peoplegogo/google-places

```

Check [in Packagist](https://packagist.org/packages/peoplegogo/google-places).

### Manually

[](#manually)

Steps:

- Copy src/GooglePlaces.php to your codebase, perhaps to the vendor directory.
- Add the GooglePlaces class to your autoloader or require the file directly.

Getting Started
---------------

[](#getting-started)

First you have to create an instance of GooglePlaces:

```
$google_places = new GooglePlaces();
```

You can pass the API key *(used to authenticate in front of Google service)* during the creation of the instance or you can set it up later.

```
$google_places = new GooglePlaces($apiKey);
```

or

```
$google_places = new GooglePlaces();
$google_places->setApiKey($apiKey);
```

By default, the format is set to json but you can change it that way:

```
$google_places = new GooglePlaces($apiKey, $format);
```

or

```
$google_places->setFormat($format);
```

You can also set up the language if you want.

```
$google_places->setLanguage($language_code);
```

In this way it won't be necessary to set up the language within every request.

You can also prepare the input parameters:

```
$params = [
	'input' => 'Vict',
	'types' => '(cities)',
	'language' => 'pt_BR'
];
```

Once all parameters are set, the final step is to send the request to the Google Places Api:

```
$results = $google_places->getAutocomplete($params);
```

The result is an array. The GooglePlaces class decodes the response received from Google, so it is not necessary for you to do that.

For more information for the methods and the features of the library you can check *"src"* or *"tests"* folders.

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

[](#contributing)

How can you contribute:

1. Fork it.
2. Create your feature branch (git checkout -b my-new-feature).
3. Commit your changes (git commit -am 'Added some feature').
4. Push to the branch (git push origin my-new-feature).
5. Create a new Pull Request.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity67

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 ~1 days

Total

4

Last Release

3692d ago

### Community

Maintainers

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

---

Top Contributors

[![pavel-tashev](https://avatars.githubusercontent.com/u/8375174?v=4)](https://github.com/pavel-tashev "pavel-tashev (19 commits)")

---

Tags

google places

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/peoplegogo-google-places/health.svg)

```
[![Health](https://phpackages.com/badges/peoplegogo-google-places/health.svg)](https://phpackages.com/packages/peoplegogo-google-places)
```

###  Alternatives

[skagarwal/google-places-api

Google Places Api

1913.0M8](/packages/skagarwal-google-places-api)

PHPackages © 2026

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