API v1.0 — Public Beta
測量費用診断 API
土地の測量費用を面積・形状・目的から即座に見積もるAPI。無料で利用可能。出典リンクの表記をお願いします。
# Quick Start
curl
curl "https://sokuryo.xyz/api/v1/estimate?prefecture=tokyo&area=200&purpose=baikyaku"Response
{
"status": "ok",
"data": {
"estimated_cost_min": 350000,
"estimated_cost_max": 550000,
"estimated_cost_avg": 450000,
"breakdown": {
"survey_base": 280000,
"boundary_survey": 100000,
"documentation": 50000,
"misc": 20000
},
"prefecture": "tokyo",
"area": 200,
"purpose": "baikyaku",
"currency": "JPY"
},
"meta": {
"api_version": "1.0",
"source": "https://sokuryo.xyz"
}
}# Authentication
認証不要。APIキーなしで利用できます。すべてのエンドポイントはパブリックアクセス可能です。
# Endpoints
GETPOST
/api/v1/estimate測量費用の見積もりを取得します。GETはクエリパラメータ、POSTはJSONボディで送信。
GET
/api/v1/prefectures対応都道府県の一覧と地域別単価データを取得します。
# Parameters
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
prefecture | string | required | 都道府県コード(例: tokyo, osaka) | tokyo |
city | string | optional | 市区町村名 | 新宿区 |
area | number | required | 土地面積(平米) | 200 |
shape | string | optional | 土地の形状(regular / irregular / flag) | regular |
adjacent_count | number | optional | 隣接地の数 | 4 |
adjacent_types | string | optional | 隣接地の種類(private / public / mixed) | mixed |
boundary_marker | boolean | optional | 境界標の有無 | true |
purpose | string | optional | 測量目的(baikyaku / bunkatsu / tatemono / kenchiku) | baikyaku |
# Response Format
200 OK — application/json
{
"status": "ok",
"data": {
"estimated_cost_min": 350000,
"estimated_cost_max": 550000,
"estimated_cost_avg": 450000,
"breakdown": {
"survey_base": 280000,
"boundary_survey": 100000,
"documentation": 50000,
"misc": 20000
},
"prefecture": "tokyo",
"area": 200,
"purpose": "baikyaku",
"currency": "JPY"
},
"meta": {
"api_version": "1.0",
"source": "https://sokuryo.xyz"
}
}400 Bad Request
{
"status": "error",
"error": {
"code": "INVALID_PARAMS",
"message": "prefecture is required. area must be a positive number"
}
}# Rate Limits
100
requests / minute
IPアドレスごとに1分間100リクエストまで。制限を超えた場合は429 Too Many Requestsが返されます。
# Attribution
APIを利用する際は、出典リンクの表記をお願いします。以下のHTMLスニペットをご利用ください。
HTML
<a href="https://sokuryo.xyz" target="_blank" rel="noopener">
測量費用データ提供: sokuryo.xyz
</a># Code Examples
JavaScript (fetch)
const params = new URLSearchParams({
prefecture: 'tokyo',
area: '200',
purpose: 'baikyaku',
});
const res = await fetch(`https://sokuryo.xyz/api/v1/estimate?${params}`);
const data = await res.json();
console.log(data.data.estimated_cost_avg);
// => 450000Python (requests)
import requests
resp = requests.get("https://sokuryo.xyz/api/v1/estimate", params={
"prefecture": "tokyo",
"area": 200,
"purpose": "baikyaku",
})
data = resp.json()
print(data["data"]["estimated_cost_avg"])
# => 450000PHP
<?php
$query = http_build_query([
'prefecture' => 'tokyo',
'area' => 200,
'purpose' => 'baikyaku',
]);
$json = file_get_contents("https://sokuryo.xyz/api/v1/estimate?{$query}");
$data = json_decode($json, true);
echo $data['data']['estimated_cost_avg'];
// => 450000