The ruby-factual gem is clunky and out of date, so I tossed together a script to access the new v3 API.
The v3 Factual API encourages 2-legged OAuth for requests. Request a key here:
http://developer.factual.com/display/docs/Factual+Developer+APIs+Version+3
require 'factual'
client = Factual::Client.new(OAUTH_KEY,OAUTH_SECRET)
client.table("places").q("burger").near({"$circle"=>{"$center"=>[30.3,-97.7],"$meters"=>5000}}).limit(1).fetch
=> {"version"=>3, "status"=>"ok", "response"=>{"data"=>[{"factual_id"=>"cca4257e-31fa-4c36-bfe0-12497557a62b", "name"=>"Hill-Bert's Burgers Too", "address"=>"5340 Cameron Rd", "locality"=>"Austin", "region"=>"TX", "country"=>"US", "postcode"=>"78723", "tel"=>"(512) 371-3717", "category"=>"Food & Beverage > Restaurants", "website"=>"http://hill-bertsburgers.com/", "latitude"=>30.3116, "longitude"=>-97.706703, "status"=>"1", "$distance"=>1441.4647}], "included_rows"=>1}}
Parameters are specified just as they are in the docs:
http://developer.factual.com/display/docs/Core+API+-+Read
As used above, geo
is aliased as near
.