Created: 2012-03-24 01:14
Updated: 2013-10-09 03:57
License: mit


Simple Ruby wrapper to api.


Add this line to your application's Gemfile:

gem 'yp'

And then execute:

$ bundle

Or install it yourself as:

$ gem install yp


Acquire an api key by registering at

client = YOUR_API_KEY)

To do a search:

results = ZIP_CODE, term: SEARCH_TERM, listingcount: 50, sort: 'distance')

This returns an array of hashes. See for the attribute keys.

To do a details listing lookup, you will need this listing id, presumably found using the search api above.

detail = c.details(LISTING_ID_STRING)
businessName = detail['businessName']

This returns a hash with attribute/value pairs. See http://


  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 new Pull Request
Cookies help us deliver our services. By using our services, you agree to our use of cookies Learn more