API リファレンス
Signal Foundry の HTTP API を、agent や既存システムから安全に呼び出すための入口です。
このページの内容19項目
Signal Foundry API は、会社データ、観測データ、保存済み List、source import、research item、credit ledger を既存システムへ組み込むための HTTP surface です。
ただし、Claude Code / Codex から操作する場合はまず CLI を使います。CLI は同じ API を叩き、--json で agent が検証しやすい形に整えます。HTTP API は、自社の backend、batch、管理画面、partner integration から直接呼ぶときに使います。
endpoint の公開範囲、auth、credit tag、CLI equivalent は OpenAPI Endpoint Inventory を見ます。source と evidence の出所は Data Provenance を見ます。
まず決めること
| 判断 | CLI を使う | HTTP API を使う |
|---|---|---|
| Claude Code / Codex が操作する | Yes | No |
| 人間が terminal で調査する | Yes | No |
| 既存 backend に組み込む | No | Yes |
| CSV export を file として受け取りたい | Yes | Yes |
| SDK / OpenAPI 生成の前提にしたい | No | 将来 |
| 失敗時に suggested command で復旧したい | Yes | API error を解釈する必要あり |
迷ったら、まず CLI の --json で 1 回成功させてから HTTP API に移してください。
認証
production は API key 必須です。送信方法はどちらか 1 つにしてください。
curl -s "$SIGNAL_FOUNDRY_BASE_URL/api/signal-foundry/companies?q=7203" \ -H "Authorization: Bearer <SIGNAL_FOUNDRY_API_KEY>"
または:
curl -s "$SIGNAL_FOUNDRY_BASE_URL/api/signal-foundry/companies?q=7203" \ -H "x-api-key: <SIGNAL_FOUNDRY_API_KEY>"
両方を送る場合は一致している必要があります。不一致なら 400 api_key_conflict です。
Account scope
通常、account_id は送りません。API key に紐づく account が自動で使われます。
HTTP API を直接使う場合も、request body や query に account を指定しないでください。API key account と request account が衝突した場合は 400 account_scope_conflict です。
Rate limit と usage
API key request は usage event と rate limit の対象です。
current default:
| Limit | Value | 対象 |
|---|---|---|
| minute | 60 | 全 API request |
| day | 10000 | rolling 24h の全 API request |
| heavy day | 2000 | companies, observations/search, lists export など |
超過時は 429 rate_limit_exceeded と Retry-After header を返します。
Credit boundary
request usage と product credit は別物です。
| 操作 | Product credit |
|---|---|
companies search / profile / observations / filings | 通常は消費しない |
list estimate / list candidates | 消費しない |
list materialize | saved row の Basic credit |
list enrich --source website | found row の enrichment credit |
list export | 消費しない |
credits balance / credits summary | 消費しない |
credit-consuming write は、必ず execute: true と maxCredits を付けます。CLI では --execute --max-credits <n> です。
operation ごとの正本は Credit Schedule です。
現行 surface の確認
API endpoint や filter は docs より実装が先に変わることがあります。組み込み前に、CLI と capability contract を確認してください。
sf data capabilities --json sf --help sf list --help
見る key:
contract_versioncapabilities[].source_idcapabilities[].statuscapabilities[].filters[]capabilities[].entrypoints[]capabilities[].pricingcapabilities[].limitations[]
網羅的な現況は Data Capability Map に寄せています。
Public endpoint map
Company read
| Job | Endpoint | CLI |
|---|---|---|
| 短い identity 候補を返す | GET /companies/identity | sf companies identity <query> --json |
| 会社を解決する | GET /companies | sf companies search <query> --json |
| 1 社の profile を読む | GET /companies/{companyId}/profile | sf company profile <companyId> --json |
| 根拠付き observation を読む | GET /companies/{companyId}/observations | sf company observations <companyId> --json |
| filing 一覧を見る | GET /companies/{companyId}/filings | sf company filings <companyId> --json |
| filing detail を見る | GET /companies/{companyId}/filings/{filingId} | sf filing show <companyId> <filingId> --json |
| 前回 filing と比較する | GET /companies/{companyId}/filings/{filingId}/compare | sf filing compare <companyId> <filingId> --json |
Cross-company search
| Job | Endpoint | CLI |
|---|---|---|
| テーマに反応する会社を探す | POST /observations/search | sf observations search "<query>" --json |
List workspace
| Job | Endpoint | CLI | Detail |
|---|---|---|---|
| 保存前に件数と credit を見積もる | POST /lists/estimate | sf list estimate "<query>" --json | Lists Estimate |
| 候補 preview を見る | GET /lists/candidates | sf list candidates --from-estimate <estimateId> --json | Lists Candidates |
| saved List を作る | POST /lists/materialize | sf list materialize --from-estimate <estimateId> --execute --max-credits <n> --json | Lists Materialize |
| website enrichment を見積もる | POST /lists/{listId}/enrichments/estimate | sf list enrich <listId> --source website --estimate --json | Lists Enrichments |
| website enrichment を実行する | POST /lists/{listId}/enrichments/run | sf list enrich <listId> --source website --execute --max-credits <n> --json | Lists Enrichments |
| CSV export する | GET /lists/{listId}/export | sf list export <listId> --format csv --output ./list.csv --json | Lists Export |
Saved list operations
| Job | Endpoint | CLI | Notes |
|---|---|---|---|
| saved List 一覧 | GET /lists | sf list ls --json | status, refresh_cadence, limit |
| saved List detail | GET /lists/{listId} | sf list show <listId> --json | row projection と latest state |
| 空 List / source List / explicit company List を作る | POST /lists | sf list create ... --json | --from-source / --company-id |
| snapshot preview | GET /lists/{listId}/preview | sf list preview <listId> --json | publish 前確認 |
| snapshot publish | POST /lists/{listId}/publish | sf list publish <listId> --json | saved List snapshot |
| refresh | POST /lists/{listId}/refresh | sf list refresh <listId> --execute --max-credits <n> --json | source refresh は sourceRefresh |
| latest diff | GET /lists/{listId}/diffs/latest | sf list diff <listId> --json | watchlist review の入力 |
| status 更新 | PATCH /lists/{listId}/status | API only | active / paused / archived |
| schedule 更新 | PATCH /lists/{listId}/schedule | API only | manual / daily / weekly |
| suppressions | GET/PATCH /lists/{listId}/suppressions | API only | row の抑制管理 |
| diff row review | PATCH /lists/{listId}/diff-rows/{diffRowId}/review | API only | actionable などの review outcome |
| diff row exclusion | PATCH /lists/{listId}/diff-rows/{diffRowId}/exclusion | API only | not_actionable などの exclusion reason |
| workspace preferences | GET/PATCH /lists/{listId}/workspace-preferences | API only | UI/workspace preference |
| delivery 設定 | PATCH /lists/{listId}/delivery | API only | slack / webhook handoff |
| delivery 実行 | POST /lists/{listId}/deliver | API only | saved List の配信 handoff |
| due refresh 実行 | POST /lists/run-due-refreshes | API only | scheduler / operator 向け |
| pending delivery 実行 | POST /lists/run-pending-deliveries | API only | scheduler / operator 向け |
delivery は saved List の handoff surface です。approval workflow、CRM sync、full monitor / alert を agent が勝手に始める surface ではありません。
Discovery runs
| Job | Endpoint | CLI |
|---|---|---|
| estimate 後の run を見る | GET /discovery/runs/{runId} | sf discovery show <runId> --json |
| 追加条件で refine / materialize する | POST /discovery/runs/{runId} | sf discovery refine, sf discovery materialize |
Source import
| Job | Endpoint | CLI |
|---|---|---|
| CSV を source として保存する | POST /sources/import | sf source import ./companies.csv --json |
| headers / sample rows を見る | GET /sources/{sourceId}/inspect | sf source inspect <sourceId> --json |
| source columns を company field に map する | POST /sources/{sourceId}/map | sf source map <sourceId> --entity company ... --json |
| source rows を company に resolve する | POST /sources/{sourceId}/resolve | sf source resolve <sourceId> --execute --max-credits <n> --json |
| ambiguous row を review する | GET /sources/{sourceId}/review | sf source review <sourceId> --status multiple_candidates --json |
| 明示的に company を選ぶ | POST /sources/{sourceId}/select | sf source select <sourceId> --row <rowId> --company <companyId> --max-credits <n> --json |
Research / job artifacts / feedback / credits
| Job | Endpoint | CLI |
|---|---|---|
| external research item を読む | GET /research/items | sf research ls --json |
| external research item を保存する | POST /research/items | sf research add <companyId> --content "..." --json |
| external research を直接 estimate / fetch する | POST /research/external/estimate, POST /research/external/fetch | 通常は sf research add / ls --json |
| job artifact を一覧する | GET /job-artifacts | sf job artifact ls --json |
| job artifact を保存する | POST /job-artifacts | 通常は sf job ... --save --json |
| job artifact detail を見る | GET /job-artifacts/{artifactId} | sf job artifact show <artifactId> --json |
| feedback を送る | POST /feedback | sf feedback create "..." --json |
| credit 残高を見る | GET /credits/balance | sf credits balance --json |
| credit ledger summary を見る | GET /credits | sf credits summary --json |
| usage summary を見る | GET /usage/summary | API only |
| credit usage を見る | GET /usage/credits | API only |
ID 解決
companyId は canonical company_id を推奨します。
よく使う値:
jpx_72037203- corporate number
- normalized company name
- website domain
1 社 API に入る前に、次で候補を固定してください。
sf companies identity KEYENCE --json sf companies search 7203 --json
見る key:
identity.company_ididentity.matched_bycandidates[].candidate_rank_reasoncompanies[].company.company_idcompanies[].query_matchmeta.returned_companies
filingId は、edinet_fil_* の filing_id か EDINET doc_id を使えます。比較前に sf company filings <companyId> --json で選び、必要なら sf filing show <companyId> <filingId> --json で artifact_health / fact_stats / segment_metrics を確認します。
共通 response の読み方
成功 response は endpoint ごとに違いますが、agent はまず次の種類の key を見ます。
| Surface | 見る key |
|---|---|
| companies | companies[].company.company_id, meta.returned_companies |
| profile | company.company_id, profile, sources |
| observations | observations[], meta.returned_observations |
| filings | filings[].filing_id, filings[].doc_id |
| lists estimate | estimate.estimate_id, counts.matched_companies, billing.materialize.estimated_credits |
| lists materialize | list.list_id, list.row_count, billing.credits_used |
| lists preview | rows[], meta.returned_rows |
| source resolve | run.resolved_count, run.multiple_candidates_count, run.not_found_count, run.review_required_count |
| enrich run | run.run_id, run.found_count, billing.credits_used |
| company research job | company_summary, important_observations, filings, evidence, evidence_gaps, next_actions |
| credits | balance.available_credits, summary.totalQuantity |
エラー
共通 error envelope:
{
"error": {
"code": "invalid_query",
"message": "Invalid query parameters"
}
}
主な code:
| Code | 復旧 |
|---|---|
invalid_query | query parameter を schema に合わせる |
invalid_request | request body を schema に合わせる |
invalid_api_key | API key を再発行し、CLI なら sf auth setup をやり直す |
api_key_revoked | active key に差し替える |
api_key_rotated | rotation 後の key に差し替える |
api_key_expired | key を再発行する |
account_scope_conflict | request body / query の account 指定を外し、API key の account に任せる |
company_not_found | sf companies search <query> --json に戻る |
filing_not_found | sf company filings <companyId> --json で filing を選び直す |
estimate_not_found | sf list estimate "<query>" --json からやり直す |
max_credits_required | maxCredits / --max-credits を付ける |
max_credits_exceeded | query を狭めるか上限を上げる |
credit_balance_insufficient | sf credits balance --json で残高を見る |
rate_limit_exceeded | Retry-After まで待つ |
直接 API を使う前の smoke
HTTP API を実装に組み込む前に、同じ操作を CLI で通します。
sf version --json --check-update sf auth show --json sf companies search 7203 --json sf credits balance --json
list workflow なら:
sf list estimate "上場企業のうち、売上100億以上" --json sf list candidates --from-estimate <estimateId> --json sf list materialize --from-estimate <estimateId> --execute --max-credits <n> --json
OpenAPI について
OpenAPI は external integration / SDK generation には有効です。ただし現時点では、CLI JSON contract と docs の recovery path を先に正本にします。
OpenAPI 化の前に整理すること:
- endpoint visibility と auth / credit boundary を固定する
- route-local Zod schema を export 可能にする
- success response schema の owner を決める
- auth / rate / credit tag taxonomy を固定する
/llms.txtと API reference の重複を整理する
endpoint inventory は OpenAPI Endpoint Inventory に固定します。この backlog は Docs Map の方針に従って管理します。