There's a lot of open issues
A long-lived project that still receives updates
google-api-customization is a Ruby wrapper around the Google Places API that makes it easy to integrate place discovery into Rails applications. Features: - Place detail lookup by place ID (name, address, phone, rating, hours, photos, reviews) - Text search for places by query string with optional location bias - Nearby search by coordinates and radius - Autocomplete for place names and addresses - Photo URL resolution - Full error handling (OverQueryLimitError, RequestDeniedError, NotFoundError, etc.) - Configurable retry logic with delay Built on HTTParty for HTTP and supports the legacy Google Places API endpoints.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 3.12
~> 3.0

Runtime

>= 0.14
 Project Readme

google-api-customization

A Ruby gem that wraps the Google Places API for use in Rails applications. Supports place details, text search, nearby search, radar search, photos, reviews, and autocomplete.

Installation

Add this line to your Gemfile:

gem 'google-api-customization'

Then run:

bundle install

Configuration

GoogleApiCustomization.configuration do |config|
  config.api_key = "YOUR_GOOGLE_API_KEY"
end

Usage

Look up a place by ID

place = GoogleApiCustomization::Place.find(place_id, api_key, sensor)

place.name               # => "Eiffel Tower"
place.formatted_address  # => "Champ de Mars, Paris, France"
place.lat                # => 48.8584
place.lng                # => 2.2945
place.rating             # => 4.7
place.website            # => "https://www.toureiffel.paris"
place.opening_hours      # => { ... }

Text search

places = GoogleApiCustomization::Place.list_by_query(
  "coffee shops",
  api_key,
  sensor,
  lat: 48.8584,
  lng: 2.2945,
  radius: 1000
)

Photos

place.photos.each do |photo|
  url = photo.fetch_url(400)  # maxwidth in pixels
end

Reviews

place.reviews.each do |review|
  puts "#{review.author_name}: #{review.text} (#{review.rating}/5)"
end

Available Place Attributes

name, place_id, lat, lng, formatted_address, formatted_phone_number, international_phone_number, website, rating, price_level, opening_hours, types, photos, reviews, url, vicinity, address_components, utc_offset

Dependencies