PHPackages                             varsitynewsnetwork/google-places-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. [API Development](/categories/api)
4. /
5. varsitynewsnetwork/google-places-api

ActiveLibrary[API Development](/categories/api)

varsitynewsnetwork/google-places-api
====================================

A mini library to fetch place information out of Google Places API via a text search

2.1.1(5y ago)55.6k5[2 PRs](https://github.com/varsitynewsnetwork/php-google-places-api/pulls)MITPHP

Since Jul 30Pushed 3y ago6 watchersCompare

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

READMEChangelog (6)Dependencies (6)Versions (10)Used By (0)

google-places-api
=================

[](#google-places-api)

A mini library to fetch place information out of Google Places API via a text search or a find place request

[![Build Status](https://camo.githubusercontent.com/1aaa299eefc1f288082f079140482c625e4a8aa208b3f1fc88aef4f538366bd6/68747470733a2f2f7472617669732d63692e6f72672f766172736974796e6577736e6574776f726b2f7068702d676f6f676c652d706c616365732d6170692e7376673f6272616e63683d6d6173746572)](https://camo.githubusercontent.com/1aaa299eefc1f288082f079140482c625e4a8aa208b3f1fc88aef4f538366bd6/68747470733a2f2f7472617669732d63692e6f72672f766172736974796e6577736e6574776f726b2f7068702d676f6f676c652d706c616365732d6170692e7376673f6272616e63683d6d6173746572)

Usage
-----

[](#usage)

```
$service = new PlaceService(new GuzzleAdapter());
$service->setApiKey('YOUR_KEY_HERE');

$results = $service->textSearch('Van Andel Arena');
```

### Formatters

[](#formatters)

The concept of formatters are baked in to allow you to easily manipulate the data returned by Google. Simply pass a callable as the second argument to `textSearch()` or `findPlace()`.

For instance, if you only wanted the address of the first result:

```
$service = new PlaceService(new GuzzleAdapter());
$service->setApiKey('YOUR_KEY_HERE');

$results = $service->textSearch('Van Andel Arena', function (results) {
    if (count($results)) {
        return $results[0]['formatted_address'];
    }

    return null;
});
```

The library also ships with some standard formatters:

1. `CountryStripperFormatter`: Removes the country from the `formatted_address`
2. `LatLngFormatter`: Formats the results as an array of lat, lng, and address.
3. `SingleResultFormatter`: Grabs the first result and returns it
4. `CompositeFormatter`: Allows for running multiple formatters

Example:

```
$service = new PlaceService(new GuzzleAdapter());
$service->setApiKey('YOUR_KEY_HERE');

$result = $service->textSearch('Van Andel Arena', new CompositeFormatter([
    new SingleResultFormatter(),
    new CountryStripperFormatter(true),
    new LatLngFormatter(true)
]));
```

Which will yield something like:

```
Array
(
    [address] => 130 Fulton West, Grand Rapids, MI 49503
    [lat] => 42.962433
    [lng] => -85.671566
)

```

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~470 days

Total

6

Last Release

2055d ago

Major Versions

v1.1.1 → v2.0.02019-01-02

### Community

Maintainers

![](https://www.gravatar.com/avatar/56d64bb281704f2cafc6fc8dfeaeca65db72b8b49e0f999468503307b1235814?d=identicon)[boboudreau](/maintainers/boboudreau)

![](https://www.gravatar.com/avatar/03b024ab0f53ad6251ff0aa65e8b0e701874acea2d2e16bd8488de1015ad5df6?d=identicon)[dusty.satt](/maintainers/dusty.satt)

---

Top Contributors

[![mrkrstphr](https://avatars.githubusercontent.com/u/164472?v=4)](https://github.com/mrkrstphr "mrkrstphr (7 commits)")[![boboudreau](https://avatars.githubusercontent.com/u/696219?v=4)](https://github.com/boboudreau "boboudreau (4 commits)")[![austinsmorris](https://avatars.githubusercontent.com/u/1616868?v=4)](https://github.com/austinsmorris "austinsmorris (2 commits)")[![dusty-satt](https://avatars.githubusercontent.com/u/28834235?v=4)](https://github.com/dusty-satt "dusty-satt (1 commits)")[![michael-roger](https://avatars.githubusercontent.com/u/35877543?v=4)](https://github.com/michael-roger "michael-roger (1 commits)")

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

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

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

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M478](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M271](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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