tomnod geoapi

Locate any tweet, any where.

 



How to Use the API

Webservice Type : GET

Url : geoapi.tomnod.com/geolocate/<tweet_id>

Parameters :

tweet_id : unique ID of the tweet to be geolocated

 

Webservice Type : POST

Url : geoapi.tomnod.com/geolocate/<tweet_id>

HTTP POST request body must contain a full JSON encoded tweet as retrieved from the Twitter streaming API. 

 

NOTE: If the tweet JSON body does not contain user information (for example as from the Twitter search API), use the GET version of the Tomnod Geo API instead of the POST version.

 

Result : returns a result set in JSON format containing the following parameters:

“status”: - OK indicates a successful request

“result”: - 1 indicates that a location was found for the tweet

“confidence” – number indicates how good of a match was found

 “place_id” – Tomnod’s internal place_id of the place matched

“type_id” – Tomnod’s internal type ID indicating the type of place matched

“place_name” – Name of the place matched

“full_place_name” – Full place name including state, country, etc.

“coords” – an array containing latitude and longitude if available

“type_name” – the type of match found corresponding to the type_id

 

Example : http://geoapi.tomnod.com/geolocate/223069967615143936

 

Returns the result:

{"status":"OK","result":1,"confidence":0.4,"place_id":"9697","type_id":"3","place_name":"Bradley County","full_place_name":"Bradley County, Tennessee, United States of America", "coords": {"lat":35.154425130761,"lng":-84.859811940585}, "type_name":"county"}