Created
January 14, 2012 19:28
-
-
Save codingjester/1612603 to your computer and use it in GitHub Desktop.
DuckDuckGo Ruby API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'net/http'; require 'json'; JSON.parse(Net::HTTP.get(URI("http://duckduckgo.com/?q=#{query}&o=json"))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Be sure to url encode your query!