Search
  1. geo/search〔指定した検索範囲からplace_idとして使用できる有効な場所の情報リストを取得(認証不要)〕
  2. geo/similar_places〔指定した場所の近くにある似たような場所のリストを取得(認証不要)〕
  3. geo/reverse_geocode〔緯度経度で指定した場所のリストを取得(認証不要)〕
  4. geo/id/:place_id〔指定したplace_idの場所の情報を取得(認証不要)〕
  5. geo/place〔新しい場所を登録(要認証)〕

geo/similar_places
指定した場所の近くにある似たような場所のリストを取得(認証不要)

unknown

認証なしAPI制限対象

HTTP GEThttp://api.twitter.com/1/geo/similar_places.json

指定した場所の周囲にある似た場所の情報リストを取得します。 このメソッドは、geo/placeで新しい場所を登録する際、既にその場所が登録されていないか調べるのに有用です。 取得結果に含まれるトークンは、新しい場所を登録するために必要なトークンです。

パラメーター

パラメーター説明
lat任意 周囲を検索する緯度を指定。 値の有効範囲は、-90.0~90.0(北が正)。
long任意 周囲を検索する軽度を指定。 値の有効範囲は、-90.0~90.0(北が正)。
name必須 場所の名前。
例)http://api.twitter.com/1/geo/similar_places?lat=35.66721&long=139.708958&name=Omotesando%20Hills

取得サンプル(XML/JSON)

similar_places.json
▼緯度経度に東京都の座標、名前に「表参道ヒルズ」での取得結果
http://api.twitter.com/1/geo/similar_places?lat=35.66721&long=139.708958&name=Omotesando%20Hills

json[result]['token']=3ba2eac31201599fa6987d0c53971dbc

json[query]['url']=http://api.twitter.com/1/geo/similar_places.json?autocomplete=&name=Omotesando+Hills&lat=35.66721&granularity=&long=139.708958&query=&strict=false&contained_within=&accuracy=
json[query]['params']['name']=Omotesando Hills
json[query]['params']['autocomplete']=
json[query]['params']['granularity']=
json[query]['params']['query']=
json[query]['params']['strict']=
json[query]['params']['contained_within']=
json[query]['params']['coordinates']['type']=Point
json[query]['params']['coordinates']['coordinates']['0']=139.708958
json[query]['params']['coordinates']['coordinates']['1']=35.66721
json[query]['params']['accuracy']=
json[query]['type']=similar_places


▼ラフォーレ原宿の緯度経度、名前に「Laforet HARAJUKU」での取得結果
http://api.twitter.com/1/geo/similar_places?lat=35.6784592&long=139.688888&name=Laforet%20HARAJUKU";

json[result]['token']=5b7283e210638acf647183422d330d19

json[query]['url']=http://api.twitter.com/1/geo/similar_places.json?autocomplete=&name=Laforet+HARAJUKU&lat=35.6784592&granularity=&long=139.688888&query=&strict=false&contained_within=&accuracy=
json[query]['params']['name']=Laforet HARAJUKU
json[query]['params']['autocomplete']=
json[query]['params']['granularity']=
json[query]['params']['query']=
json[query]['params']['strict']=
json[query]['params']['contained_within']=
json[query]['params']['coordinates']['type']=Point
json[query]['params']['coordinates']['coordinates']['0']=139.688888
json[query]['params']['coordinates']['coordinates']['1']=35.6784592
json[query]['params']['accuracy']=
json[query]['type']=similar_places

▼コンドマニア原宿店の緯度経度、名前に「Condomania%20Harajuku」での取得結果
http://api.twitter.com/1/geo/similar_places?lat=35.672864&long=139.70041&name=Condomania%20Harajuku";

json[result]['token']=454fd562ffcd4521fa61b2f4cb7bb94d

json[query]['url']=http://api.twitter.com/1/geo/similar_places.json?autocomplete=&name=Condomania+Harajuku&lat=35.672864&granularity=&long=139.70041&query=&strict=false&contained_within=&accuracy=
json[query]['params']['name']=Condomania Harajuku
json[query]['params']['autocomplete']=
json[query]['params']['granularity']=
json[query]['params']['query']=
json[query]['params']['strict']=
json[query]['params']['contained_within']=
json[query]['params']['coordinates']['type']=Point
json[query]['params']['coordinates']['coordinates']['0']=139.70041
json[query]['params']['coordinates']['coordinates']['1']=35.672864
json[query]['params']['accuracy']=
json[query]['type']=similar_places

geo/reverse_geocode
緯度経度で指定した場所のリストを取得(認証不要)

unknown

認証なしAPI制限対象

HTTP GEThttp://api.twitter.com/1/geo/reverse_geocode.json

指定した緯度経度から、place_idとして使用できる場所を最大20件取得します。

取得サンプル(XML/JSON)

reverse_geocode.json
▼表参道ヒルズの緯度経度での取得結果
"http://api.twitter.com/1/geo/reverse_geocode?lag=35.66721&long=139.708958

json[result]['places']['0']['name']=Shibuya Ward
json[result]['places']['0']['bounding_box']['type']=Polygon
json[result]['places']['0']['bounding_box']['coordinates']['0']=Array
json[result]['places']['0']['url']=http://api.twitter.com/1/geo/id/f7c22e0cf7b3af2b.json
json[result]['places']['0']['place_type']=city
json[result]['places']['0']['country']=Japan
json[result]['places']['0']['contained_within']['0']['name']=Tokyo
json[result]['places']['0']['contained_within']['0']['bounding_box']=Array
json[result]['places']['0']['contained_within']['0']['country']=Japan
json[result]['places']['0']['contained_within']['0']['place_type']=admin
json[result]['places']['0']['contained_within']['0']['url']=http://api.twitter.com/1/geo/id/a56612250c754f23.json
json[result]['places']['0']['contained_within']['0']['id']=a56612250c754f23
json[result]['places']['0']['contained_within']['0']['country_code']=JP
json[result]['places']['0']['contained_within']['0']['full_name']=Tokyo, Japan
json[result]['places']['0']['contained_within']['0']['attributes']=Array
json[result]['places']['0']['id']=f7c22e0cf7b3af2b
json[result]['places']['0']['country_code']=JP
json[result]['places']['0']['full_name']=Shibuya Ward, Tokyo
json[result]['places']['1']['name']=Tokyo
json[result]['places']['1']['bounding_box']['type']=Polygon
json[result]['places']['1']['bounding_box']['coordinates']['0']=Array
json[result]['places']['1']['url']=http://api.twitter.com/1/geo/id/a56612250c754f23.json
json[result]['places']['1']['place_type']=admin
json[result]['places']['1']['country']=Japan
json[result]['places']['1']['contained_within']['0']['name']=Japan
json[result]['places']['1']['contained_within']['0']['bounding_box']=
json[result]['places']['1']['contained_within']['0']['country']=Japan
json[result]['places']['1']['contained_within']['0']['place_type']=country
json[result]['places']['1']['contained_within']['0']['url']=http://api.twitter.com/1/geo/id/06ef846bfc783874.json
json[result]['places']['1']['contained_within']['0']['id']=06ef846bfc783874
json[result]['places']['1']['contained_within']['0']['country_code']=JP
json[result]['places']['1']['contained_within']['0']['full_name']=Japan
json[result]['places']['1']['contained_within']['0']['attributes']=Array
json[result]['places']['1']['id']=a56612250c754f23
json[result]['places']['1']['country_code']=JP
json[result]['places']['1']['full_name']=Tokyo, Japan
json[result]['places']['2']['name']=Japan
json[result]['places']['2']['bounding_box']=
json[result]['places']['2']['url']=http://api.twitter.com/1/geo/id/06ef846bfc783874.json
json[result]['places']['2']['place_type']=country
json[result]['places']['2']['country']=Japan
json[result]['places']['2']['id']=06ef846bfc783874
json[result]['places']['2']['country_code']=JP
json[result]['places']['2']['full_name']=Japan

json[query]['url']=http://api.twitter.com/1/geo/reverse_geocode.json?lat=35.66721&granularity=neighborhood&long=139.708958&accuracy=0
json[query]['params']['granularity']=neighborhood
json[query]['params']['accuracy']=0
json[query]['params']['coordinates']['type']=Point
json[query]['params']['coordinates']['coordinates']['0']=139.708958
json[query]['params']['coordinates']['coordinates']['1']=35.66721
json[query]['type']=reverse_geocode

geo/id/:place_id
指定したplace_idの場所の情報を取得(認証不要)

unknown

認証なしAPI制限対象

HTTP GEThttp://api.twitter.com/1/geo/id/[場所ID].json

place_idで指定した場所に関するすべての全情報を取得します。

パラメーター

パラメーター説明
place_id任意 有効なplace_idを指定。 place_idは、geo/reverse_geocodeから取得可能です。 例)http://api.twitter.com/1/geo/id/7ee61f505fdfdf5c.json(新宿)

取得サンプル(XML/JSON)

7ee61f505fdfdf5c.json
▼新宿(place_id=http://api.twitter.com/1/geo/id/7ee61f505fdfdf5c)の取得結果

json[geometry]['type']=Polygon
json[geometry]['coordinates']['0']['0']['0']=139.741547222
json[geometry]['coordinates']['0']['0']['1']=35.6983286111
json[geometry]['coordinates']['0']['1']['0']=139.737615278
json[geometry]['coordinates']['0']['1']['1']=35.6932730556
json[geometry]['coordinates']['0']['2']['0']=139.731331111
json[geometry]['coordinates']['0']['2']['1']=35.6893286111
json[geometry]['coordinates']['0']['3']['0']=139.729922222
json[geometry]['coordinates']['0']['3']['1']=35.68456
json[geometry]['coordinates']['0']['4']['0']=139.731672222
json[geometry]['coordinates']['0']['4']['1']=35.6814211111
json[geometry]['coordinates']['0']['5']['0']=139.728126667
json[geometry]['coordinates']['0']['5']['1']=35.6825972222
json[geometry]['coordinates']['0']['6']['0']=139.726513056
json[geometry]['coordinates']['0']['6']['1']=35.6797822222
json[geometry]['coordinates']['0']['7']['0']=139.723319722
json[geometry]['coordinates']['0']['7']['1']=35.6782452778
json[geometry]['coordinates']['0']['8']['0']=139.719785833
json[geometry]['coordinates']['0']['8']['1']=35.6791341667
json[geometry]['coordinates']['0']['9']['0']=139.719899444
json[geometry]['coordinates']['0']['9']['1']=35.6752638889
json[geometry]['coordinates']['0']['10']['0']=139.717728889
json[geometry]['coordinates']['0']['10']['1']=35.6731527778
json[geometry]['coordinates']['0']['11']['0']=139.714831111
json[geometry]['coordinates']['0']['11']['1']=35.6749211111
json[geometry]['coordinates']['0']['12']['0']=139.712683333
json[geometry]['coordinates']['0']['12']['1']=35.6744119444
json[geometry]['coordinates']['0']['13']['0']=139.714638056
json[geometry]['coordinates']['0']['13']['1']=35.6807266667
json[geometry]['coordinates']['0']['14']['0']=139.707183333
json[geometry]['coordinates']['0']['14']['1']=35.6846433333
json[geometry]['coordinates']['0']['15']['0']=139.705444722
json[geometry]['coordinates']['0']['15']['1']=35.6880138889
json[geometry]['coordinates']['0']['16']['0']=139.702728889
json[geometry]['coordinates']['0']['16']['1']=35.6878472222
json[geometry]['coordinates']['0']['17']['0']=139.702183333
json[geometry]['coordinates']['0']['17']['1']=35.6893008333
json[geometry]['coordinates']['0']['18']['0']=139.694376667
json[geometry]['coordinates']['0']['18']['1']=35.6864861111
json[geometry]['coordinates']['0']['19']['0']=139.687490278
json[geometry]['coordinates']['0']['19']['1']=35.6817544444
json[geometry]['coordinates']['0']['20']['0']=139.684785833
json[geometry]['coordinates']['0']['20']['1']=35.6859397222
json[geometry]['coordinates']['0']['21']['0']=139.685751667
json[geometry]['coordinates']['0']['21']['1']=35.6877822222
json[geometry]['coordinates']['0']['22']['0']=139.683194722
json[geometry]['coordinates']['0']['22']['1']=35.6886063889
json[geometry]['coordinates']['0']['23']['0']=139.684910833
json[geometry]['coordinates']['0']['23']['1']=35.6914211111
json[geometry]['coordinates']['0']['24']['0']=139.683581111
json[geometry]['coordinates']['0']['24']['1']=35.6925508333
json[geometry]['coordinates']['0']['25']['0']=139.688240278
json[geometry]['coordinates']['0']['25']['1']=35.6988377778
json[geometry]['coordinates']['0']['26']['0']=139.688444722
json[geometry]['coordinates']['0']['26']['1']=35.7070972222
json[geometry]['coordinates']['0']['27']['0']=139.694308333
json[geometry]['coordinates']['0']['27']['1']=35.7110138889
json[geometry]['coordinates']['0']['28']['0']=139.682797222
json[geometry]['coordinates']['0']['28']['1']=35.7100138889
json[geometry]['coordinates']['0']['29']['0']=139.680069722
json[geometry]['coordinates']['0']['29']['1']=35.7110694444
json[geometry]['coordinates']['0']['30']['0']=139.682047222
json[geometry]['coordinates']['0']['30']['1']=35.7132822222
json[geometry]['coordinates']['0']['31']['0']=139.679194722
json[geometry]['coordinates']['0']['31']['1']=35.7148194444
json[geometry]['coordinates']['0']['32']['0']=139.678944722
json[geometry]['coordinates']['0']['32']['1']=35.7181433333
json[geometry]['coordinates']['0']['33']['0']=139.6753425
json[geometry]['coordinates']['0']['33']['1']=35.7200416667
json[geometry]['coordinates']['0']['34']['0']=139.6734675
json[geometry]['coordinates']['0']['34']['1']=35.7184766667
json[geometry]['coordinates']['0']['35']['0']=139.673513056
json[geometry]['coordinates']['0']['35']['1']=35.7205786111
json[geometry]['coordinates']['0']['36']['0']=139.6757175
json[geometry]['coordinates']['0']['36']['1']=35.7213472222
json[geometry]['coordinates']['0']['37']['0']=139.6764675
json[geometry]['coordinates']['0']['37']['1']=35.7291619444
json[geometry]['coordinates']['0']['38']['0']=139.681285833
json[geometry]['coordinates']['0']['38']['1']=35.7274305556
json[geometry]['coordinates']['0']['39']['0']=139.684388056
json[geometry]['coordinates']['0']['39']['1']=35.7226897222
json[geometry]['coordinates']['0']['40']['0']=139.7047175
json[geometry]['coordinates']['0']['40']['1']=35.7228008333
json[geometry]['coordinates']['0']['41']['0']=139.705910833
json[geometry]['coordinates']['0']['41']['1']=35.7185786111
json[geometry]['coordinates']['0']['42']['0']=139.704422222
json[geometry]['coordinates']['0']['42']['1']=35.7161527778
json[geometry]['coordinates']['0']['43']['0']=139.706013056
json[geometry]['coordinates']['0']['43']['1']=35.7135416667
json[geometry]['coordinates']['0']['44']['0']=139.710319722
json[geometry]['coordinates']['0']['44']['1']=35.7135322222
json[geometry]['coordinates']['0']['45']['0']=139.711513056
json[geometry]['coordinates']['0']['45']['1']=35.7149305556
json[geometry]['coordinates']['0']['46']['0']=139.7145925
json[geometry]['coordinates']['0']['46']['1']=35.7131711111
json[geometry]['coordinates']['0']['47']['0']=139.722035833
json[geometry]['coordinates']['0']['47']['1']=35.7126897222
json[geometry]['coordinates']['0']['48']['0']=139.725831111
json[geometry]['coordinates']['0']['48']['1']=35.7093008333
json[geometry]['coordinates']['0']['49']['0']=139.731138056
json[geometry]['coordinates']['0']['49']['1']=35.7094861111
json[geometry]['coordinates']['0']['50']['0']=139.732558333
json[geometry]['coordinates']['0']['50']['1']=35.7074861111
json[geometry]['coordinates']['0']['51']['0']=139.735581111
json[geometry]['coordinates']['0']['51']['1']=35.7092544444
json[geometry]['coordinates']['0']['52']['0']=139.742990278
json[geometry]['coordinates']['0']['52']['1']=35.7080972222
json[geometry]['coordinates']['0']['53']['0']=139.745194722
json[geometry]['coordinates']['0']['53']['1']=35.7025044444
json[geometry]['coordinates']['0']['54']['0']=139.741547222
json[geometry]['coordinates']['0']['54']['1']=35.6983286111
json[name]=Shinjuku Ward

json[bounding_box]['type']=Polygon
json[bounding_box]['coordinates']['0']['0']['0']=139.6734675
json[bounding_box]['coordinates']['0']['0']['1']=35.6731527778
json[bounding_box]['coordinates']['0']['1']['0']=139.745194722
json[bounding_box]['coordinates']['0']['1']['1']=35.6731527778
json[bounding_box]['coordinates']['0']['2']['0']=139.745194722
json[bounding_box]['coordinates']['0']['2']['1']=35.7291619444
json[bounding_box]['coordinates']['0']['3']['0']=139.6734675
json[bounding_box]['coordinates']['0']['3']['1']=35.7291619444
json[country]=Japan
json[place_type]=city
json[url]=http://api.twitter.com/1/geo/id/7ee61f505fdfdf5c.json
json[id]=7ee61f505fdfdf5c

json[contained_within]['0']['name']=Tokyo
json[contained_within]['0']['bounding_box']['type']=Polygon
json[contained_within]['0']['bounding_box']['coordinates']['0']['0']=Array
json[contained_within]['0']['bounding_box']['coordinates']['0']['1']=Array
json[contained_within]['0']['bounding_box']['coordinates']['0']['2']=Array
json[contained_within]['0']['bounding_box']['coordinates']['0']['3']=Array
json[contained_within]['0']['country']=Japan
json[contained_within]['0']['place_type']=admin
json[contained_within]['0']['url']=http://api.twitter.com/1/geo/id/a56612250c754f23.json
json[contained_within]['0']['id']=a56612250c754f23
json[contained_within]['0']['country_code']=JP
json[contained_within]['0']['full_name']=Tokyo, Japan
json[country_code]=JP

json[polylines]['0']=qi{xEug|sYr^pWrWhf@x\xGrR}IkFbUrPbIpH|RoD`UdWUdLpLaJbQdBlLof@gKmWrm@aTzI^|OaHlBpPvo@r\`j@eYzOoJ_EeD~NqPwIaFhGif@c\sr@g@mWuc@fE|fAsE`PyLkKsHzPwSp@{JnUvHtJcLGyCyLyo@uCxIc]r\kRUa~BjYmFdNhHhO}H@}YwGmF~IgR~Aqm@dTuVe@e`@nK{G_J{QdFim@~a@wL`YvU
json[full_name]=Shinjuku Ward, Tokyo

json[attributes]['190533:id']=city_13_104

geo/place
新しい場所を登録(要認証)

unknown

要認証API制限対象

HTTP POSThttp://api.twitter.com/1/geo/place.json

geo/similar_placesで取得したトークンを使用して、指定した座標に新しい場所を登録します。

パラメーター

パラメーター説明
name必須 新しく登録する場所の名前を指定。
contained_within必須 新しく登録する場所になるべく近い場所のplace_idを指定。 例えば、建物内の部屋の場合は、建物のplace_idを設定。
token必須 geo/similar_placesで取得したトークン。
lat必須 登録する場所の緯度を指定。
値の有効範囲は、-90.0~90.0(北が正)。
long必須 登録する場所の経度を指定。
値の有効範囲は、-90.0~90.0(北が正)。
例)http://api.twitter.com/1/geo/place?contained_within=247f43d441defc03&token=d73e944c27770bf9348e4f1351b16a77&lat=37.7821120598956&long=-122.400612831116&name=Twitter%20HQ
attribute:street_address任意 指定したストリートの住所がある場所を検索。
例)http://api.twitter.com/1/geo/place.json?attribute:street_address=795%20Folsom%20St
callback任意 JSONPのコールバック関数名を指定。

取得サンプル(XML/JSON)

place.json
▼取得結果
http://api.twitter.com/1/geo/place?contained_within=247f43d441defc03&token=d73e944c27770bf9348e4f1351b16a77&lat=37.7821120598956&long=-122.400612831116&name=Twitter%20HQ

json[geometry]['type']=Point
json[geometry]['coordinates']['0']=-122.400612831
json[geometry]['coordinates']['1']=37.7821120599
json[name]=Twitter HQ

json[bounding_box]['type']=Polygon
json[bounding_box]['coordinates']['0']['0']['0']=-122.400612831
json[bounding_box]['coordinates']['0']['0']['1']=37.7821120599
json[bounding_box]['coordinates']['0']['1']['0']=-122.400612831
json[bounding_box]['coordinates']['0']['1']['1']=37.7821120599
json[bounding_box]['coordinates']['0']['2']['0']=-122.400612831
json[bounding_box]['coordinates']['0']['2']['1']=37.7821120599
json[bounding_box]['coordinates']['0']['3']['0']=-122.400612831
json[bounding_box]['coordinates']['0']['3']['1']=37.7821120599
json[country]=United States
json[place_type]=poi
json[url]=http://api.twitter.com/1/geo/id/48b28f18b966cde7.json
json[id]=48b28f18b966cde7

json[contained_within]['0']['name']=Twitter HQ
json[contained_within]['0']['bounding_box']['type']=Polygon
json[contained_within]['0']['bounding_box']['coordinates']['0']['0']=Array
json[contained_within]['0']['bounding_box']['coordinates']['0']['1']=Array
json[contained_within]['0']['bounding_box']['coordinates']['0']['2']=Array
json[contained_within]['0']['bounding_box']['coordinates']['0']['3']=Array
json[contained_within]['0']['country']=United States
json[contained_within]['0']['place_type']=poi
json[contained_within]['0']['url']=http://api.twitter.com/1/geo/id/247f43d441defc03.json
json[contained_within]['0']['id']=247f43d441defc03
json[contained_within]['0']['country_code']=US
json[contained_within]['0']['full_name']=Twitter HQ, San Francisco
json[contained_within]['0']['attributes']['street_address']=795 Folsom St
json[country_code]=US

json[full_name]=Twitter HQ, Twitter HQ

関連コンテンツ

Q. このサイトの情報はお役に立ちましたでしょうか?

投票する 投票結果を見る

管理人に【web拍手】を送るweb拍手(1行メッセージも送れます♪)

pagetop

polarized women