{"openapi":"3.1.0","info":{"title":"Queria Profile API","version":"0.1.0","description":"地域コードか法人番号を渡すと、その地域・法人のよく使う指標を返します。座標を渡すと、その地点の用途地域・浸水想定区域・土砂災害警戒区域・液状化の傾向を返します。値ごとに時点 (as_of) と元のテーブル (source) を付けます。結果を公開するときは source.attribution を一緒に表示してください。地点の属性の区域の範囲は概ねの位置で、不動産の重要事項説明や建築確認申請の根拠には使えません。"},"servers":[{"url":"https://profile.queria.io"}],"paths":{"/v1/areas/{code}":{"get":{"summary":"地域の指標","parameters":[{"name":"code","in":"path","required":true,"description":"市区町村コード (5 桁)・全国地方公共団体コード (6 桁)・小地域コード (9 桁・11 桁)","schema":{"type":"string"}}],"responses":{"200":{"description":"地域と指標","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Area"}}}},"400":{"description":"入力が不正 (code: invalid_request)。どの項目が悪いかは message に書く","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"地域が無い (code: not_found)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限を超えた (code: rate_limited)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"サーバーの問題 (code: internal)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/areas/batch":{"post":{"summary":"地域の指標 (100 件まで)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"codes":{"type":"array","items":{"type":"string"},"maxItems":100}},"required":["codes"]}}}},"responses":{"200":{"description":"入力の順の配列。見つからないキーは error を持つ要素になる","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object"}}},"required":["results"]}}}},"400":{"description":"入力が不正 (code: invalid_request)。どの項目が悪いかは message に書く","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限を超えた (code: rate_limited)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"サーバーの問題 (code: internal)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/companies/{corporate_number}":{"get":{"summary":"法人の指標","parameters":[{"name":"corporate_number","in":"path","required":true,"description":"法人番号 (13 桁)","schema":{"type":"string"}}],"responses":{"200":{"description":"法人と指標","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Company"}}}},"400":{"description":"入力が不正 (code: invalid_request)。どの項目が悪いかは message に書く","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"法人が無い (code: not_found)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限を超えた (code: rate_limited)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"サーバーの問題 (code: internal)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/companies/batch":{"post":{"summary":"法人の指標 (100 件まで)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"codes":{"type":"array","items":{"type":"string"},"maxItems":100}},"required":["codes"]}}}},"responses":{"200":{"description":"入力の順の配列。見つからないキーは error を持つ要素になる","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object"}}},"required":["results"]}}}},"400":{"description":"入力が不正 (code: invalid_request)。どの項目が悪いかは message に書く","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限を超えた (code: rate_limited)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"サーバーの問題 (code: internal)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/points":{"get":{"summary":"地点の属性","description":"区域の範囲は概ねの位置で、不動産の重要事項説明や建築確認申請の根拠には使えません。","parameters":[{"name":"lat","in":"query","required":true,"description":"緯度","schema":{"type":"number","minimum":-90,"maximum":90}},{"name":"lng","in":"query","required":true,"description":"経度","schema":{"type":"number","minimum":-180,"maximum":180}}],"responses":{"200":{"description":"地点の属性","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Point"}}}},"400":{"description":"入力が不正 (code: invalid_request)。どの項目が悪いかは message に書く","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限を超えた (code: rate_limited)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"サーバーの問題 (code: internal)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/points/batch":{"post":{"summary":"地点の属性 (20 件まで)","description":"区域の範囲は概ねの位置で、不動産の重要事項説明や建築確認申請の根拠には使えません。","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"points":{"type":"array","items":{"type":"object","properties":{"lat":{"type":"number"},"lng":{"type":"number"}},"required":["lat","lng"]},"maxItems":20}},"required":["points"]}}}},"responses":{"200":{"description":"入力の順の配列。見つからないキーは error を持つ要素になる","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object"}}},"required":["results"]}}}},"400":{"description":"入力が不正 (code: invalid_request)。どの項目が悪いかは message に書く","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"回数の上限を超えた (code: rate_limited)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"サーバーの問題 (code: internal)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_request","not_found","method_not_allowed","rate_limited","internal"]},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]},"Source":{"type":"object","properties":{"dataset":{"type":"string","description":"読んだデータセット (所有者/名前)"},"version":{"type":"string","description":"読んだデータセットのバージョン"},"attribution":{"type":"array","items":{"type":"string"},"description":"出典の表示。結果を公開するときは一緒に表示する"}},"required":["dataset","version","attribution"]},"Value":{"type":"object","properties":{"value":{},"as_of":{"type":["string","null"],"description":"時点"},"source":{"type":"string","description":"元のテーブル (<dataset>.<schema>.<table>)"}},"required":["value","as_of","source"]},"Area":{"type":"object","properties":{"area":{"type":"object","properties":{"code":{"type":"string"},"level":{"type":"string","enum":["city","ward","town_village","small_area"]},"name":{"type":"string"},"lg_code":{"type":["string","null"]},"prefecture_code":{"type":"string"},"parent_code":{"type":["string","null"]}},"required":["code","level","name","lg_code","prefecture_code","parent_code"]},"indicators":{"oneOf":[{"type":"object","properties":{"area_km2":{"$ref":"#/components/schemas/Value"},"population":{"$ref":"#/components/schemas/Value"},"households":{"$ref":"#/components/schemas/Value"},"population_density":{"$ref":"#/components/schemas/Value"},"population_change_rate_5y":{"$ref":"#/components/schemas/Value"},"population_2020":{"$ref":"#/components/schemas/Value"},"population_under_15":{"$ref":"#/components/schemas/Value"},"population_15_64":{"$ref":"#/components/schemas/Value"},"population_65_over":{"$ref":"#/components/schemas/Value"},"population_75_over":{"$ref":"#/components/schemas/Value"},"aged_65_over_rate":{"$ref":"#/components/schemas/Value"},"daytime_population":{"$ref":"#/components/schemas/Value"},"daytime_population_ratio":{"$ref":"#/components/schemas/Value"},"projected_population_2050":{"$ref":"#/components/schemas/Value"},"projected_change_rate_2050":{"$ref":"#/components/schemas/Value"},"net_migration":{"$ref":"#/components/schemas/Value"},"births":{"$ref":"#/components/schemas/Value"},"deaths":{"$ref":"#/components/schemas/Value"},"fiscal_capacity_index":{"$ref":"#/components/schemas/Value"},"establishments":{"$ref":"#/components/schemas/Value"},"employees":{"$ref":"#/components/schemas/Value"},"hospitals":{"$ref":"#/components/schemas/Value"},"hospital_beds":{"$ref":"#/components/schemas/Value"},"general_clinics":{"$ref":"#/components/schemas/Value"},"dental_clinics":{"$ref":"#/components/schemas/Value"},"facility_count":{"$ref":"#/components/schemas/Value"},"food_count":{"$ref":"#/components/schemas/Value"},"grocery_count":{"$ref":"#/components/schemas/Value"},"shopping_count":{"$ref":"#/components/schemas/Value"},"medical_count":{"$ref":"#/components/schemas/Value"},"education_count":{"$ref":"#/components/schemas/Value"}},"required":["area_km2","population","households","population_density","population_change_rate_5y","population_2020","population_under_15","population_15_64","population_65_over","population_75_over","aged_65_over_rate","daytime_population","daytime_population_ratio","projected_population_2050","projected_change_rate_2050","net_migration","births","deaths","fiscal_capacity_index","establishments","employees","hospitals","hospital_beds","general_clinics","dental_clinics","facility_count","food_count","grocery_count","shopping_count","medical_count","education_count"]},{"type":"object","properties":{"area_km2":{"$ref":"#/components/schemas/Value"},"population":{"$ref":"#/components/schemas/Value"},"households":{"$ref":"#/components/schemas/Value"},"population_density":{"$ref":"#/components/schemas/Value"},"population_under_15":{"$ref":"#/components/schemas/Value"},"population_15_64":{"$ref":"#/components/schemas/Value"},"population_65_over":{"$ref":"#/components/schemas/Value"},"population_75_over":{"$ref":"#/components/schemas/Value"},"aged_65_over_rate":{"$ref":"#/components/schemas/Value"},"facility_count":{"$ref":"#/components/schemas/Value"},"food_count":{"$ref":"#/components/schemas/Value"},"grocery_count":{"$ref":"#/components/schemas/Value"},"shopping_count":{"$ref":"#/components/schemas/Value"},"medical_count":{"$ref":"#/components/schemas/Value"},"education_count":{"$ref":"#/components/schemas/Value"},"nearest_station_name":{"$ref":"#/components/schemas/Value"},"nearest_station_distance_m":{"$ref":"#/components/schemas/Value"},"nearest_station_passenger_count":{"$ref":"#/components/schemas/Value"},"residential_price_median":{"$ref":"#/components/schemas/Value"},"commercial_price_median":{"$ref":"#/components/schemas/Value"}},"required":["area_km2","population","households","population_density","population_under_15","population_15_64","population_65_over","population_75_over","aged_65_over_rate","facility_count","food_count","grocery_count","shopping_count","medical_count","education_count","nearest_station_name","nearest_station_distance_m","nearest_station_passenger_count","residential_price_median","commercial_price_median"]}],"description":"市区町村と小地域で指標が違う"},"source":{"$ref":"#/components/schemas/Source"}},"required":["area","indicators","source"]},"Company":{"type":"object","properties":{"company":{"type":"object","properties":{"corporate_number":{"type":"string"},"name":{"type":"string"},"kind":{"type":["string","null"]},"prefecture_code":{"type":["string","null"]},"city_code":{"type":["string","null"]},"lg_code":{"type":["string","null"]},"city_name":{"type":["string","null"]},"assignment_date":{"type":["string","null"]}},"required":["corporate_number","name","kind","prefecture_code","city_code","lg_code","city_name","assignment_date"]},"indicators":{"type":"object","properties":{"capital_stock":{"$ref":"#/components/schemas/Value"},"employee_number":{"$ref":"#/components/schemas/Value"},"establishment_date":{"$ref":"#/components/schemas/Value"},"industry":{"$ref":"#/components/schemas/Value"},"is_listed":{"$ref":"#/components/schemas/Value"},"market_segment":{"$ref":"#/components/schemas/Value"},"securities_code":{"$ref":"#/components/schemas/Value"},"latest_net_sales":{"$ref":"#/components/schemas/Value"},"average_annual_salary":{"$ref":"#/components/schemas/Value"},"average_age":{"$ref":"#/components/schemas/Value"},"female_manager_ratio":{"$ref":"#/components/schemas/Value"},"subsidy_count":{"$ref":"#/components/schemas/Value"},"subsidy_total_amount":{"$ref":"#/components/schemas/Value"},"procurement_count":{"$ref":"#/components/schemas/Value"},"procurement_total_amount":{"$ref":"#/components/schemas/Value"}},"required":["capital_stock","employee_number","establishment_date","industry","is_listed","market_segment","securities_code","latest_net_sales","average_annual_salary","average_age","female_manager_ratio","subsidy_count","subsidy_total_amount","procurement_count","procurement_total_amount"]},"source":{"$ref":"#/components/schemas/Source"}},"required":["company","indicators","source"]},"Point":{"type":"object","properties":{"point":{"type":"object","properties":{"lat":{"type":"number"},"lng":{"type":"number"}},"required":["lat","lng"]},"use_district":{"type":"object","properties":{"value":{"oneOf":[{"type":"null"},{"type":"object","properties":{"use_district":{"type":"string"},"use_district_code":{"type":"integer"},"floor_area_ratio":{"type":["number","null"]},"building_coverage_ratio":{"type":["number","null"]}},"required":["use_district","use_district_code","floor_area_ratio","building_coverage_ratio"]}]},"covered":{"type":["boolean","null"],"description":"true はデータの範囲内、false は範囲外 (収録していない地域)、null は判定できない"},"as_of":{"type":["string","null"],"description":"時点 (年度)。点を含む区域があればその区域のデータの年度、区域の外なら収録している地域のデータの年度。収録していない・判定できないとき (covered が false か null) と、元のテーブルに時点が無いとき (液状化) は null"},"source":{"type":"string","description":"元のテーブル (<dataset>.<schema>.<table>)"}},"required":["value","covered","as_of","source"]},"inundation":{"type":"object","properties":{"flood":{"type":"object","properties":{"value":{"oneOf":[{"type":"null"},{"type":"object","properties":{"depth_label":{"type":["string","null"]},"depth_min_m":{"type":["number","null"]},"depth_max_m":{"type":["number","null"]}},"required":["depth_label","depth_min_m","depth_max_m"]}]},"covered":{"type":["boolean","null"],"description":"true はデータの範囲内、false は範囲外 (収録していない地域)、null は判定できない"},"as_of":{"type":["string","null"],"description":"時点 (年度)。点を含む区域があればその区域のデータの年度、区域の外なら収録している地域のデータの年度。収録していない・判定できないとき (covered が false か null) と、元のテーブルに時点が無いとき (液状化) は null"},"source":{"type":"string","description":"元のテーブル (<dataset>.<schema>.<table>)"}},"required":["value","covered","as_of","source"]},"pluvial_flood":{"type":"object","properties":{"value":{"oneOf":[{"type":"null"},{"type":"object","properties":{"depth_label":{"type":["string","null"]},"depth_min_m":{"type":["number","null"]},"depth_max_m":{"type":["number","null"]}},"required":["depth_label","depth_min_m","depth_max_m"]}]},"covered":{"type":["boolean","null"],"description":"true はデータの範囲内、false は範囲外 (収録していない地域)、null は判定できない"},"as_of":{"type":["string","null"],"description":"時点 (年度)。点を含む区域があればその区域のデータの年度、区域の外なら収録している地域のデータの年度。収録していない・判定できないとき (covered が false か null) と、元のテーブルに時点が無いとき (液状化) は null"},"source":{"type":"string","description":"元のテーブル (<dataset>.<schema>.<table>)"}},"required":["value","covered","as_of","source"]},"storm_surge":{"type":"object","properties":{"value":{"oneOf":[{"type":"null"},{"type":"object","properties":{"depth_label":{"type":["string","null"]},"depth_min_m":{"type":["number","null"]},"depth_max_m":{"type":["number","null"]}},"required":["depth_label","depth_min_m","depth_max_m"]}]},"covered":{"type":["boolean","null"],"description":"true はデータの範囲内、false は範囲外 (収録していない地域)、null は判定できない"},"as_of":{"type":["string","null"],"description":"時点 (年度)。点を含む区域があればその区域のデータの年度、区域の外なら収録している地域のデータの年度。収録していない・判定できないとき (covered が false か null) と、元のテーブルに時点が無いとき (液状化) は null"},"source":{"type":"string","description":"元のテーブル (<dataset>.<schema>.<table>)"}},"required":["value","covered","as_of","source"]},"tsunami":{"type":"object","properties":{"value":{"oneOf":[{"type":"null"},{"type":"object","properties":{"depth_label":{"type":["string","null"]},"depth_min_m":{"type":["number","null"]},"depth_max_m":{"type":["number","null"]}},"required":["depth_label","depth_min_m","depth_max_m"]}]},"covered":{"type":["boolean","null"],"description":"true はデータの範囲内、false は範囲外 (収録していない地域)、null は判定できない"},"as_of":{"type":["string","null"],"description":"時点 (年度)。点を含む区域があればその区域のデータの年度、区域の外なら収録している地域のデータの年度。収録していない・判定できないとき (covered が false か null) と、元のテーブルに時点が無いとき (液状化) は null"},"source":{"type":"string","description":"元のテーブル (<dataset>.<schema>.<table>)"}},"required":["value","covered","as_of","source"]}},"required":["flood","pluvial_flood","storm_surge","tsunami"]},"landslide":{"type":"object","properties":{"value":{"type":"array","items":{"type":"object"}},"covered":{"type":["boolean","null"],"description":"true はデータの範囲内、false は範囲外 (収録していない地域)、null は判定できない"},"as_of":{"type":["string","null"],"description":"時点 (年度)。点を含む区域があればその区域のデータの年度、区域の外なら収録している地域のデータの年度。収録していない・判定できないとき (covered が false か null) と、元のテーブルに時点が無いとき (液状化) は null"},"source":{"type":"string","description":"元のテーブル (<dataset>.<schema>.<table>)"}},"required":["value","covered","as_of","source"]},"liquefaction":{"type":"object","properties":{"value":{"oneOf":[{"type":"null"},{"type":"object"}]},"covered":{"type":["boolean","null"],"description":"true はデータの範囲内、false は範囲外 (収録していない地域)、null は判定できない"},"as_of":{"type":["string","null"],"description":"時点 (年度)。点を含む区域があればその区域のデータの年度、区域の外なら収録している地域のデータの年度。収録していない・判定できないとき (covered が false か null) と、元のテーブルに時点が無いとき (液状化) は null"},"source":{"type":"string","description":"元のテーブル (<dataset>.<schema>.<table>)"}},"required":["value","covered","as_of","source"]},"source":{"$ref":"#/components/schemas/Source"}},"required":["point","use_district","inundation","landslide","liquefaction","source"]}}}}