物件 URL を 1 つ渡すだけ。旅館業許可適性・収益シミュレーション・投資スコアを JSON で返す。月 50 件まで無料。
SUUMO・アットホーム・Home's など主要サイトに対応。全国どの物件も 1 リクエストで分析。
Claude Code / Claude Desktop に MCP サーバーを追加するだけ。会話の中で物件分析を自動実行。
月 50 件まで無料。超過分(¥80/件)の従量課金は現在準備中で、無料枠を超えたリクエストは一時的にブロックされます。大口利用は Enterprise でご相談ください。
eak_ で始まる文字列がキーです。X-API-Key: <your key> を付与してください。curl -X POST https://api.es-sense.jp/api/v1/public/v1/analyze \ -H "X-API-Key: eak_your_key_here" \ -H "Content-Type: application/json" \ -d '{"url":"https://suumo.jp/chukoikkodate/..."}'
import httpx result = httpx.post( "https://api.es-sense.jp/api/v1/public/v1/analyze", headers={"X-API-Key": "eak_your_key_here"}, json={"url": "https://suumo.jp/..."}, timeout=120, ).json() # 法的スコア・収益・投資スコアを取り出す ar = result["analysis_result"] print(ar["legal_score"], ar["total_investment_score"])
MCP サーバーを追加すると、Claude との会話の中で自然言語で物件を分析できます。
pip install mcp httpx # mcp_server/main.py を下記の内容で作成
"""
Es-sense Insight MCP Server — Developer API (Workstream B)
Claude Desktop / Claude Code の MCP クライアントから直接
物件分析を呼び出せるようにする Streamable HTTP サーバー。
起動:
export ES_SENSE_API_KEY=eak_...
python -m mcp_server.main
設定 (~/.claude.json の mcpServers に追加):
{
"insight": {
"type": "http",
"url": "http://localhost:8001/mcp",
"headers": { "X-API-Key": "<your eak_ key>" }
}
}
"""
import os
import httpx
from mcp.server.fastmcp import FastMCP
BASE_URL = os.getenv("ES_SENSE_BASE_URL", "http://localhost:8000/api/v1/public/v1")
API_KEY = os.getenv("ES_SENSE_API_KEY", "")
mcp = FastMCP(
name="es-sense-insight",
version="1.0.0",
description="全国対応 民泊物件 AI 分析 — 旅館業許可判定・収益シミュレーション",
)
def _headers() -> dict:
return {"X-API-Key": API_KEY, "Content-Type": "application/json"}
@mcp.tool()
async def analyze_property(url: str) -> dict:
"""
物件 URL を受け取り、旅館業許可適性・収益・投資スコアなどを返す。
引数:
url: 分析対象の物件 URL (SUUMO / アットホーム / Home's 等)
戻り値:
property_data: 物件の基本情報 (所在地・価格・面積など)
analysis_result: 分析結果 (legal_score, surface_yield, total_investment_score など)
cached: キャッシュから返した場合 true
api_usage_this_month: 当月の利用件数
"""
async with httpx.AsyncClient(timeout=120) as client:
resp = await client.post(
f"{BASE_URL}/analyze",
headers=_headers(),
json={"url": url},
)
if resp.status_code == 200:
return resp.json()
return {"error": resp.status_code, "detail": resp.text[:500]}
@mcp.tool()
async def get_usage() -> dict:
"""
当月の Developer API 利用状況を返す。
戻り値:
current_month_count: 当月の分析件数
free_tier_limit: 無料枠 (50)
free_tier_remaining: 無料枠の残り件数
billable_count: 課金対象件数
estimated_charge_jpy: 当月の見積もり請求額 (円)
"""
async with httpx.AsyncClient(timeout=30) as client:
resp = await client.get(f"{BASE_URL}/usage", headers=_headers())
if resp.status_code == 200:
return resp.json()
return {"error": resp.status_code, "detail": resp.text[:500]}
if __name__ == "__main__":
port = int(os.getenv("MCP_PORT", "8001"))
mcp.run(transport="streamable-http", host="0.0.0.0", port=port, path="/mcp")
export ES_SENSE_API_KEY=eak_your_key_here export ES_SENSE_BASE_URL=https://api.es-sense.jp/api/v1/public/v1 python -m mcp_server.main # デフォルトで localhost:8001/mcp で起動
{
"mcpServers": {
"insight": {
"type": "http",
"url": "http://localhost:8001/mcp",
"headers": { "X-API-Key": "eak_your_key_here" }
}
}
}
「この物件 URL を分析して」と送るだけで analyze_property ツールが自動実行されます。
| メソッド | パス | 説明 | 認証 |
|---|---|---|---|
| POST | /api/v1/public/v1/analyze |
物件 URL を分析 | X-API-Key |
| GET | /api/v1/public/v1/usage |
当月の利用状況 | X-API-Key |
| POST | /api/v1/public/v1/keys |
API キー発行 | Bearer JWT |
| GET | /api/v1/public/v1/keys |
API キー一覧 | Bearer JWT |
| DELETE | /api/v1/public/v1/keys/{id} |
API キー失効 | Bearer JWT |
{
"status": "success",
"cached": false,
"property_data": {
"address": "沖縄県那覇市○○",
"price": "2,480万円",
"building_area": "85.2㎡"
},
"analysis_result": {
"legal_score": 8,
"surface_yield": "9.2%",
"total_investment_score": 74,
"investment_grade": "B",
"investment_judgment": { ... }
},
"api_usage_this_month": 12,
"billable": false
}
個人アカウントで月50件まで無料(カード登録不要)。大口利用はEnterpriseで個別契約。