Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Ruby wrapper for the CityGrid (CitySearch) API
branch: master

Merge pull request #1 from jspooner/master.

Updated some api calls to V2
latest commit ff65b61c02
@phuphighter authored
Failed to load latest commit information.
lib Updated to v2 api
tasks first commit
test Updated to v2 api
MIT-LICENSE first commit Updated to v2 api
Rakefile Updated to v2 api
VERSION Updated to v2 api
citygrid.gemspec gem update
init.rb first commit
uninstall.rb first commit

Why I Forked Citygrid

To support their version 2 api.

You can not run version 1 and 2 gems at the same time. Why? Well their documentation says their V1 API will be depreciated at some point in time.


This is a Ruby wrapper for the CityGrid API.


As a gem:

sudo gem install citygrid

As a plugin (in your Rails directory:

script/plugin install git://

Get a Citygrid API key

Sign up for a CityGrid API key:


Instantiate a client

>> citygrid = => 'your_api_key')

or configure once

>> Citygrid.configure do |config|
>>   config.api_key = 'your_api_key'
>> end
>> citygrid =


>> spot = citygrid.search_locations(:what => "roots coffee", :where => "76180", :rpp => 1)
=> "Roots Coffeehouse"

>> profile = citygrid.profile(:listing_id => '613027480', :client_ip => 'any_client_ip')
>> profile.locations.location.categories
=> <#Hashie::Mash category=<#Hashie::Mash name="Coffeehouses" nameid="1726" parent="Restaurants" parentid="1722">>

You can search for locations and events, get reviews, and get business profiles.


Contact me if you have any suggestions and feel free to fork it!

Copyright (c) 2009 Johnny Khai Nguyen, released under the MIT license

Something went wrong with that request. Please try again.