PHPackages                             designbycode/google-maps-place-details - 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. designbycode/google-maps-place-details

ActiveLibrary[API Development](/categories/api)

designbycode/google-maps-place-details
======================================

The Reviews class is a part of the Designbycode namespace and is used to fetch reviews, rating, and user ratings total of a place using the Google Places API. It requires a Google Maps API key and a Google Maps place ID to make requests.

v1.1.3(1y ago)1137[1 PRs](https://github.com/designbycode/google-maps-place-details/pulls)MITPHPPHP ^8.1 | ^8.2 | ^8.3

Since May 12Pushed 1y agoCompare

[ Source](https://github.com/designbycode/google-maps-place-details)[ Packagist](https://packagist.org/packages/designbycode/google-maps-place-details)[ Docs](https://github.com/designbycode/google-maps-place-details)[ GitHub Sponsors](https://github.com/designbycode)[ RSS](/packages/designbycode-google-maps-place-details/feed)WikiDiscussions main Synced 2w ago

READMEChangelog (5)Dependencies (5)Versions (7)Used By (0)

Google Reviews
==============

[](#google-reviews)

[![Latest Version on Packagist](https://camo.githubusercontent.com/94192c8d1c25af1a5a405603b940d43d04092cece31d681f146607a587639f4f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f64657369676e6279636f64652f676f6f676c652d6d6170732d706c6163652d64657461696c732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/designbycode/google-maps-place-details)[![Tests](https://camo.githubusercontent.com/3258acbd638b10d9dd520eaee836a8187e72c864a9d589acaea2c3ca6aee46cf/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f64657369676e6279636f64652f676f6f676c652d6d6170732d706c6163652d64657461696c732f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/designbycode/google-maps-place-details/actions/workflows/run-tests.yml)[![Total Downloads](https://camo.githubusercontent.com/2c52b3cf33a78782a39fefb0bb411061723065c081248d713c958e216d08771c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f64657369676e6279636f64652f676f6f676c652d6d6170732d706c6163652d64657461696c732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/designbycode/google-maps-place-details)

The Reviews class is a part of the Designbycode namespace and is used to fetch reviews, rating, and user ratings total of a place using the Google Places API. It requires a Google Maps API key and a Google Maps place ID to make requests.

Package Documentation
---------------------

[](#package-documentation)

This package provides a simple and easy-to-use interface for fetching place details from the Google Maps Place Details API.

> ### Please note the package only return 5 reviews at most.
>
> [](#please-note-the-package-only-return-5-reviews-at-most)
>
> ###### If you want to fetch more reviews, please use the [Google Maps Place Search API](https://developers.google.com/maps/documentation/places/web-service/search)
>
> [](#if-you-want-to-fetch-more-reviews-please-use-the-google-maps-place-search-api)

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

[](#installation)

To install the package, use composer:

```
composer require designbycode/google-maps-place-details
```

Usage
-----

[](#usage)

To use the package, you need to provide a Google Maps API key and a place ID:

```
use Designbycode\GoogleMapsPlaceDetails\PlaceDetails;

$placeDetails = new PlaceDetails('YOUR_API_KEY', 'YOUR_PLACE_ID');
```

You can then fetch the full result set from the Google Maps API:

```
$results = $placeDetails->getResults();
```

Or you can fetch specific data, such as reviews, rating, and user ratings total:

```
$reviews = $placeDetails->getReviews();
$rating = $placeDetails->getRating();
$userRatingTotal = $placeDetails->getUserRatingTotal();
```

Fields
------

[](#fields)

The package supports the following fields:

- reviews
- rating
- user\_ratings\_total

```
$placeDetails = new PlaceDetails('YOUR_API_KEY', 'YOUR_PLACE_ID');

```

Results Class
-------------

[](#results-class)

The `Results` class is responsible for handling the results of a Google Maps Place Details API request. It provides the following methods:

- `reviews()`: Returns an array of reviews from the API response.
- `rating()`: Returns the rating from the API response, or null if not present.
- `userRatingsTotal()`: Returns the total number of user ratings from the API response, or null if not present.

### Example

[](#example)

```
$placeDetails = new PlaceDetails('YOUR_API_KEY', 'YOUR_PLACE_ID');

$placeDetails->getResults()->reviews();
```

Enum Class
----------

[](#enum-class)

The Field enum class is used to define the fields that can be fetched from the Google Maps Place Details API. It supports the following fields:

- reviews
- rating
- user\_ratings\_total

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

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

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

[](#contributing)

Contributions are welcome! Please submit a pull request with your changes. Please see [CONTRIBUTING](https://github.com/designbycode/.github/blob/main/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [claudemyburgh](https://github.com/designbycode)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 84.2% 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 ~17 days

Total

5

Last Release

702d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6057076?v=4)[Claude Myburgh](/maintainers/claudemyburgh)[@claudemyburgh](https://github.com/claudemyburgh)

---

Top Contributors

[![claudemyburgh](https://avatars.githubusercontent.com/u/6057076?v=4)](https://github.com/claudemyburgh "claudemyburgh (16 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

reviewsgoogle mapsgoogle-reviewsdesignbycodegoogle maps reviews

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/designbycode-google-maps-place-details/health.svg)

```
[![Health](https://phpackages.com/badges/designbycode-google-maps-place-details/health.svg)](https://phpackages.com/packages/designbycode-google-maps-place-details)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.2M46](/packages/tencentcloud-tencentcloud-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k496.1k33](/packages/neuron-core-neuron-ai)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

528.3M7](/packages/avalara-avataxclient)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

232.5k](/packages/eslazarev-wildberries-sdk)[files.com/files-php-sdk

Files.com PHP SDK

2478.1k](/packages/filescom-files-php-sdk)[aimeos/prisma

A powerful PHP package for integrating media related Large Language Models (LLMs) into your applications

1772.4k4](/packages/aimeos-prisma)

PHPackages © 2026

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