土地総合情報システム

  • Posted on: 15 May 2016
  • By: Anonymous
apiTag: 
api provider: 
api: 
不動産取引価格情報取得API, 都道府県内市区町村一覧取得API
example: 

2016年1月〜2月、沖縄県の不動産取引価格情報

$ curl -s "http://www.land.mlit.go.jp/webland/api/TradeListSearch?from=20161&to=20162&area=47" | jq . | head -100
{
  "status": "OK",
  "data": [
    {
      "Type": "宅地(土地)",
      "Region": "住宅地",
      "MunicipalityCode": "47201",
      "Prefecture": "沖縄県",
      "Municipality": "那覇市",
      "DistrictName": "赤嶺",
      "TradePrice": "68000000",
      "PricePerUnit": "550000",
      "Area": "410",
      "UnitPrice": "170000",
      "LandShape": "ほぼ正方形",
      "Frontage": "20.4",
      "Purpose": "その他",
      "Direction": "南東",
      "Classification": "市道",
      "Breadth": "6.0",
      "CityPlanning": "第1種中高層住居専用地域",
      "CoverageRatio": "60",
      "FloorAreaRatio": "200",
      "Period": "平成28年第2四半期"
    },
    {
      "Type": "宅地(土地と建物)",
      "Region": "商業地",
      "MunicipalityCode": "47201",
      "Prefecture": "沖縄県",
      "Municipality": "那覇市",
      "DistrictName": "赤嶺",
      "TradePrice": "100000000",
      "Area": "270",
      "LandShape": "ほぼ長方形",
      "Frontage": "13.0",
      "TotalFloorArea": "540",
      "BuildingYear": "平成5年",
      "Structure": "RC",
      "Use": "事務所、店舗",
      "Purpose": "店舗",
      "Direction": "南",
      "Classification": "県道",
      "Breadth": "30.0",
      "CityPlanning": "近隣商業地域",
      "CoverageRatio": "80",
      "FloorAreaRatio": "200",
      "Period": "平成28年第2四半期"
    },
    {
      "Type": "中古マンション等",
      "MunicipalityCode": "47201",
      "Prefecture": "沖縄県",
      "Municipality": "那覇市",
      "DistrictName": "曙",
      "TradePrice": "23000000",
      "FloorPlan": "2LDK",
      "Area": "80",
      "BuildingYear": "平成18年",
      "Structure": "RC",
      "Use": "住宅",
      "Purpose": "住宅",
      "CityPlanning": "商業地域",
      "CoverageRatio": "80",
      "FloorAreaRatio": "400",
      "Period": "平成28年第1四半期",
      "Remarks": "未改装を購入"
    },
    {
      "Type": "宅地(土地と建物)",
      "Region": "住宅地",
      "MunicipalityCode": "47201",
      "Prefecture": "沖縄県",
      "Municipality": "那覇市",
      "DistrictName": "曙",
      "TradePrice": "41000000",
      "Area": "185",
      "LandShape": "長方形",
      "Frontage": "11.5",
      "TotalFloorArea": "290",
      "BuildingYear": "昭和49年",
      "Structure": "RC",
      "Use": "共同住宅、事務所",
      "Purpose": "住宅",
      "Direction": "西",
      "Classification": "市道",
      "Breadth": "6.0",
      "CityPlanning": "第1種住居地域",
      "CoverageRatio": "60",
      "FloorAreaRatio": "200",
      "Period": "平成28年第2四半期"
    },
    {
      "Type": "宅地(土地と建物)",
      "Region": "商業地",
      "MunicipalityCode": "47201",
      "Prefecture": "沖縄県",
      "Municipality": "那覇市",
      "DistrictName": "曙",
      "TradePrice": "89000000",

市区町村一覧の取得とJSONファイル結合

$ for i in {01..47}; do curl -sS "http://www.land.mlit.go.jp/webland/api/CitySearch?area=$i" | tee $i.json; sleep `expr $RANDOM % 10`; done
$ jq '.data[]' {01..47}.json | jq -s > citycode.json
$ jq '. | length' citycode.json
1922
$ jq . citycode.json | (head;tail)
[
  {
    "id": "01100",
    "name": "札幌市"
  },
  {
    "id": "01101",
    "name": "中央区"
  },
  {
  },
  {
    "id": "47381",
    "name": "竹富町"
  },
  {
    "id": "47382",
    "name": "与那国町"
  }
]