Places

Updated on Mon, 2013-10-28 05:57

Places are specific, named locations with corresponding geo coordinates. They can be attached to Tweets by specifying a place_id when tweeting. Tweets associated with places are not necessarily issued from that location but could also potentially be about that location. Places can be searched for. Tweets can also be found by place_id. See About Geo Place Attributes for more information.

(JSON)

Field Guide

Consumers of Places should tolerate the addition of new fields and variance in ordering of fields with ease. Not all fields appear in all contexts. It is generally safe to consider a nulled field, an empty set, and the absence of a field as the same thing.

Field Type Description
attributes Object Contains a hash of variant information about the place. See About Geo Place Attributes.

Example:

"attributes": {
    "street_address": "795 Folsom St",
    "623:id": "210176",
    "twitter": "twitter"
},
bounding_box Object A bounding box of coordinates which encloses this place.

Example:

"bounding_box":{"coordinates":[ [ [2.2241006,48.8155414], [2.4699099,48.8155414], [2.4699099,48.9021461], [2.2241006,48.9021461] ] ], "type":"Polygon"}

country String Name of the country containing this place.

Example:

"country":"France"

country_code String Shortened country code representing the country containing this place.

Example:

"country_code":"FR"

full_name String Full human-readable representation of the place's name.

Example:

"full_name":"Paris, Paris"

id String ID representing this place. Note that this is represented as a string, not an integer.

Example:

"id":"7238f93a3e899af6"

name String Short human-readable representation of the place's name.

Example:

"name":"Paris"

place_type String The type of location represented by this place.

Example:

"place_type":"city"

url String URL representing the location of additional place metadata for this place.

Example:

"url":"http://api.twitter.com/1/geo/id/7238f93a3e899af6.json"

Bounding box

Field Type Description
coordinates Array of Array of Array of Float A series of longitude and latitude points, defining a box which will contain the Place entity this bounding box is related to. Each point is an array in the form of [longitude, latitude]. Points are grouped into an array per bounding box. Bounding box arrays are wrapped in one additional array to be compatible with the polygon notation.

Example:

"coordinates":[ [ [2.2241006,48.8155414], [2.4699099,48.8155414], [2.4699099,48.9021461], [2.2241006,48.9021461] ] ]

type String The type of data encoded in the coordinates property. This will be "Polygon" for bounding boxes.

Example:

"type":"Polygon"