API リファレンス
GET /companies/{companyId}/filings/{filingId}/compare
summary metrics と sections を比較する contract を説明します。
このページの内容12項目
GET /api/signal-foundry/companies/{companyId}/filings/{filingId}/compare は、対象 filing と比較先 filing を並べて返します。
契約サマリー
| Field | Value |
|---|---|
| Method | GET |
| Path | /api/signal-foundry/companies/{companyId}/filings/{filingId}/compare |
| Auth | production は API key 必須 |
| Usage | request usage / rate limit 対象 |
| Credit | data credit は消費しない |
| CLI | sf filing compare <companyId> <filingId> --json |
| Next | changed section / metric を調査メモへ落とす |
この endpoint の job は、同一 company 内の 2 つの filing を比較することです。競合 company 同士を比較する endpoint ではありません。比較対象が自動解決できない場合は、against を明示します。
リクエスト
HTTP
curl "https://signal-foundry.app/api/signal-foundry/companies/jpx_5574/filings/edinet_fil_S100XYUO/compare?summary_metric=revenue,net_income§ion_key=business_risks" \ -H "Authorization: Bearer <SIGNAL_FOUNDRY_API_KEY>"
CLI
sf filing compare jpx_5574 edinet_fil_S100XYUO \ --summary-metric revenue,net_income \ --section-key business_risks \ --json
比較先を明示する場合:
sf filing compare jpx_5574 edinet_fil_S100XYUO \ --against edinet_fil_S100PREV \ --json
見る key:
filings.current.filing_idfilings.against.filing_idcompare.summary_metricscompare.sectionscompare.summary_metrics.<metric>.statuscompare.sections.<section_key>.statusmeta.compared_againstmeta.returned_section_keys
クエリパラメータ
| Param | Type | Default | Notes |
|---|---|---|---|
against | string | auto | 明示しない場合は previous_comparable_filing を使う |
summary_metric | array | [] | revenue / operating_income / ordinary_income / profit_before_tax / net_income / total_assets / net_assets / employee_count |
section_key | array | [] | business_risks / strategy / event_details / report_contents |
include_section_content | boolean | true | false で本文省略 |
レスポンス
中心フィールド
companyfilingscurrentagainst
compare.summary_metricscurrentpreviousdelta_valuedelta_ratiostatus
compare.sectionscurrentpreviousstatus
metacompared_againstrequested_against_identifierresolved_against_byresolved_filing_by
status は metric / section ごとに次を返します。
updatedunchangedaddedremovedunavailable
例
{
"company": {
"company_id": "jpx_5574",
"display_name": "ABEJA, Inc."
},
"filings": {
"current": {
"filing_id": "edinet_fil_S100XYUO",
"doc_id": "S100XYUO",
"document_type": "annual_report",
"period_end": "2025-08-31"
},
"against": {
"filing_id": "edinet_fil_S100PREV",
"doc_id": "S100PREV",
"document_type": "annual_report",
"period_end": "2024-08-31"
}
},
"compare": {
"summary_metrics": {
"revenue": {
"current": {
"value": 1234567890,
"unit": "JPY"
},
"previous": {
"value": 1111111111,
"unit": "JPY"
},
"delta_value": 123456779,
"delta_ratio": 0.111111101,
"status": "updated"
}
},
"sections": {
"business_risks": {
"current": {
"section_key": "business_risks",
"section_title": "事業等のリスク"
},
"previous": {
"section_key": "business_risks",
"section_title": "事業等のリスク"
},
"status": "updated"
}
}
},
"meta": {
"compared_against": "previous_comparable_filing",
"current_filing_id": "edinet_fil_S100XYUO",
"requested_against_identifier": null,
"resolved_filing_by": {
"field": "filing_id",
"value": "edinet_fil_S100XYUO"
},
"resolved_against_by": {
"field": "filing_id",
"value": "edinet_fil_S100PREV"
},
"returned_section_keys": ["business_risks"]
}
}
エラー
| Status | Code | Meaning |
|---|---|---|
400 | invalid_query | query parameter が schema に合わない |
401 | invalid_api_key など | API key が無効、失効、または revoke 済み |
404 | company_not_found | {companyId} を canonical company に解決できない |
404 | filing_not_found | current filing を同一 company 内で解決できない |
404 | compare_target_not_found | 比較先 filing を自動または against で解決できない |
429 | rate_limit_exceeded | API key の rate limit を超えた |
compare_target_not_found の例
{
"error": {
"code": "compare_target_not_found",
"message": "No automatic comparable filing was found for the requested filing",
"hint": "Inspect the company filings list and rerun compare with an explicit against filing id.",
"suggested_next_commands": [
"sf company filings jpx_5574 --json",
"sf filing compare jpx_5574 edinet_fil_S100XYUO --against <filingId> --json"
]
}
}
復旧方法
compare_target_not_found が返る場合:
sf company filings <companyId> --limit 10 --jsonを実行します。filings[].filing_id,filings[].document_type,filings[].period_endを確認します。- 必要なら
sf filing show <companyId> <filingId> --jsonで artifact / facts の状態を確認します。 - 比較したい filing を選び、
--against <filingId>を付けて再実行します。
filing_not_found が返る場合:
sf company filings <companyId> --jsonに戻ります。- current filing の
filing_idまたはdoc_idを取り直します。 - 同じ company 内の filing だけを compare に渡してください。
section 本文が重い場合は、include_section_content=false を付けます。差分の有無だけを見る場合は、compare.sections.<section_key>.status と compare.summary_metrics.<metric>.status を先に確認してください。
次に進む先
- filing の facts / sections を読む:
GET /companies/{companyId}/filings/{filingId} - filing 候補を選び直す:
GET /companies/{companyId}/filings