Skip to content

Instantly share code, notes, and snippets.

@aviflombaum
Created February 7, 2009 02:21
Show Gist options
  • Save aviflombaum/59736 to your computer and use it in GitHub Desktop.
Save aviflombaum/59736 to your computer and use it in GitHub Desktop.
A ruby wrapper to search google using the Google AJAX Search API
require 'rubygems'
require 'httparty'
class GoogleSearch
include HTTParty
format :json
base_uri 'http://ajax.googleapis.com/ajax/services'
default_params :output => 'json', :v => "1.0"
def self.find(query)
get('/search/web', :query => {:q => query})
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment