API リファレンス
Construction Permit Search API
建設業許可の contractor rows と営業所明細を検索する API
このページの内容6項目
GET /api/signal-foundry/construction は建設業許可データを許可業者単位で返します。会社検索の construction=true は会社一覧向けですが、この endpoint は許可番号、許可行政庁、代表者、主たる営業所、営業所別の許可業種を確認するための入口です。
契約サマリー
| Field | Value |
|---|---|
| Method | GET |
| Path | /api/signal-foundry/construction |
| Auth | Signal Foundry API key |
| Credit | data クレジットは消費しない |
| CLI | sf construction search <query> --json |
| Grain | one row per construction contractor, with optional office rows |
| Source context | sf_construction_contractors + sf_construction_contractor_offices |
リクエスト
curl -H "Authorization: Bearer $SIGNAL_FOUNDRY_API_KEY" \ "https://signal-foundry.app/api/signal-foundry/construction?prefecture=大阪府&include_offices=true&limit=10"
curl -H "Authorization: Bearer $SIGNAL_FOUNDRY_API_KEY" \ "https://signal-foundry.app/api/signal-foundry/construction?company_id=cn_1234567890123"
クエリパラメータ
| Parameter | Type | Default | Notes |
|---|---|---|---|
q | string | null | 会社名、正規化名、代表者、主たる営業所住所、許可番号、許可表示を検索 |
company_id | string | null | リンク済み Base company_id で絞り込み |
contractor_id | string | null | source-native contractor_id で絞り込み |
prefecture | string[] | [] | 大阪府 など。検索時に TAKKEN prefecture code へ変換 |
prefecture_code | string[] | [] | 27 などの TAKKEN prefecture code |
license_authority | string[] | [] | mlit_minister / prefecture_governor、または 大阪府知事 などの表示文字列 |
include_offices | boolean | true | false で営業所明細を省略 |
status | string | active | active / missing / closed / all |
order | string | last_seen | last_seen / name / license / authority |
limit | number | 20 | 1..100 |
offset | number | 0 | 0..10000 |
レスポンス
まず見る key:
contractors[].contractor_idcontractors[].license_displaycontractors[].display_namecontractors[].company_link.company_idcontractors[].offices[].permit_categoriesmeta.matched_contractorsmeta.returned_offices
{
"ok": true,
"command": "construction.search",
"contractors": [
{
"contractor_id": "takken_27_000001",
"license_authority": "大阪府知事",
"license_no": "000001",
"license_display": "大阪府知事許可 ...",
"display_name": "大阪建設株式会社",
"main_office": {
"address": "大阪府...",
"phone": "06-..."
},
"company_link": {
"company_id": "cn_1234567890123",
"match_status": "matched",
"confidence": 1,
"method": "exact"
},
"offices": [
{
"office_no": 1,
"office_name": "本店",
"address": "大阪府...",
"phone": "06-...",
"permit_categories": ["建築一式工事"]
}
]
}
],
"meta": {
"matched_contractors": 1,
"matched_contractors_count_mode": "planned",
"returned_contractors": 1,
"returned_offices": 1,
"source_context": "sf_construction_contractors + sf_construction_contractor_offices"
}
}
通常検索の matched_contractors は、広い住所検索でタイムアウトしないよう planned count を使います。company_id / contractor_id 指定時は exact count です。会社一覧を先に作りたい場合は GET /api/signal-foundry/companies?construction=true、保存済みリストに列を追加したい場合は active_construction_license_count / active_construction_office_count / construction_permit_categories を使います。
CLI equivalent
sf construction search "大阪府の建設業許可" --include-offices true --json sf construction search "大阪府知事" --license-authority 大阪府知事 --json sf construction search --company-id cn_1234567890123 --json
エラー
limit は 1..100、offset は 0..10000 の範囲で指定します。認証に失敗した場合は 401、入力が不正な場合は 400、検索処理に失敗した場合は 500 を返します。広い住所検索で件数だけが必要な場合は、include_offices=false または limit を小さくして再実行してください。