API ドキュメント
BroadListening APIはRESTful設計で、JSON形式でデータを返します。認証不要で自由に利用できます。
ベースURL
http://localhost:3009共通レスポンス形式(ページネーション)
{
"data": [...],
"pagination": {
"page": 1,
"limit": 20,
"total": 100,
"totalPages": 5
}
}Endpoints
エンドポイント一覧
GET
/api/topicsトピック一覧を取得(ページネーション対応)
Query Params:
pagelimitResponse:
{ data: BLTopic[], pagination: { page, limit, total, totalPages } }POST
/api/topics新しいトピックを作成
Request Body:
title (string)description (string)quorumThreshold? (number)billId? (string)Response:
BLTopicGET
/api/topics/:idトピック詳細を取得(意見・クラスタ・議論構造含む)
Response:
BLTopic (with all relations)GET
/api/topics/:id/opinionsトピックの意見一覧を取得
Query Params:
pagelimitResponse:
{ data: BLOpinion[], pagination: { ... } }POST
/api/topics/:id/opinions意見を投稿(フェロモン初期値を自動生成)
Request Body:
content (string)stance (FOR|AGAINST|NEUTRAL)authorId? (string)Response:
BLOpinionPOST
/api/topics/:id/opinions/:opinionId/support意見を支持(フェロモン強化)
Request Body:
stance (FOR|AGAINST|NEUTRAL)weight? (number)userId (string)Response:
BLSupportPOST
/api/topics/:id/analyzeLLMパイプライン全実行(議論抽出→エンベディング→クラスタリング→適応度→フェーズ判定)
Response:
{ arguments, clusters, phase, ecosystem }GET
/api/topics/:id/ecosystemビジュアライゼーション用エコシステムデータを取得
Response:
{ topic, ecosystem, argumentGraph, pheromone, history }POST
/api/topics/:id/ai-participateAIエージェントに多視点から意見を生成させる
Request Body:
perspectives? (number, default: 3)Response:
{ opinions: BLOpinion[] }POST
/api/seedサンプルデータを投入(デモ用)
Response:
{ topics: number, opinions: number }Data Models
主要データモデル
BLTopic
- id, title, description
- phase (OPEN|DELIBERATION|CONVERGENCE|CLOSED)
- quorumThreshold, billId?
BLOpinion
- id, content, stance
- authorId, x, y, fitness
- supportCount, topicId, clusterId?
BLArgument
- id, type (CLAIM|PREMISE|EVIDENCE|REBUTTAL)
- content, confidence
- opinionId, topicId
BLPheromone
- id, intensity, quality
- decayRate, lastUpdated
- opinionId