POST geo/place

As of December 2nd, 2013, this endpoint is deprecated and retired and no longer functions. Place creation was used infrequently by third party applications and is generally no longer supported on Twitter. Requests will return with status 410 (Gone) with error code 251.

Created a new place object at the given latitude and longitude.

Before creating a place you needed to query GET geo/similar_places with the latitude, longitude and name of the place you wished to create. The query will return an array of places which are similar to the one you wish to create, and a token. If the place you wished to create wasn’t in the returned array you could use the token with this method to create a new one.

Learn more about Finding Tweets about Places.

Resource URL

https://api.twitter.com/1.1/geo/place.json

Resource Information

Response formats JSON
Requires authentication? Yes (user context only)
Rate limited? Yes

Parameters

Name Required Description Default Value Example
name required The name a place is known as.   Twitter%20HQ
contained_within required The place_id within which the new place can be found. Try and be as close as possible with the containing place. For example, for a room in a building, set the contained_within as the building place_id .   247f43d441defc03
token required The token found in the response from geo/similar_places.   36179c9bf78835898ebf521c1defd4be
lat required The latitude the place is located at. This parameter will be ignored unless it is inside the range -90.0 to +90.0 (North is positive) inclusive. It will also be ignored if there isn’t a corresponding long parameter.   37.7821120598956
long required The longitude the place is located at. The valid ranges for longitude is -180.0 to +180.0 (East is positive) inclusive. This parameter will be ignored if outside that range, if it is not a number, if geo_enabled is disabled, or if there not a corresponding lat parameter.   -122.400612831116
attribute:street_address optional This parameter searches for places which have this given street address. There are other well-known, and application specific attributes available. Custom attributes are also permitted. Learn more here .   795%20Folsom%20St
callback optional If supplied, the response will use the JSONP format with a callback of the given name.    

Example Request

POST https://api.twitter.com/1.1/geo/create.json

Example Response

{
  "name": "Twitter 3rd Floor Lunch Room",
  "polylines": [

  ],
  "country": "The United States of America",
  "country_code": "US",
  "attributes": {

  },
  "url": "http://api.twitter.com/1/geo/id/6b9811c8d9de10b9.json";,
  "id": "6b9811c8d9de10b9",
  "bounding_box": {
    "coordinates": [
      [
        [
          -122.400612831116,
          37.7821120598956
        ],
        [
          -122.400612831116,
          37.7821120598956
        ],
        [
          -122.400612831116,
          37.7821120598956
        ],
        [
          -122.400612831116,
          37.7821120598956
        ]
      ]
    ],
    "type": "Polygon"
  },
  "contained_within": [
    {
      "name": "Twitter HQ",
      "country": "The United States of America",
      "country_code": "US",
      "attributes": {
        "street_address": "795 Folsom St"
      },
      "url": "http://api.twitter.com/1/geo/id/247f43d441defc03.json";,
      "id": "247f43d441defc03",
      "bounding_box": {
        "coordinates": [
          [
            [
              -122.400612831116,
              37.7821120598956
            ],
            [
              -122.400612831116,
              37.7821120598956
            ],
            [
              -122.400612831116,
              37.7821120598956
            ],
            [
              -122.400612831116,
              37.7821120598956
            ]
          ]
        ],
        "type": "Polygon"
      },
      "full_name": "Twitter HQ, San Francisco",
      "place_type": "poi"
    }
  ],
  "geometry": {
    "coordinates": [
      -122.400612831116,
      37.7821120598956
    ],
    "type": "Point"
  },
  "full_name": "Twitter 3rd Floor Lunch Room, Twitter HQ",
  "place_type": "poi"
}