Skip to content

Instantly share code, notes, and snippets.

@opsb
Last active December 23, 2015 11:29
Show Gist options
  • Select an option

  • Save opsb/6628914 to your computer and use it in GitHub Desktop.

Select an option

Save opsb/6628914 to your computer and use it in GitHub Desktop.
Ruby bing search API
require 'rest_client'
class BingSearch
def self.for(account_key, query)
RestClient.get("https://:#{account_key}@api.datamarket.azure.com/Bing/SearchWeb/v1/Web?Query='#{CGI::escape(query)}'&$format=json")
end
end
gem 'https://github.com/archiloque/rest-client'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment