Skip to content

Instantly share code, notes, and snippets.

@codingjester
Created January 14, 2012 19:28
Show Gist options
  • Select an option

  • Save codingjester/1612603 to your computer and use it in GitHub Desktop.

Select an option

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
Copy Markdown
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