Announcing near= in api and geo/geocode

349 views
Skip to first unread message

David Blackman

unread,
Apr 5, 2012, 12:34:27 PM4/5/12
to foursqu...@googlegroups.com
Hi api enthusiasts,

I'm delighted to announce the integration of our coarse geocoder into the foursquare api today. The first integration is that venues and tips search & explore endpoints in the API which can take "ll" can now also take "near" instead. /venues/search?query=pizza&near=austin will return pizza places near austin, texas. It can take freeform strings and geocode them down to the city/neighborhood level. I am looking to integrate POIs soon too (like the Empire State Building or Washington Monument). If the near parameter cannot be successfully geocoded, we return an error with errorType: "failed_geocode." If the geocode succeeds, we'll return the results as well as a new element in the "response" block called "geocode"

There are other obvious endpoints in the system to add this to, like users/search, users/tips, users/venuehistory, and we'll be adding those in the coming days.

Additionally, we're going to open up some of our internal geocoding tools at /v2/geo/. /v2/geo/geocode will be a hosted version of the twofishes geocoder (https://github.com/foursquare/twofishes) at decent rate limits (currently 5qps). This endpoint will return full geocodes. It's currently in beta while we work out the API. Email me your client_id if you'd like access.

Documentation @ https://developer.foursquare.com/docs/venues/search + https://developer.foursquare.com/docs/responses/geocode

The geocoder is still being actively developed, don't be surprised if it returns crazy geocodes once in a while. Send me issues and we'll fix them in ranking & indexing.

I'm curious to hear from you what other information would be useful in the geocode response for normal endpoints. We're currently not returning parent features in an effort to keep the response compact.

Finally, the bulk of this data comes from http://www.geonames.org/ which is CC-BY (attribution) licensed. If you are using near or /geo/geocode, please give attribution to the geonames dataset. Based on this post: http://forum.geonames.org/gforum/posts/list/2144.page a posting on your about page is fine.

Thanks + enjoy,
--dave

Reply all
Reply to author
Forward
0 new messages