Skip to content

Instantly share code, notes, and snippets.

@codingjester
Created January 14, 2012 19:28
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codingjester/1612603 to your computer and use it in GitHub Desktop.
Save codingjester/1612603 to your computer and use it in GitHub Desktop.
DuckDuckGo Ruby API
require 'net/http'; require 'json'; JSON.parse(Net::HTTP.get(URI("http://duckduckgo.com/?q=#{query}&o=json")))
@codingjester
Copy link
Author

Be sure to url encode your query!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment