5
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

EDINET DB正式リリース。69指標×約3,800社の財務APIを使い倒す

5
Posted at

EDINET DB(edinetdb.jp)が3月1日に正式リリースした。β版から使っている人向けに、正式版で追加された機能と実践的な使い方をまとめる。

正式版で変わったこと

項目 β版 正式版
財務指標数 24 69
営業利益カバレッジ 83% 97%
有報テキスト 2,000字打ち切り 全文
AI所見 Gemini(ばらつきあり) Claude統一(全件400字+)
MCP stdio(ローカル)のみ リモートMCP + OAuth 2.1
料金 無料(β) Free ¥0 / Pro ¥4,980 / Business ¥29,800

料金プラン

プラン 月額 API上限(日/月) 用途
Free ¥0 100回/日、3,000回/月 MCP経由のAI分析、ライトユーザー
Pro ¥4,980 1,000回/日、30,000回/月 個人開発者、投資家
Business ¥29,800 10,000回/日、300,000回/月 法人、全社スキャン
Enterprise 個別見積 カスタム SLA・専用サポート

ローンチキャンペーン: 3月7日までにAPIキーを取得すると、全有料プラン永久半額(Pro ¥2,490、Business ¥14,900)。

API商用利用は全プランで許可。データの丸ごと再配布・再API化のみ禁止。

セットアップ(初めての人向け)

1. APIキー取得

edinetdb.jp/developers でメールアドレスを入力。即時発行。

2. 疎通確認

# ステータスチェック(APIキー不要)
curl https://edinetdb.jp/v1/status
{
  "data": {
    "status": "ok",
    "version": "1.0.0",
    "endpoints": 11,
    "companies": 3848
  }
}

3. 企業検索

curl "https://edinetdb.jp/v1/search?q=ソニー"
{
  "data": [
    {
      "edinet_code": "E01777",
      "sec_code": "67580",
      "name": "ソニーグループ株式会社",
      "industry": "電気機器",
      "accounting_standard": "IFRS",
      "credit_score": 80,
      "credit_rating": "excellent"
    }
  ]
}

正式版の新機能を使う

69指標のフル取得

β版はrevenue, operating_income, net_incomeなど基本指標のみだった。正式版は69指標を返す。

import requests

BASE = "https://edinetdb.jp/v1"
HEADERS = {"X-API-Key": "your_api_key"}

# 任天堂の財務データ(直近5年)
res = requests.get(f"{BASE}/companies/E02367/financials?years=5", headers=HEADERS)
data = res.json()["data"]

for year in data:
    fy = year["fiscal_year"]
    rev = year["revenue"]
    oi = year["operating_income"]
    ni = year["net_income"]
    rd = year.get("rd_expenses")  # 研究開発費(正式版で追加)
    ibd = year.get("interest_bearing_debt_total")  # 有利子負債合計

    print(f"FY{fy}: 売上{rev/1e9:.0f}億 営業利益{oi/1e9:.0f}億 純利益{ni/1e9:.0f}", end="")
    if rd:
        print(f" R&D{rd/1e9:.0f}", end="")
    if ibd is not None:
        print(f" 有利子負債{ibd/1e9:.0f}", end="")
    print()

追加された主な指標:

カテゴリ 指標
B/S 有利子負債(6科目)、棚卸資産(9科目)、現預金、利益剰余金、流動/固定資産・負債
P/L 売上原価、売上総利益、販管費、減価償却費、研究開発費、特別損益
CF 設備投資額
算出 EBITDA、DEレシオ、粗利率、前年比成長率、3年CAGR(4種)、FCF

有報テキストの全文取得

β版は2,000字で切れていたが、正式版は制限なし。事業の状況、リスク情報、MD&A、経営方針の全文が取れる。

# トヨタの有報テキスト
res = requests.get(f"{BASE}/companies/E02144/text-blocks", headers=HEADERS)
blocks = res.json()["data"]

for block in blocks:
    section = block["section_name"]
    text = block["text"]
    print(f"\n{'='*60}")
    print(f"{section}】({len(text)}字)")
    print(f"{'='*60}")
    print(text[:500] + "..." if len(text) > 500 else text)

テキストデータをLLMに投入して分析する用途に使える。RAGの構築、リスク分析、複数企業の事業比較など。

成長指標を使ったスクリーニング

正式版で追加された3年CAGRとFCFを使って、高成長かつキャッシュ創出力のある企業を抽出する。

# 全企業のfinancials取得は重いので、ratiosエンドポイントを使う
# ROEトップ50を取得し、そこから絞り込む
res = requests.get(f"{BASE}/rankings/roe?limit=50", headers=HEADERS)
candidates = res.json()["data"]

# 各企業の詳細を取得してフィルタ
results = []
for c in candidates:
    code = c["edinet_code"]
    detail = requests.get(f"{BASE}/companies/{code}", headers=HEADERS).json()["data"]

    roe = detail.get("roe")
    om = detail.get("operating_margin")
    score = detail.get("credit_score", 0)

    if roe and roe >= 15 and om and om >= 10 and score >= 70:
        results.append({
            "name": detail["name"],
            "roe": roe,
            "operating_margin": om,
            "credit_score": score,
        })

print(f"\n高ROE(15%+) × 高営業利益率(10%+) × 財務健全性70+: {len(results)}")
for r in results:
    print(f"  {r['name']}: ROE {r['roe']:.1f}% / 営業利益率 {r['operating_margin']:.1f}% / スコア {r['credit_score']}")

ランキングの新指標

正式版で追加されたランキング指標:

# 3年売上高CAGR トップ20
res = requests.get(f"{BASE}/rankings/revenue-cagr-3y?limit=20", headers=HEADERS)
for i, c in enumerate(res.json()["data"], 1):
    print(f"{i}. {c['name']} CAGR: {c['value']:.1f}%")

# フリーキャッシュフロー トップ20
res = requests.get(f"{BASE}/rankings/free-cf?limit=20", headers=HEADERS)
for i, c in enumerate(res.json()["data"], 1):
    print(f"{i}. {c['name']} FCF: {c['value']/1e9:.0f}億円")

利用可能な全19ランキング:

カテゴリ 指標
収益性 roe, operating-margin, net-margin, roa
安定性 equity-ratio, health-score
評価 per, eps, dividend-yield, payout-ratio
規模 revenue, free-cf
成長性 revenue-growth, ni-growth, eps-growth
3年CAGR revenue-cagr-3y, oi-cagr-3y, ni-cagr-3y, eps-cagr-3y

AI分析の取得

全企業の財務健全性スコアとAI所見を取得できる。スコアの算出ロジックは全公開している。

# 任天堂のAI分析
res = requests.get(f"{BASE}/companies/E02367/analysis", headers=HEADERS)
analysis = res.json()["data"]

print(f"スコア: {analysis['credit_score']}/100")
print(f"ランク: {analysis['credit_rating']}")
print(f"リスクフラグ: {analysis['risk_flags']}")

# スコアの内訳
details = analysis["scoring_details"]
print(f"\n安定性: 自己資本比率スコア {details['stability']['equity_ratio_score']}")
print(f"収益力: 営業利益率スコア {details['profitability']['margin_score']}")
print(f"CF:     営業CFスコア {details['cash_generation']['ocf_score']}")

# 業種内ベンチマーク
bench = analysis["industry_benchmark"]
print(f"\n業種平均ROE: {bench['avg_roe']:.1f}% vs 任天堂: {bench['company_roe']:.1f}%")

MCP接続(AI経由での利用)

Claude Desktop / Cursor(ローカルMCP)

claude_desktop_config.jsonに追加:

{
  "mcpServers": {
    "edinetdb": {
      "command": "npx",
      "args": ["-y", "@anthropic/mcp-remote", "https://edinetdb.jp/mcp"]
    }
  }
}

Claude.ai / ChatGPT(リモートMCP — 正式版で追加)

Claude.aiの場合:

  1. Settings → Integrations → Add MCP connector
  2. URL: https://edinetdb.jp/mcp
  3. Googleアカウントで認証

ChatGPTの場合:

  1. Settings → Connected Apps → Add MCP
  2. URL: https://edinetdb.jp/mcp
  3. Googleアカウントで認証

接続すると、チャット内で「ソニーの直近5年のROE推移を教えて」と聞くだけで、EDINET DBからリアルタイムの財務データを取得して分析してくれる。

MCPで利用可能なツール:

  • search_companies: 企業検索
  • get_company: 企業詳細
  • get_financials: 財務時系列(最大6年)
  • get_analysis: 財務健全性スコア・AI分析
  • get_ranking: 指標別ランキング(19種)
  • get_text_blocks: 有報テキスト全文
  • search_companies_batch: 複数企業一括検索

既存サービスとの比較

参考として、主要サービスとの機能差を整理した。各サービスはそれぞれ異なる強みを持っている。

機能 EDINET DB バフェットコード IRBANK J-Quants
財務データAPI 69指標 あり(法人契約) なし あり(限定的)
有報テキストAPI 全文無料 法人個別契約 なし なし
AI分析・スコア あり(ロジック公開) なし なし なし
リモートMCP あり なし なし なし
Web無料閲覧 登録不要 3年制限あり 登録不要 API専用
API商用利用 全プランOK 法人のみ 個人利用のみ
株価データ なし あり あり あり

EDINET DBは有報の財務データに特化している。株価データが必要な場合はJ-Quantsなど他サービスと組み合わせて使う形になる。

エンドポイント一覧

エンドポイント 用途 認証
GET /v1/status ヘルスチェック 不要
GET /v1/search?q= 企業検索 不要
GET /v1/companies 企業一覧(ページネーション) 必要
GET /v1/companies/{code} 企業詳細 必要
GET /v1/companies/{code}/financials 財務時系列(最大6年) 必要
GET /v1/companies/{code}/ratios 財務比率 必要
GET /v1/companies/{code}/analysis 財務健全性スコア・AI分析 必要
GET /v1/companies/{code}/text-blocks 有報テキスト全文 必要
GET /v1/rankings/{metric} ランキング(19種) 必要
GET /v1/industries 業種一覧 必要
GET /v1/industries/{slug} 業種別企業一覧 必要

OpenAPI仕様書: edinetdb.jp/docs/api-reference


EDINET DB: edinetdb.jp
APIキー発行: edinetdb.jp/developers(Freeプランは無料)
MCPの詳細: 日本株3,800社の財務データをMCPでClaude/ChatGPTから使う(Zenn)

5
7
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?