OpenFiling MCP / API の使い方
OpenFiling MCP / APIを使うと、日本の上場企業の財務データ・開示情報をプログラムやAIから取得できます。
財務諸表・財務指標・有価証券報告書の本文・EDINET書類IDを扱うワークフローを、 MCP 対応の AI アシスタントや Claude Code・Codex と組み合わせて自動化できます。
クイックスタート
3ステップで API を使い始められます。
Core または Pro プランに加入後、設定 > APIキーから APIキーを作成してください。 発行直後に表示される APIキー全体をそのまま使えます。 API_KEY は一度しか表示されないので、安全な場所に保管してください。
ターミナルを開いて、以下のコマンドを実行してみましょう。YOUR_API_KEY の部分を、先ほど取得した APIキーに置き換えてください。
curl -H "X-API-Key: YOUR_API_KEY" \
"https://api.openfiling.app/api/external/v1/companies?q=7203"成功すると、トヨタ自動車の企業情報が JSON 形式で返ってきます。
{
"companies": [
{
"ticker": "7203",
"name": "トヨタ自動車",
"market": "プライム",
"sector33": "transport_equipment",
"sector33NameJa": "輸送用機器",
"scaleCategory": "TOPIX Large70",
"fiscalYearEndMonth": 3
}
],
"totalCount": 1
}認証
すべてのリクエストに X-API-Key ヘッダが必要です。
X-API-Key: {API_KEY}APIキー管理画面で表示される値を、そのままX-API-Keyヘッダに設定してください。
パーミッション
APIキー作成時に、以下のパーミッションを設定できます。
| パーミッション | アクセス範囲 |
|---|---|
| read | すべての GET エンドポイント(企業情報、財務データ、開示情報など) |
| write | ウォッチリストの追加・削除(PUT/DELETE) |
タグはドキュメント上のカテゴリ分けです。アクセス可否はタグではなくread/writeスコープで決まります。
APIキーの取り扱いについて
- APIキーは秘密情報です。GitHubリポジトリやフロントエンドのコードに含めないでください。
- 環境変数やシークレットマネージャーで管理することを推奨します。
- APIキーが漏洩した場合は、すぐに設定画面から削除して新しいキーを発行してください。
ベースURL
すべてのエンドポイントは以下のベースURLを基準にします。
https://api.openfiling.app/api/external/v1例えば、企業一覧を取得するには https://api.openfiling.app/api/external/v1/companies に GET リクエストを送ります。
レート制限
MCP / API には2種類のレート制限があります。どちらかに到達すると 429 Too Many Requests が返ります。
MCP・API の利用回数は合算されます。
バースト制限(req/min)
短時間の大量リクエストを制限します。プランによらず一律 100 req/min です。目安として約 600ms 以上の間隔を空けてリクエストしてください。超過時は Retry-After ヘッダに再試行可能までの秒数が返ります。
残数: x-ratelimit-remaining ヘッダで確認
日次クォータ(req/day)
1日あたりのリクエスト数を制限します。プランごとに上限が異なります。毎日 JST 00:00(UTC 15:00)にリセットされます。
残数: x-daily-quota-remaining ヘッダで確認
プラン
External API は Core と Pro プランで利用できます。Free プランでは API を利用できません。
| Core | Pro | |
|---|---|---|
| 月額料金 | ¥4,500 | ¥24,800 |
| 日次クォータ | 2,000 req/day | 10,000 req/day |
| 取得可能年度 | 全年度 | 全年度 |
| APIキー | 5本まで | 5本まで |
年度範囲について
全プランで全年度の財務データにアクセスできます。 財務諸表エンドポイントの from_year / to_year で取得範囲を絞り込めます。レスポンスに含まれる appliedFromYear / appliedToYear で、実際に適用された年度範囲を確認できます。
用途別ガイド
検索や自動化で使われることが多い取得パターンを、エンドポイントの組み合わせとして整理します。
財務データ API として使う
企業名・証券コードで対象企業を特定し、利用できる報告基準を確認してから、財務サマリーや財務諸表を取得します。日本基準・IFRS・米国基準が混在する企業でも、先に reporting-bases を確認すると、取得条件を固定できます。
# 1. 企業を検索
curl -H "X-API-Key: $OPENFILING_API_KEY" \
"https://api.openfiling.app/api/external/v1/companies?q=7203"
# 2. 利用可能な報告基準を確認
curl -H "X-API-Key: $OPENFILING_API_KEY" \
"https://api.openfiling.app/api/external/v1/companies/7203/reporting-bases"
# 3. 財務サマリーを取得
curl -H "X-API-Key: $OPENFILING_API_KEY" \
"https://api.openfiling.app/api/external/v1/companies/7203/financial-summary?basis=consolidated_ifrs&from_year=2022&to_year=2024"開示文書 API として使う
企業ごとの有価証券報告書・決算短信一覧から文書ID(documentId )を取得し、その書類に含まれるブロック一覧と本文を取得します。本文は markdown または text 形式を選べるため、RAG の前処理や社内データベースへの取り込みに使えます。
# 1. 企業の有価証券報告書一覧を取得
curl -H "X-API-Key: $OPENFILING_API_KEY" \
"https://api.openfiling.app/api/external/v1/companies/7203/filings?documentKind=annual_securities_report"
# 2. 書類内のブロック一覧を取得
curl -H "X-API-Key: $OPENFILING_API_KEY" \
"https://api.openfiling.app/api/external/v1/filings/S100XPTY/blocks"
# 3. 特定ブロックの本文をtext形式で取得
curl -H "X-API-Key: $OPENFILING_API_KEY" \
"https://api.openfiling.app/api/external/v1/filings/S100XPTY/blocks/BusinessRisksTextBlock?format=text"全文検索から開示本文を探す
開示文書の全文検索では、キーワード・証券コード・対象期間・セクションを組み合わせて該当ブロックを探せます。検索結果に含まれる documentId と blockKey を使うと、該当箇所の本文を取得できます。
curl -X POST "https://api.openfiling.app/api/external/v1/disclosure-fulltext-search" \
-H "X-API-Key: $OPENFILING_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "自己資本比率",
"filters": {
"ticker": "7203",
"periodFrom": "2023-01-01",
"periodTo": "2025-03-31",
"sectionKeys": ["business"]
},
"page": 1
}'エンドポイント
レスポンスの共通パターン
財務データ系のエンドポイントは、各期間(period)ごとに lineItems 配列を持つ構造でデータを返します。各 item の unit は値の基準単位を表し、表示用の百万円換算は行いません。
{
"periods": [
{
"fiscalYear": 2025,
"accountingStandard": "IFRS",
"lineItems": [
{ "key": "Revenue", "label": "売上収益", "unit": "JPY", "value": 45095325000000 },
...
]
}
]
}値が null の場合は、その期間にデータが存在しないことを意味します。 たとえば10百万円相当の値は10000000と"JPY"の組み合わせで返ります。
アカウント
APIキーに紐づくプラン情報や利用状況を確認できます。
/account/planプラン情報を取得read現在のサブスクリプションプラン、レート制限の状態、システムに保持している会計年度の範囲を返します。APIキーの利用状況を確認するのに便利です。
レスポンス例
{
"plan": "core",
"rateLimit": {
"limit": 100,
"remaining": 87,
"windowSeconds": 60
},
"dailyQuota": {
"limit": 2000,
"remaining": 1842
}
}企業検索・業種
上場企業の基本情報を検索・取得できます。33業種マスタも提供しています。
/sectors/sector3333業種マスタ一覧read全33業種の slug と日本語名を返します。slug は企業検索・決算カレンダー・全文検索のフィルタパラメータ(sector33)で使用します。
レスポンス例
{
"sectors": [
{ "slug": "fisheries_agriculture", "nameJa": "水産・農林業" },
{ "slug": "mining", "nameJa": "鉱業" },
{ "slug": "construction", "nameJa": "建設業" },
{ "slug": "foods", "nameJa": "食料品" },
{ "slug": "electric_appliances", "nameJa": "電気機器" },
...
]
}/companies企業一覧を検索read上場企業の一覧をキーワード・市場区分・業種でフィルタリングして取得します。
パラメータ
| パラメータ | 位置 | 必須 | 型 | 説明 |
|---|---|---|---|---|
| q | query | 任意 | string | 検索キーワード(企業名・証券コード) |
| market | query | 任意 | string | 市場区分(prime / standard / growth) |
| sector33 | query | 任意 | string | 33業種フィルタ |
| page | query | 任意 | integer | ページ番号(デフォルト: 1) |
レスポンス例
{
"companies": [
{
"ticker": "7203",
"name": "トヨタ自動車",
"market": "プライム",
"sector33": "transport_equipment",
"sector33NameJa": "輸送用機器",
"scaleCategory": "TOPIX Large70",
"fiscalYearEndMonth": 3
},
...
],
"totalCount": 1,
"page": 1,
"pageSize": 50
}決算データ
損益計算書・貸借対照表・CF計算書・株主資本等変動計算書の全項目を取得できるほか、主要な経営指標でサマリーを素早く確認できます。
/companies/{ticker}/financial-indicators主要な経営指標を取得read会計基準の違いを吸収した主要経営指標を返します。連結優先で自動選択され、基準変更を跨ぐ通年データを取得できます。決算短信の実績・会社予想がある場合は同じ時系列に統合され、各期間の periodKind で実績/予想を確認できます。
パラメータ
| パラメータ | 位置 | 必須 | 型 | 説明 |
|---|---|---|---|---|
| ticker | path | 必須 | string | 証券コード(例: 7203) |
| from_year | query | 任意 | integer | 取得開始年度(省略時は2016年、最小値: 2016) |
| to_year | query | 任意 | integer | 取得終了年度(省略時は現在年+1。会社予想を含むため現在年+1まで指定可能) |
レスポンス例
{
"appliedFromYear": 2022,
"appliedToYear": 2026,
"periods": [
{
"fiscalYear": 2026,
"periodEnd": null,
"accountingStandard": null,
"reportingBasis": "consolidated",
"periodKind": "forecast",
"items": [
{
"key": "revenue",
"label": "売上高・収益",
"labelEn": "Revenue",
"section": "income",
"unit": "JPY",
"value": 47000000000000
},
...
]
},
...
{
"fiscalYear": 2025,
"periodEnd": "2025-03-31",
"accountingStandard": "IFRS",
"reportingBasis": "consolidated",
"periodKind": "actual",
"items": [
{
"key": "revenue",
"label": "売上高・収益",
"labelEn": "Revenue",
"section": "income",
"unit": "JPY",
"value": 45095325000000
},
...
]
}
]
}/companies/{ticker}/reporting-bases利用可能な報告基準を取得read利用可能な報告基準(連結区分×会計基準)の一覧を返します。basis パラメータに渡す値の確認に使用します。
パラメータ
| パラメータ | 位置 | 必須 | 型 | 説明 |
|---|---|---|---|---|
| ticker | path | 必須 | string | 証券コード(例: 7203) |
レスポンス例
[
{
"basis": "consolidated_ifrs",
"consolidation": "consolidated",
"accountingStandard": "IFRS",
"availableFromYear": 2018,
"availableToYear": 2025,
"isDefault": true
},
{
"basis": "consolidated_jgaap",
"consolidation": "consolidated",
"accountingStandard": "JGAAP",
"availableFromYear": 2012,
"availableToYear": 2017,
"isDefault": false
},
...
]/companies/{ticker}/financial-summary財務サマリーを取得read損益計算書・貸借対照表・キャッシュフロー計算書の主要項目をまとめて返します。企業の財務概況を素早く把握するのに最適です。basis パラメータで連結/単体を切り替えられます。
パラメータ
| パラメータ | 位置 | 必須 | 型 | 説明 |
|---|---|---|---|---|
| ticker | path | 必須 | string | 証券コード(例: 7203) |
| basis | query | 任意 | string | 報告基準。省略時は連結・最新基準を自動適用。GET /companies/{ticker}/reporting-bases で利用可能な基準を確認できます |
| from_year | query | 任意 | integer | 取得開始年度(省略時はシステム上の最古年度) |
| to_year | query | 任意 | integer | 取得終了年度(省略時は現在のカレンダー年) |
レスポンス例
{
"consolidation": "consolidated",
"appliedFromYear": 2022,
"appliedToYear": 2025,
"periods": [
{
"fiscalYear": 2025,
"accountingStandard": "IFRS",
"income": [
{ "key": "Revenue", "label": "売上収益", "unit": "JPY", "value": 45095325000000 },
...
],
"balance": [
{ "key": "TotalAssets", "label": "総資産", "unit": "JPY", "value": 90111242000000 },
...
],
"cashFlow": [
{ "key": "CashFlowsFromOperatingActivities", "label": "営業活動によるCF", "unit": "JPY", "value": 4126292000000 },
...
]
},
...
]
}/companies/{ticker}/financial-statements/annual/income-statement年次損益計算書を取得read有価証券報告書に基づく年次損益計算書の全項目を取得します。項目は企業の開示内容に依存し、企業ごとに異なる場合があります。
パラメータ
| パラメータ | 位置 | 必須 | 型 | 説明 |
|---|---|---|---|---|
| ticker | path | 必須 | string | 証券コード(例: 7203) |
| basis | query | 任意 | string | 報告基準。省略時は連結・最新基準を自動適用。GET /companies/{ticker}/reporting-bases で利用可能な基準を確認できます |
| from_year | query | 任意 | integer | 取得開始年度(省略時はシステム上の最古年度) |
| to_year | query | 任意 | integer | 取得終了年度(省略時は現在のカレンダー年) |
レスポンス例
{
"consolidation": "consolidated",
"appliedFromYear": 2022,
"appliedToYear": 2025,
"periods": [
{
"fiscalYear": 2025,
"accountingStandard": "IFRS",
"lineItems": [
{ "key": "Revenue", "label": "売上収益", "unit": "JPY", "value": 45095325000000 },
{ "key": "OperatingProfit", "label": "営業利益", "unit": "JPY", "value": 5352934000000 },
...
]
},
...
]
}/companies/{ticker}/financial-statements/annual/balance-sheet年次貸借対照表を取得read有価証券報告書に基づく年次貸借対照表の全項目を取得します。項目は企業の開示内容に依存し、企業ごとに異なる場合があります。
パラメータ
| パラメータ | 位置 | 必須 | 型 | 説明 |
|---|---|---|---|---|
| ticker | path | 必須 | string | 証券コード(例: 7203) |
| basis | query | 任意 | string | 報告基準。省略時は連結・最新基準を自動適用。GET /companies/{ticker}/reporting-bases で利用可能な基準を確認できます |
| from_year | query | 任意 | integer | 取得開始年度(省略時はシステム上の最古年度) |
| to_year | query | 任意 | integer | 取得終了年度(省略時は現在のカレンダー年) |
レスポンス例
{
"consolidation": "consolidated",
"appliedFromYear": 2022,
"appliedToYear": 2025,
"periods": [
{
"fiscalYear": 2025,
"accountingStandard": "IFRS",
"lineItems": [
{ "key": "TotalAssets", "label": "資産合計", "unit": "JPY", "value": 90111242000000 },
...
]
},
...
]
}/companies/{ticker}/financial-statements/annual/cash-flow-statement年次キャッシュフロー計算書を取得read有価証券報告書に基づく年次CF計算書の全項目を取得します。項目は企業の開示内容に依存し、企業ごとに異なる場合があります。
パラメータ
| パラメータ | 位置 | 必須 | 型 | 説明 |
|---|---|---|---|---|
| ticker | path | 必須 | string | 証券コード(例: 7203) |
| basis | query | 任意 | string | 報告基準。省略時は連結・最新基準を自動適用。GET /companies/{ticker}/reporting-bases で利用可能な基準を確認できます |
| from_year | query | 任意 | integer | 取得開始年度(省略時はシステム上の最古年度) |
| to_year | query | 任意 | integer | 取得終了年度(省略時は現在のカレンダー年) |
レスポンス例
{
"consolidation": "consolidated",
"appliedFromYear": 2022,
"appliedToYear": 2025,
"periods": [
{
"fiscalYear": 2025,
"accountingStandard": "IFRS",
"lineItems": [
{ "key": "CashFlowsFromOperatingActivities", "label": "営業活動によるCF", "unit": "JPY", "value": 4126292000000 },
...
]
},
...
]
}/companies/{ticker}/financial-statements/quarterly/income-statement四半期損益計算書を取得read決算短信に基づく四半期損益計算書の全項目を取得します。項目は企業の開示内容に依存し、企業ごとに異なる場合があります。
パラメータ
| パラメータ | 位置 | 必須 | 型 | 説明 |
|---|---|---|---|---|
| ticker | path | 必須 | string | 証券コード(例: 7203) |
| reporting_basis | query | 任意 | string | 四半期決算の報告基準。consolidated または non_consolidated。省略時は利用可能な基準をすべて返します |
| from_year | query | 任意 | integer | 取得開始年度(省略時はシステム上の最古年度) |
| to_year | query | 任意 | integer | 取得終了年度(省略時は現在のカレンダー年) |
レスポンス例
{
"appliedFromYear": 2024,
"appliedToYear": 2025,
"periods": [
{
"periodKey": "2025-consolidated-q3",
"label": "2025年 3Q",
"fiscalYear": 2025,
"fiscalPeriodType": "q3",
"reportingBasis": "consolidated",
"disclosureNumber": "20250213012345",
"disclosureDate": "2025-02-13",
"title": "2025年3月期 第3四半期決算短信〔IFRS〕(連結)",
"lineItems": [
{ "key": "income_statement:RevenueIFRS", "label": "売上収益", "unit": "JPY", "value": 34000000000000 },
...
]
},
...
]
}/companies/{ticker}/financial-statements/quarterly/balance-sheet四半期貸借対照表を取得read決算短信に基づく四半期貸借対照表の全項目を取得します。項目は企業の開示内容に依存し、企業ごとに異なる場合があります。
パラメータ
| パラメータ | 位置 | 必須 | 型 | 説明 |
|---|---|---|---|---|
| ticker | path | 必須 | string | 証券コード(例: 7203) |
| reporting_basis | query | 任意 | string | 四半期決算の報告基準。consolidated または non_consolidated。省略時は利用可能な基準をすべて返します |
| from_year | query | 任意 | integer | 取得開始年度(省略時はシステム上の最古年度) |
| to_year | query | 任意 | integer | 取得終了年度(省略時は現在のカレンダー年) |
レスポンス例
{
"appliedFromYear": 2024,
"appliedToYear": 2025,
"periods": [
{
"periodKey": "2025-consolidated-q3",
"label": "2025年 3Q",
"fiscalYear": 2025,
"fiscalPeriodType": "q3",
"reportingBasis": "consolidated",
"disclosureNumber": "20250213012345",
"disclosureDate": "2025-02-13",
"title": "2025年3月期 第3四半期決算短信〔IFRS〕(連結)",
"lineItems": [
{ "key": "balance_sheet:AssetsIFRS", "label": "資産合計", "unit": "JPY", "value": 90111242000000 },
...
]
},
...
]
}/companies/{ticker}/financial-statements/quarterly/cash-flow-statement四半期キャッシュフロー計算書を取得read決算短信に基づく四半期CF計算書の全項目を取得します。項目は企業の開示内容に依存し、企業ごとに異なる場合があります。
パラメータ
| パラメータ | 位置 | 必須 | 型 | 説明 |
|---|---|---|---|---|
| ticker | path | 必須 | string | 証券コード(例: 7203) |
| reporting_basis | query | 任意 | string | 四半期決算の報告基準。consolidated または non_consolidated。省略時は利用可能な基準をすべて返します |
| from_year | query | 任意 | integer | 取得開始年度(省略時はシステム上の最古年度) |
| to_year | query | 任意 | integer | 取得終了年度(省略時は現在のカレンダー年) |
レスポンス例
{
"appliedFromYear": 2024,
"appliedToYear": 2025,
"periods": [
{
"periodKey": "2025-consolidated-q3",
"label": "2025年 3Q",
"fiscalYear": 2025,
"fiscalPeriodType": "q3",
"reportingBasis": "consolidated",
"disclosureNumber": "20250213012345",
"disclosureDate": "2025-02-13",
"title": "2025年3月期 第3四半期決算短信〔IFRS〕(連結)",
"lineItems": [
{ "key": "cash_flow_statement:CashFlowsFromOperatingActivitiesIFRS", "label": "営業活動によるキャッシュ・フロー", "unit": "JPY", "value": 4126292000000 },
...
]
},
...
]
}分析指標
財務比率(ROE、利益率など)やバリュエーション指標(PER、PBR など)を取得できます。
/companies/{ticker}/financial-ratios財務指標を取得readROE・利益率・自己資本比率など、正規化された財務指標を返します。
パラメータ
| パラメータ | 位置 | 必須 | 型 | 説明 |
|---|---|---|---|---|
| ticker | path | 必須 | string | 証券コード(例: 7203) |
| from_year | query | 任意 | integer | 取得開始年度(省略時はシステム上の最古年度) |
| to_year | query | 任意 | integer | 取得終了年度(省略時は現在のカレンダー年) |
レスポンス例
{
"consolidation": "consolidated",
"appliedFromYear": 2022,
"appliedToYear": 2025,
"periods": [
{
"fiscalYear": 2025,
"accountingStandard": "IFRS",
"lineItems": [
{ "key": "ReturnOnEquity", "label": "自己資本利益率", "abbreviation": "ROE", "unit": "PERCENT", "value": 14.2 },
...
]
},
...
]
}/companies/{ticker}/valuation-metricsバリュエーション指標を取得readPER・PBR・時価総額など、有報データから算出したバリュエーション指標を返します。
パラメータ
| パラメータ | 位置 | 必須 | 型 | 説明 |
|---|---|---|---|---|
| ticker | path | 必須 | string | 証券コード(例: 7203) |
| from_year | query | 任意 | integer | 取得開始年度(省略時はシステム上の最古年度) |
| to_year | query | 任意 | integer | 取得終了年度(省略時は現在のカレンダー年) |
レスポンス例
{
"appliedFromYear": 2022,
"appliedToYear": 2025,
"periods": [
{
"fiscalYear": 2025,
"accountingStandard": "IFRS",
"lineItems": [
{ "key": "netMargin", "label": "純利益率", "unit": "PERCENT", "value": 8.5 },
{ "key": "roe", "label": "ROE", "unit": "PERCENT", "value": 14.2 },
{ "key": "per", "label": "PER", "unit": "TIMES", "value": 8.5 },
{ "key": "marketCap", "label": "時価総額", "unit": "JPY", "value": 32000000000000 },
...
]
},
...
]
}セグメント分析
セグメント別の財務データを指標単位で取得できます。売上構成比やセグメント別利益の比較に活用できます。
/companies/{ticker}/segment-metricsセグメント指標一覧を取得read指定した年度範囲で利用可能なセグメント指標の一覧を返します。各指標の key を詳細エンドポイントの metricKey パラメータに使用してください。
パラメータ
| パラメータ | 位置 | 必須 | 型 | 説明 |
|---|---|---|---|---|
| ticker | path | 必須 | string | 証券コード(例: 7203) |
| from_year | query | 任意 | integer | 取得開始年度(省略時はシステム上の最古年度) |
| to_year | query | 任意 | integer | 取得終了年度(省略時は現在のカレンダー年) |
レスポンス例
{
"appliedFromYear": 2022,
"appliedToYear": 2025,
"metrics": [
{ "key": "Revenue", "label": "売上収益", "unit": "JPY", "availableFromYear": 2018, "availableToYear": 2025 },
{ "key": "OperatingProfit", "label": "営業利益", "unit": "JPY", "availableFromYear": 2018, "availableToYear": 2025 },
...
]
}/companies/{ticker}/segment-metrics/{metricKey}セグメント指標詳細を取得read指定した指標のセグメント別データを取得します。metricKey は一覧エンドポイントで取得した key を同じ年度範囲で使用してください。
パラメータ
| パラメータ | 位置 | 必須 | 型 | 説明 |
|---|---|---|---|---|
| ticker | path | 必須 | string | 証券コード(例: 7203) |
| metricKey | path | 必須 | string | 指標キー。GET /companies/{ticker}/segment-metrics で取得した key を使用 |
| from_year | query | 任意 | integer | 取得開始年度(省略時はシステム上の最古年度) |
| to_year | query | 任意 | integer | 取得終了年度(省略時は現在のカレンダー年) |
レスポンス例
{
"metric": { "key": "Revenue", "label": "売上収益", "unit": "JPY" },
"appliedFromYear": 2022,
"appliedToYear": 2025,
"periods": [
{
"fiscalYear": 2025,
"accountingStandard": "IFRS",
"segments": [
{ "key": "AutomobileMember", "label": "自動車", "value": 38000000000000 },
{ "key": "FinancialServicesMember", "label": "金融", "value": 2800000000000 },
...
]
},
...
]
}株主・持ち合い情報
大株主情報・政策保有株式・大量保有報告書を取得できます。保有割合・簿価・保有目的・持ち合い関係を含みます。
/companies/{ticker}/cross-holdings政策保有株式を取得read有価証券報告書に記載される政策保有株式を返します。保有先銘柄名・株数・簿価・保有目的・持ち合い関係を含みます。
パラメータ
| パラメータ | 位置 | 必須 | 型 | 説明 |
|---|---|---|---|---|
| ticker | path | 必須 | string | 証券コード(例: 7203) |
| from_year | query | 任意 | integer | 取得開始年度(省略時はシステム上の最古年度) |
| to_year | query | 任意 | integer | 取得終了年度(省略時は現在のカレンダー年) |
レスポンス例
{
"appliedFromYear": 2022,
"appliedToYear": 2024,
"periods": [
{
"fiscalYear": 2024,
"periodEnd": "2024-03-31",
"accountingStandard": "JGAAP",
"holdings": [
{
"heldName": "トヨタ自動車株式会社",
"heldTicker": "7203",
"sharesHeld": 1000000,
"bookValue": 500000000,
"purpose": "取引関係の維持・強化",
"isMutual": true
},
...
]
},
...
]
}開示書類
有価証券報告書・決算短信の書類一覧とブロック本文を取得できます。Markdown / テキスト形式に対応しています。
/companies/{ticker}/filings書類一覧を取得read指定した企業の有価証券報告書・決算短信を文書日付の降順で返します。各書類の documentId をブロック取得エンドポイントで使用します。
パラメータ
| パラメータ | 位置 | 必須 | 型 | 説明 |
|---|---|---|---|---|
| ticker | path | 必須 | string | 証券コード(例: 7203) |
| documentKind | query | 任意 | string | 文書種別。annual_securities_report または earnings_digest を指定 |
レスポンス例
{
"filings": [
{
"documentId": "260202545049",
"documentKind": "earnings_digest",
"documentKindLabel": "決算短信",
"ticker": "7203",
"companyName": "トヨタ自動車",
"documentDate": "2026-02-06",
"periodEnd": "2026-03-31",
"periodStart": null,
"disclosureDate": "2026-02-06",
"docDescription": "2026年3月期 第3四半期決算短信〔IFRS〕(連結)"
},
{
"documentId": "S100VWVY",
"documentKind": "annual_securities_report",
"documentKindLabel": "有価証券報告書",
"ticker": "7203",
"companyName": "トヨタ自動車",
"documentDate": "2025-03-31",
"periodEnd": "2025-03-31",
"periodStart": "2024-04-01",
"disclosureDate": "2025-06-18",
"docDescription": "有価証券報告書"
},
...
]
}/filings/{documentId}/blocksブロック一覧を取得read書類のセクション・ブロック目次を返します。ブロック本文は GET /filings/{documentId}/blocks/{blockKey} で取得します。
パラメータ
| パラメータ | 位置 | 必須 | 型 | 説明 |
|---|---|---|---|---|
| documentId | path | 必須 | string | /companies/{ticker}/filings で取得した documentId |
レスポンス例
{
"sections": [
{
"key": "overview",
"label": "企業の概況",
"blocks": [
{ "key": "OverviewOfCompanyTextBlock", "label": "主要な経営指標等の推移" },
{ "key": "DescriptionOfBusinessTextBlock", "label": "事業の内容" },
...
]
},
...
]
}/filings/{documentId}/blocks/{blockKey}ブロック本文を取得read指定したブロックの本文を取得します。blockKey は /filings/{documentId}/blocks で取得した blocks[].key を使用してください。format パラメータで出力形式(markdown / text)を選択できます。
パラメータ
| パラメータ | 位置 | 必須 | 型 | 説明 |
|---|---|---|---|---|
| documentId | path | 必須 | string | /companies/{ticker}/filings で取得した documentId |
| blockKey | path | 必須 | string | ブロックキー。/filings/{documentId}/blocks で取得した blocks[].key を使用 |
| format | query | 任意 | string | 出力フォーマット(markdown / text)。省略時は markdown |
レスポンス例
{
"document": {
"documentId": "S100VWVY",
"documentKind": "annual_securities_report",
"documentKindLabel": "有価証券報告書",
"ticker": "7203",
"companyName": "トヨタ自動車",
"documentDate": "2025-03-31",
"periodEnd": "2025-03-31",
"disclosureDate": "2025-06-18"
},
"block": {
"key": "BusinessRisksTextBlock",
"label": "事業等のリスク",
"items": [
{
"content": "当社グループの事業活動において..."
},
...
]
},
"format": "markdown"
}/disclosure/sectionsセクション定義一覧を取得read有価証券報告書のセクション定義を返します。全文検索の sectionKeys フィルタで使用可能な値の一覧として利用できます。
レスポンス例(list-disclosure-sections)
{
"sections": [
{ "key": "cover", "label": "表紙", "displayOrder": 0 },
{ "key": "overview", "label": "企業の概況", "displayOrder": 1 },
{ "key": "business", "label": "事業の状況", "displayOrder": 2 },
...
]
}/disclosure-fulltext-search開示文書の全文検索readキーワードによる有価証券報告書・決算短信検索。指定したキーワードを含むテキストブロックを文書日付の降順で返します。1ページ50件固定。全文取得は GET /filings/{documentId}/blocks/{blockKey} を使用してください。
パラメータ
| パラメータ | 位置 | 必須 | 型 | 説明 |
|---|---|---|---|---|
| query | body | 必須 | string | 検索キーワード(正規化後2〜200文字) |
| exclude | body | 任意 | string | 除外ワード(スペース区切りで複数指定可)。いずれかを含む結果を除外 |
| filters.ticker | body | 任意 | string | 証券コード。省略で全企業横断検索 |
| filters.periodFrom | body | 任意 | string | 文書日付下限(YYYY-MM-DD) |
| filters.periodTo | body | 任意 | string | 文書日付上限(YYYY-MM-DD) |
| filters.documentKind | body | 任意 | string | 文書種別。annual_securities_report または earnings_digest を指定 |
| filters.sectionKeys | body | 任意 | string[] | 有価証券報告書のセクションフィルタ(配列で複数指定可)。GET /disclosure/sections で取得可能な key を指定。earnings_digest とは併用不可 |
| filters.sector33 | body | 任意 | string[] | 33業種フィルタ(slug配列で複数指定可)。GET /sectors/sector33 で取得可能な slug を指定 |
| page | body | 任意 | integer | ページ番号(1始まり、デフォルト: 1) |
リクエスト例
{
"query": "自己資本比率",
"exclude": "連結 持分法",
"filters": {
"ticker": "7203",
"periodFrom": "2023-01-01",
"periodTo": "2025-03-31",
"documentKind": "annual_securities_report",
"sectionKeys": ["business", "reporting_company"],
"sector33": ["transport_equipment"]
},
"page": 1
}レスポンス例(search-disclosure-fulltext)
{
"count": 156,
"hasMore": false,
"normalizedQuery": "自己資本比率",
"page": 1,
"pageSize": 50,
"items": [
{
"company": { "ticker": "7203", "name": "トヨタ自動車" },
"document": {
"documentId": "S100TEST",
"documentKind": "annual_securities_report",
"documentKindLabel": "有価証券報告書",
"documentTitle": "有価証券報告書",
"documentDate": "2025-03-31",
"disclosureDate": "2025-06-30",
"periodEnd": "2025-03-31"
},
"block": { "fragmentIndex": 0, "blockKey": "ManagementAnalysisOfFinancialPositionOperatingResultsAndCashFlowsTextBlock", "label": "経営者による財政状態、経営成績及びキャッシュ・フローの状況の分析" },
"section": { "key": "business", "label": "事業の状況" },
"snippet": "…連結の自己資本比率は52.3%となりました。…"
},
...
]
}スクリーニング
財務指標に基づく企業スクリーニング。条件を指定して企業を絞り込み、利用可能な指標一覧を取得できます。
/screening/metricsスクリーニング指標一覧readスクリーニングで使用可能なメトリック候補の一覧を取得します。各指標の key を検索エンドポイントの conditions に使用します。
レスポンス例(screening-metrics)
{
"metrics": [
{ "key": "roe", "label": "ROE", "category": "収益性", "unit": "%" },
{ "key": "revenue", "label": "売上高", "category": "損益", "unit": "百万円" },
{ "key": "employees", "label": "従業員数", "category": "資産", "unit": "人" },
...
],
"operators": [">", ">=", "<", "<="]
}/screening/searchスクリーニング検索read条件を指定して企業をスクリーニングします。条件はAND結合で最大10件。金額系指標は百万円単位で指定します。1ページ100件固定。
パラメータ
| パラメータ | 位置 | 必須 | 型 | 説明 |
|---|---|---|---|---|
| conditions | body | 必須 | array | 検索条件の配列(最大10件、AND結合)。各条件は { key, operator, value, fiscalYear } |
| conditions[].key | body | 必須 | string | 指標キー(GET /screening/metrics で取得) |
| conditions[].operator | body | 必須 | string | 比較演算子(>, >=, <, <=) |
| conditions[].value | body | 必須 | string | 比較値。金額系指標は百万円単位で指定 |
| conditions[].fiscalYear | body | 必須 | integer | 対象年度(例: 2024) |
| page | body | 任意 | integer | ページ番号(1始まり、デフォルト: 1) |
リクエスト例
{
"conditions": [
{ "key": "roe", "operator": ">", "value": "10", "fiscalYear": 2024 },
{ "key": "revenue", "operator": ">", "value": "100000", "fiscalYear": 2024 }
],
"page": 1
}レスポンス例(screening-search)
{
"companies": [
{
"ticker": "7203",
"companyName": "トヨタ自動車",
"sector33Name": "輸送用機器",
"conditionValues": {
"0": { "value": 15.8, "periodEnd": "2024-03-31", "sourceReportingBasis": "consolidated_ifrs" },
"1": { "value": 45095325, "periodEnd": "2024-03-31", "sourceReportingBasis": "consolidated_ifrs" }
}
},
...
],
"totalCount": 42,
"page": 1,
"pageSize": 50
}決算カレンダー
決算発表予定日を日付範囲で一覧取得、または銘柄指定で次回予定日を取得できます。JPXの公表データに基づきます。
/earnings-calendar決算発表予定日一覧を取得read日付範囲(最大90日)で決算発表予定日を取得します。市場区分・業種名・決算期間種別でフィルタできます。
パラメータ
| パラメータ | 位置 | 必須 | 型 | 説明 |
|---|---|---|---|---|
| from | query | 必須 | string | 開始日(YYYY-MM-DD) |
| to | query | 必須 | string | 終了日(YYYY-MM-DD)。from から最大90日後まで |
| market_segment | query | 任意 | string | 市場区分フィルター(prime, standard, growth) |
| sector33 | query | 任意 | string | 33業種フィルター(slug形式、例: information_communication) |
| fiscal_period_type | query | 任意 | string | 決算期間種別フィルター(full_year, q1, q2, q3) |
| page | query | 任意 | integer | ページ番号(1始まり、デフォルト: 1) |
レスポンス例
{
"entries": [
{
"announcementDate": "2026-04-25",
"ticker": "7203",
"companyName": "トヨタ自動車",
"fiscalYearEnd": "2026-03-31",
"sector33": "transport_equipment",
"sector33NameJa": "輸送用機器",
"fiscalPeriodType": "本決算",
"market": "プライム市場",
"summary": {
"revenue": 45095325000000,
"netIncome": 4999449000000
},
"summaryStatus": "available"
},
...
],
"totalCount": 85,
"page": 1,
"pageSize": 50
}/companies/{ticker}/next-earnings次回決算発表予定日を取得read指定銘柄の次回(今日以降)の決算発表予定日を取得します。予定が登録されていない場合は entry が null になります。
パラメータ
| パラメータ | 位置 | 必須 | 型 | 説明 |
|---|---|---|---|---|
| ticker | path | 必須 | string | 証券コード(例: 7203) |
レスポンス例
{
"entry": {
"announcementDate": "2026-05-08",
"fiscalPeriodType": "本決算",
"fiscalYearEnd": "2026-03-31"
}
}ウォッチリスト
企業のウォッチリスト管理ができます。追加・削除には write パーミッションが必要です。
/watchlistウォッチリスト一覧を取得read自分のウォッチリストに登録されている企業の一覧を取得します。
レスポンス例
{
"entries": [
{
"ticker": "7203",
"companyName": "トヨタ自動車",
"addedAt": "2025-03-01T10:30:00Z"
},
...
],
"totalCount": 2,
"page": 1,
"pageSize": 50
}/watchlist/{ticker}ウォッチリストに追加write企業をウォッチリストに追加します。すでに登録済みの場合は何もしません(冪等)。レスポンスボディはありません(204)。
パラメータ
| パラメータ | 位置 | 必須 | 型 | 説明 |
|---|---|---|---|---|
| ticker | path | 必須 | string | 証券コード(例: 7203) |
レスポンス例
(レスポンスボディなし — HTTP 204)/watchlist/{ticker}ウォッチリストから削除write企業をウォッチリストから削除します。存在しない場合も 204 を返します(冪等)。レスポンスボディはありません(204)。
パラメータ
| パラメータ | 位置 | 必須 | 型 | 説明 |
|---|---|---|---|---|
| ticker | path | 必須 | string | 証券コード(例: 7203) |
レスポンス例
(レスポンスボディなし — HTTP 204)政府調達
上場企業の政府調達データを取得できます。省庁別の金額サマリーも含みます。
/government-procurement政府調達一覧を取得read上場企業の政府調達データを時系列で取得します。
パラメータ
| パラメータ | 位置 | 必須 | 型 | 説明 |
|---|---|---|---|---|
| q | query | 任意 | string | キーワード検索(件名・企業名) |
| department | query | 任意 | string | 省庁名で絞り込み(例: 防衛省) |
| page | query | 任意 | integer | ページ番号(デフォルト: 1) |
レスポンス例
{
"items": [
{
"orderDate": "2026-04-06",
"title": "デジタル庁情報システム基盤の構築",
"winningBidPriceYen": 1320000000,
"governmentDepartment": "デジタル庁",
"ticker": "6752",
"companyName": "NEC"
}
],
"page": 1,
"pageSize": 50,
"totalCount": 25905
}/government-procurement/departments政府調達の省庁一覧を取得read政府調達データに含まれる省庁名の一覧を件数降順で取得します。
レスポンス例
{
"departments": [
"防衛省",
"厚生労働省",
"国土交通省",
"デジタル庁"
]
}/companies/{ticker}/government-procurement企業別の政府調達データを取得read特定企業の政府調達データと省庁別金額サマリーを取得します。
パラメータ
| パラメータ | 位置 | 必須 | 型 | 説明 |
|---|---|---|---|---|
| ticker | path | 必須 | string | 証券コード(例: 7203) |
| page | query | 任意 | integer | ページ番号(デフォルト: 1) |
レスポンス例
{
"items": [
{
"orderDate": "2026-04-06",
"title": "デジタル庁情報システム基盤の構築",
"winningBidPriceYen": 1320000000,
"governmentDepartment": "デジタル庁"
}
],
"departmentSummary": [
{
"department": "デジタル庁",
"count": 15,
"totalParsedAmountYen": 5400000000,
"parsedAmountCount": 12
}
],
"page": 1,
"pageSize": 50,
"totalCount": 42
}エラーハンドリング
エラーが発生すると、以下の形式の JSON が返ります。
{
"error": {
"code": "rate_limited",
"message": "Rate limit exceeded. Retry after 42 seconds."
}
}エラーコード一覧
| code | HTTP ステータス | 説明 |
|---|---|---|
| bad_request | 400 | リクエストパラメータが不正です。 |
| unauthorized | 401 | APIキーが未指定、または無効です。 |
| forbidden | 403 | パーミッション不足です。 |
| not_found | 404 | 指定したリソースが見つかりません。 |
| rate_limited | 429 | バースト制限(req/min)を超過しました。Retry-After ヘッダで再試行可能時刻を確認してください。 |
| daily_quota_exceeded | 429 | 日次クォータ(req/day)を超過しました。JST 00:00 にリセットされます。 |
| internal_error | 500 | サーバー内部エラーです。時間を置いて再試行してください。 |
コード例
主要なプログラミング言語での使い方を紹介します。
curl
最もシンプルな方法です。ターミナルから直接リクエストを送れます。
# トヨタ自動車の損益計算書(連結・IFRS、2022〜2024年度)を取得
curl -H "X-API-Key: $OPENFILING_API_KEY" \
"https://api.openfiling.app/api/external/v1/companies/7203/income-statement?basis=consolidated_ifrs&from_year=2022&to_year=2024"Python
標準ライブラリの urllib でも使えますが、requests を使うとよりシンプルです。
import os
import requests
API_KEY = os.environ["OPENFILING_API_KEY"]
BASE = "https://api.openfiling.app/api/external/v1"
# トヨタ自動車の財務サマリーを取得
resp = requests.get(
f"{BASE}/companies/7203/financial-summary",
headers={"X-API-Key": API_KEY},
params={"basis": "consolidated_ifrs"},
)
resp.raise_for_status()
data = resp.json()
# 最新年度の売上を表示
latest_period = data["periods"][-1]
income_items = {item["key"]: item["value"] for item in latest_period["income"]}
revenue = income_items.get("Revenue") or income_items.get("NetSales")
print(f"売上 ({latest_period['fiscalYear']}): {revenue:,}")
# レート制限の残数を確認
print(f"バースト残: {resp.headers.get('x-ratelimit-remaining')}")
print(f"日次残: {resp.headers.get('x-daily-quota-remaining')}")JavaScript / TypeScript
Node.js(18+)や Deno、Bun の fetch API をそのまま使えます。
const API_KEY = process.env.OPENFILING_API_KEY;
const BASE = "https://api.openfiling.app/api/external/v1";
// トヨタ自動車の財務サマリーを取得
const res = await fetch(
`${BASE}/companies/7203/financial-summary?basis=consolidated_ifrs`,
{ headers: { "X-API-Key": API_KEY } },
);
if (!res.ok) {
const err = await res.json();
throw new Error(`API Error: ${err.error.code} - ${err.error.message}`);
}
const data = await res.json();
console.log(`期間数: ${data.periods.length}`);
// 最新年度の売上を表示
const latestPeriod = data.periods.at(-1);
const incomeItems = Object.fromEntries(
latestPeriod?.income.map((i) => [i.key, i.value]) ?? [],
);
const revenue = incomeItems.Revenue ?? incomeItems.NetSales;
console.log(`売上: ${revenue?.toLocaleString()}円`);エラーハンドリングのベストプラクティス
レート制限にかかった場合は、Retry-After ヘッダの値だけ待ってからリトライしましょう。
import time
def fetch_with_retry(url, headers, max_retries=3):
for attempt in range(max_retries):
resp = requests.get(url, headers=headers)
if resp.status_code == 429:
retry_after = int(resp.headers.get("Retry-After", 60))
print(f"レート制限超過。{retry_after}秒後にリトライ...")
time.sleep(retry_after)
continue
resp.raise_for_status()
return resp.json()
raise Exception("最大リトライ回数に達しました")