📡 Ghost Radar API
Phase 0.5 對外可用端點,提供研究引用所需的一致格式。
Base URL
https://ghost-radar.vercel.app/api/v1
GET/company/{ticker}
單一公司完整分析(例:2330)
GET/ranking
排行榜,支援篩選參數
GET/etf/{code}
ETF 成分股體檢(例:00878)
認證與配額
- 免費:100 calls/天/IP(無 API key)
- 學術:5,000 calls/天(header:
X-API-Key) - 開發者:10,000 calls/天(header:
X-API-Key) - 商業:另議
引用格式
Ghost Radar Credibility Score (ghost-radar.vercel.app, 2026)
每個 API 回應均含:methodology_version、dataset_snapshot_id、data_asof
GET /company/{ticker}
查詢單一公司的完整可信度分析與旗幟清單。
| 參數 | 型別 | 預設 | 說明 |
|---|---|---|---|
| ticker | string (path) | — | 公司代碼,如 2330 |
回應範例
{
"methodology_version": "1.0",
"dataset_snapshot_id": "2026-03-01",
"data_asof": "2026-03-01",
"universe_snapshot_id": null,
"ok": true,
"generated_at": "2026-03-01T00:00:00.000Z",
"company": {
"ticker": "2330",
"company_name": "台積電",
"market_type": "0",
"industry": "半導體業",
"credibility_score": 78,
"verdict": "decent",
"rank": 42,
"percentile": 97.8,
"assurance_level": "reasonable",
"has_assurance": true,
"top_flags": ["GF-014", "GF-003"],
"carbon_fee_liable": true,
"cbam_exposed": false
}
}GET /ranking
取得全市場排行榜,支援多維篩選與分頁。
| 參數 | 型別 | 預設 | 說明 |
|---|---|---|---|
| limit | integer | 50 | 每頁筆數,最大 200 |
| page | integer | 1 | 頁碼(從 1 起) |
| sort | string | score_desc | score_desc | score_asc |
| industry | string | — | 依產業篩選(中文) |
| assurance_level | string | — | none | limited | reasonable |
| market_type | string | — | listed(上市)| otc(上櫃) |
| gf | string | — | Ghost Flag ID,如 GF-014 |
| q | string | — | 搜尋公司名稱或代碼 |
回應範例
{
"methodology_version": "1.0",
"dataset_snapshot_id": "2026-03-01",
"ok": true,
"generated_at": "2026-03-01T00:00:00.000Z",
"data": [
{
"ticker": "2330",
"company_name": "台積電",
"credibility_score": 78,
"verdict": "decent",
"rank": 1
}
],
"meta": {
"total": 1957,
"page": 1,
"per_page": 50,
"page_count": 40,
"has_prev": false,
"has_next": true,
"methodology_version": "1.0"
}
}GET /etf/{code}
查詢 ESG ETF 成分股體檢結果,含平均分數與保證覆蓋率。
| 參數 | 型別 | 預設 | 說明 |
|---|---|---|---|
| code | string (path) | — | ETF 代碼,如 00878、00850 |
回應範例
{
"methodology_version": "1.0",
"dataset_snapshot_id": "2026-03-01",
"ok": true,
"generated_at": "2026-03-01T00:00:00.000Z",
"etf_code": "00878",
"etf_name": "國泰永續高股息",
"total": 30,
"avg_score": 61.4,
"min_score": 38,
"assurance_coverage_pct": 73.3,
"holdings": [
{
"weight": 0.042,
"company": {
"ticker": "2330",
"credibility_score": 78,
"verdict": "decent"
}
}
]
}錯誤格式
所有錯誤皆返回結構化 JSON,含唯一 request_id。
{
"error": {
"code": "NOT_FOUND",
"message": "ticker 9999 not found",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
},
"methodology_version": "1.0",
"dataset_snapshot_id": "2026-03-01"
}| code | HTTP 狀態 | 說明 |
|---|---|---|
| NOT_FOUND | 404 | 資源不存在 |
| BAD_REQUEST | 400 | 請求參數錯誤 |
| RATE_LIMITED | 429 | 超過配額限制 |
| UPSTREAM_FAILURE | 502 | 上游資料源異常 |
| INTERNAL | 500 | 內部錯誤 |