Image from Good APIs Project Blog
Like a good soufflé, Places API were served new or updated when check ins were hot.
Now that the soufflé has collapsed a bit, let’s taste Places API of services with check in capabilities including Facebook, Foursquare, Google, Gowalla, TellMeWhere, Twitter, and Yelp available to developers.
Facebook
Announced in August 2010 and updated just last week, Facebook Places API is a check in API with search capabilities.
Designed as an extension of the Graph API with a new checkin object, the learning curve is minimal for developers who have already used the Facebook Graph API before. You can tag (i.e. link) a user with a place and query check ins for a Place (i.e Facebook page) or User. The Graph API provides new search capabilities to return Places based on latitude and longitude.
//Retrieve information about a check in
GET https://graph.facebook.com/[checkin_id]
//Retrieve checkins for a user or a page
GET https://graph.facebook.com/[user id]/checkins
GET https://graph.facebook.com/[page id]/checkins
//Search the graph for places page based on coordinates
GET https://graph.facebook.com/search?q=pizza&type=place¢er=lat,long&distance=1000
The API being few weeks old, the ability to tag places with more objects from the graph such as photos would be natural.
Foursquare
Like everyone else, Foursquare comes with a very standard based API supporting OAuth, REST, JSON/XML.
In addition to the social features for users and friends, the API features “checkins” to query check ins for a user (i.e. a friend) with a specific location and “checkin” to check a user into a place (i.e. a venue). Places or “venue” can be added, edited, flagged (closed, mislocated, duplicated). “tip” associated with a venue by a user have their own methods.
//query to find out about recent check ins for friends
URL: http://api.foursquare.com/v1/checkins
//request to check a user into a venue
URL: http://api.foursquare.com/v1/checkin
//venue information
URL: http://api.foursquare.com/v1/venue
The API also provides a hierarchy of categories and subcategories for venues.
Google
In developer preview mode (i.e private beta), the API is a database of Places without check in capabilities available publicly just yet, but Google is already working with selected partners including SCVNGR and Booyah who use check ins.
//Places Search
URL: https://maps.googleapis.com/maps/api/place/search/output?parameters
//Place Details
URL: https://maps.googleapis.com/maps/api/place/details/output?parameters
//Place Reports
URL: https://maps.googleapis.com/maps/api/place/report/output?parameters
The API also provides the ability to edit a place with the “report” method.
Gowalla
Reflecting the unique features of its application with Items, Trips, Events, the API has a lot of similarities with Foursquare and Facebook by providing core social features and places in a standard way with REST, JSON, OAuth.
Places are known as “Spots” in the Gowalla terminology. They can be searched by location. Checkins are read-only and can only be queried to retrieve detailed information.
//Query the spots based on location and radius
URL: http://api.gowalla.com/spots?lat=30.2697&lng=-97.7494&radius=50
//Retrieve the details about a checkins
URL: http://api.gowalla.com/checkins/14223232
TellMeWhere
Review service of Places with check in, the API lets developers search for Places and associated content that is ranked by its community of users. For the time being, the API does not provide social features or check in capabilities.
//Search Places by location (rectangle of coordinates)
URL: http://api.tellmewhere.com/v1/searchplaces?rect=48.9,2.34,48.7,2.36&cat=restaurants
//Get Place reviews
URL: http://api.tellmewhere.com/v1/getplacereviews?placeid=zn4AHc
Twitter
Adding more context to a tweet is key to understand Twitter approach to Places. It does not provide a check in API or a Places API for developing LBS Applications, but rather offers a way to tie a location to a tweet from a third party application. The ability to query tweets per Places is not about check in, it is about real time information at the place. However, tweeting at a place is similar
Nevertheless the ability to publish a tweet with a location is a feature available in most LBS Applications today and Twitter came up with a unique guideline just for that. The Twitter Places API is known as “Geo”.
//Tweet with location
URL: http://api.twitter.com/1/statuses/update.xml?status=hello&lat=37.7821120598956&long=-122.400612831116
//Tweet with Place ID
URL: http://api.twitter.com/1/statuses/update.xml?status=hello&place_id=df51dec6f4ee2b2c
//Retrieve a Place ID by name with the Geo API
URL: http://api.twitter.com/1/geo/place.json?name=Twitter%20HQ
Yelp
Review site with check ins capabilities, Yelp offers an API to find Places within a neighborhood with geocoding or location. Although you can check in within the application, this feature is not available thru the API.
//Search of Places within a neighborhood
URL: http://api.yelp.com/neighborhood_search?lat=37.788022&long=-122.399797&ywsid=XXXXXXXXXXXXXXXXXX
//Retrieve reviews for a location
http://api.yelp.com/business_review_search?term=yelp&tl_lat=37.9&tl_long=-122.5&br_lat=37.788022&br_long=-122.399797&limit=3&ywsid=XXXXXXXXXXXXXXXXXX
Summary
There are lots of factors not discussed here that a developer should pay attention to before choosing a Places API, such as query rate limitation, duplication of Places, curated content by the community or business that claim the Place.
Places API have made a huge step forward from their POI database ancestor, and a lot more is yet to come.