ローカル検索API

指定場所の情報を、テキストで取得できます。

Google Local Search APIは2010/11/1から非推奨となり、以降は1日あたりのリクエスト数が制限されます。Google Local Search API (Deprecated) | Google Developers

ローカル検索コントロール (Local Search Control)

参考

  • Google AJAX Search API - Local Search Control for Google Maps

JavaScriptを使用しない方法

取得例

http://ajax.googleapis.com/ajax/services/search/local?v=1.0&q=tokyo
{

  "responseData": {
    "results": [
      {
        "GsearchResultClass": "GlocalSearch",
        "listingType": "local",
        "addressLookupResult": "/maps",
        "lat": "35.689488",
        "lng": "139.691706",
        "accuracy": "2",
        "title": "日本",
        "titleNoFormatting": "日本",
        "ddUrl": "http://www.google.com/maps?source=uds&daddr=%E6%97%A5%E6%9C%AC,+,+%E6%9D%B1%E4%BA%AC%E9%83%BD+(%E6%97%A5%E6%9C%AC)+@35.689488,139.691706&saddr",
        "ddUrlToHere": "http://www.google.com/maps?source=uds&daddr=%E6%97%A5%E6%9C%AC,+,+%E6%9D%B1%E4%BA%AC%E9%83%BD+(%E6%97%A5%E6%9C%AC)+@35.689488,139.691706&iwstate1=dir:to",
        "ddUrlFromHere": "http://www.google.com/maps?source=uds&saddr=%E6%97%A5%E6%9C%AC,+,+%E6%9D%B1%E4%BA%AC%E9%83%BD+(%E6%97%A5%E6%9C%AC)+@35.689488,139.691706&iwstate1=dir:from",
        "streetAddress": "日本",
        "city": "",
        "region": "東京都",
        "country": "JP",
        "staticMapUrl": "https://maps.google.com/maps/api/staticmap?maptype=roadmap&format=gif&sensor=false&size=150x100&zoom=13&markers=35.689488,139.691706",
        "url": "http://www.google.com/maps?source=uds&q=tokyo",
        "postalCode": "",
        "maxAge": 604800,
        "addressLines": [
          "日本",
          "東京都"
        ]
      }
    ],
    "cursor": {
      "moreResultsUrl": "http://www.google.com/local?oe=utf8&ie=utf8&num=4&mrt=yp,loc&sll=37.779160,-122.420090&start=0&hl=ja&q=tokyo"
    },
    "viewport": {
      "center": {
        "lat": "35.689488",
        "lng": "139.691706"
      },
      "span": {
        "lat": "0.321229",
        "lng": "0.436991"
      },
      "sw": {
        "lat": "35.528873",
        "lng": "139.47322"
      },
      "ne": {
        "lat": "35.8501",
        "lng": "139.9102"
      }
    }
  },
  "responseDetails": null,
  "responseStatus": 200

}