API v1.0 — Public Beta

相続税3秒診断 API

路線価・土地面積・相続人数から相続税の概算を即座に算出するAPI。無料で利用可能。出典リンクの表記をお願いします。

# Quick Start

curl
curl "https://souzoku-ai.xyz/api/v1/estimate?rosenka_value=300&land_area=200&heirs_count=2"
Response
{
  "status": "ok",
  "data": {
    "estimated_tax": 3150000,
    "taxable_amount": 52000000,
    "basic_deduction": 42000000,
    "taxable_income": 10000000,
    "effective_rate": 0.15,
    "breakdown": {
      "land_value": 60000000,
      "land_reduction": 48000000,
      "building_value": 5000000,
      "other_assets": 25000000,
      "total_assets": 42000000
    },
    "heirs_count": 2,
    "currency": "JPY"
  },
  "meta": {
    "api_version": "1.0",
    "source": "https://souzoku-ai.xyz"
  }
}

# Authentication

認証不要。APIキーなしで利用できます。すべてのエンドポイントはパブリックアクセス可能です。

# Endpoints

GETPOST/api/v1/estimate

相続税の概算見積もりを取得します。GETはクエリパラメータ、POSTはJSONボディで送信。

GET/api/v1/tax-brackets

相続税の税率表と速算控除額の一覧を取得します。

# Parameters

NameTypeRequiredDescriptionExample
rosenka_valuenumberrequired路線価(千円/平米)300
land_areanumberrequired土地面積(平米)200
heirs_countnumberrequired法定相続人の数2
building_agenumberoptional建物の築年数20
building_areanumberoptional建物の延床面積(平米)120
other_assetsnumberoptionalその他資産(万円)— 預貯金・有価証券等2500

# Response Format

200 OK — application/json
{
  "status": "ok",
  "data": {
    "estimated_tax": 3150000,
    "taxable_amount": 52000000,
    "basic_deduction": 42000000,
    "taxable_income": 10000000,
    "effective_rate": 0.15,
    "breakdown": {
      "land_value": 60000000,
      "land_reduction": 48000000,
      "building_value": 5000000,
      "other_assets": 25000000,
      "total_assets": 42000000
    },
    "heirs_count": 2,
    "currency": "JPY"
  },
  "meta": {
    "api_version": "1.0",
    "source": "https://souzoku-ai.xyz"
  }
}
400 Bad Request
{
  "status": "error",
  "error": {
    "code": "INVALID_PARAMS",
    "message": "rosenka_value is required. heirs_count must be at least 1"
  }
}

# Rate Limits

100
requests / minute

IPアドレスごとに1分間100リクエストまで。制限を超えた場合は429 Too Many Requestsが返されます。

# Attribution

APIを利用する際は、出典リンクの表記をお願いします。以下のHTMLスニペットをご利用ください。

HTML
<a href="https://souzoku-ai.xyz" target="_blank" rel="noopener">
  相続税データ提供: souzoku-ai.xyz
</a>

# Code Examples

JavaScript (fetch)
const params = new URLSearchParams({
  rosenka_value: '300',
  land_area: '200',
  heirs_count: '2',
});

const res = await fetch(`https://souzoku-ai.xyz/api/v1/estimate?${params}`);
const data = await res.json();

console.log(data.data.estimated_tax);
// => 3150000
Python (requests)
import requests

resp = requests.get("https://souzoku-ai.xyz/api/v1/estimate", params={
    "rosenka_value": 300,
    "land_area": 200,
    "heirs_count": 2,
})
data = resp.json()

print(data["data"]["estimated_tax"])
# => 3150000
PHP
<?php
$query = http_build_query([
    'rosenka_value' => 300,
    'land_area'     => 200,
    'heirs_count'   => 2,
]);

$json = file_get_contents("https://souzoku-ai.xyz/api/v1/estimate?{$query}");
$data = json_decode($json, true);

echo $data['data']['estimated_tax'];
// => 3150000