A gem that provides an interface to Microsoft’s Bing search API.
Get a Windows Azure Data Marketplace account at datamarket.azure.com/, then setup an Account Key at datamarket.azure.com/account/keys.
Finally, subscribe to Bing Search API - Web Results Only Data at datamarket.azure.com/dataset/bing/searchweb.
require 'rubygems'
require 'rbing'
bing = RBing.new("YOURACCOUNTKEY")
rsp = bing.web("ruby")
puts rsp.results[0].title
=> "Ruby (programming language) - Wikipedia, the free encyclopedia"
RBing also has a simple command line interface.
Put your account key into $HOME/.rbing_app_id and you can use rbing:
$> rbing "ruby gems"
[{"Url"=>"http://rubygems.org/",
"Title"=>"RubyGems Manuals",
"CacheUrl"=>
"http://cc.bingj.com/cache.aspx?q=ruby+gems&d=76167709461212&w=39b024d8,55a87382",
"DisplayUrl"=>"rubygems.org",
"DateTime"=>Wed Jun 03 11:25:29 UTC 2009,
"Description"=>
"The Gem::Specification object controls the data..."},
...
]
-
HTTParty: httparty.rubyforge.org/
RBing:
-
Source Code: github.com/mikedemers/rbing/tree
-
Support: github.com/mikedemers/rbing/issues
Bing:
-
Bing API: www.bing.com/developers
-
Register for App Id: www.bing.com/developers/createapp.aspx
-
Bing API Reference: msdn.microsoft.com/en-us/library/dd251056.aspx
-
Query Keywords: help.live.com/help.aspx?project=wl_searchv1&market=en-US&querytype=keyword&query=redliub&tmt=&domain=www.bing.com:80