見つける
Discover / Explore / Trending / Recommendations の取得 API と重み付け仕様です。
GET
/api/v1/discover質問箱のおすすめ一覧を取得します。popular または personalized を選択できます。
認証
認証不要。mode=personalized の場合、認証済みユーザー情報があればスコアに反映されます。
クエリパラメータ
| パラメータ | 型 | 説明 |
|---|---|---|
| mode | popular | personalized | popular: 全体人気 / personalized: 閲覧者との相性を加味 |
| cursor | string | 前のレスポンスからのページネーションカーソル(質問 ID) |
| limit | number | ページごとの件数(デフォルト: 20、最大: 50) |
レスポンス
{
"items": [
{
"handle": "@alice@example.com",
"score": 152.4,
"stats": {
"totalQuestions": 120,
"answeredQuestions": 110,
"answerRate": 91.6,
"recentAnswers7d": 8,
"recentAnswers30d": 23,
"activeDays30d": 16,
"latestAnswerAt": "2026-03-01T08:01:00.000Z"
},
"tags": ["art", "music"],
"reasonCodes": ["activeRecently", "highAnswerRate"]
}
],
"nextCursor": "20",
"mode": "popular"
}スコア計算の基準
baseScore = recentAnswers7d * 6 + recentAnswers30d * 2.5 + activeDays30d * 1.8 + answerRate(0..1) * 40 - reportCount * 3 if mode=personalized: + sameInstance * 8 + sameLanguage * 4 + min(topicOverlap * 2.4, 18)
GET
/api/v1/exploreキーワード・タグ・インスタンス・言語で質問箱を探索します。
認証
認証不要(公開エンドポイント)
クエリパラメータ
| パラメータ | 型 | 説明 |
|---|---|---|
| q | string | ユーザー名・表示名・ドメイン・タグに対する全文検索キー |
| tag | string | 指定タグを含む候補に絞り込み |
| domain | string | 指定ドメインを含む候補に絞り込み |
| lang | string | プロフィール言語コードで絞り込み |
| sort | relevance | popular | active | new | relevance/popular/active/new の重み付けで並び替え |
| cursor | string | 前のレスポンスからのページネーションカーソル(質問 ID) |
| limit | number | ページごとの件数(デフォルト: 20、最大: 50) |
レスポンス
{
"items": [
{
"handle": "@alice@example.com",
"score": 134.6,
"tags": ["music", "art"],
"reasonCodes": ["activeRecently", "queryMatched", "tagMatched", "sortedByRelevance"]
}
],
"nextCursor": "20",
"applied": {
"q": "music",
"tag": "music",
"domain": "",
"lang": "ja",
"sort": "relevance"
}
}スコア計算の基準
baseScore = recentAnswers7d * 4 + recentAnswers30d * 2 + answerRate(0..1) * 35 - reportCount * 3 queryBoost: username hit +20, display name hit +16, domain hit +10, tag hit +14 sortBoost: active => recentAnswers7d * 10 new => max(0, 120 - accountAgeDays) popular => answeredQuestions * 1.5
GET
/api/v1/trending急上昇ユーザー・タグ・注目回答を期間別で取得します。
クエリパラメータ
| パラメータ | 型 | 説明 |
|---|---|---|
| range | daily | weekly | daily: 24時間 / weekly: 7日間 |
| userLimit | number | 返す急上昇ユーザー件数 |
| tagLimit | number | 返す急上昇タグ件数 |
| highlightLimit | number | 返す注目回答件数 |
レスポンス
{
"range": "weekly",
"users": [
{ "handle": "@alice@example.com", "score": 98.4, "reasonCodes": ["trendingNow"] }
],
"tags": [
{ "tag": "music", "score": 33.2, "count": 19 }
],
"highlights": [
{
"questionId": "q_123",
"handle": "@alice@example.com",
"score": 5.8,
"tags": ["music", "cover"],
"answeredAt": "2026-03-01T08:01:00.000Z"
}
]
}スコア計算の基準
recency = max(0, rangeHours - ageHours) / rangeHours userScore += 1 + recency * 2.5 tagScore += 1 + recency highlightScore = recency * 4 + min(answerLength / 280, 1.6) + min(tagCount, 5) * 0.2 finalTrendingUserScore = userScore + recentAnswers7d * 1.5 + activeDays30d * 0.8 - reportCount * 2
GET
/api/v1/users/:handle/recommendations指定ユーザーに似た質問箱の推薦一覧を取得します。
認証
認証不要(公開エンドポイント)
パスパラメータ
| パラメータ | 説明 |
|---|---|
| handle | @user@instance.example 形式のユーザーハンドル |
クエリパラメータ
| パラメータ | 型 | 説明 |
|---|---|---|
| limit | number | ページごとの件数(デフォルト: 20、最大: 50) |
レスポンス
{
"target": {
"handle": "@target@example.com"
},
"recommendations": [
{
"handle": "@alice@example.com",
"score": 87.3,
"reasonCodes": ["sharedAudience", "sharedTopics", "sameInstance", "activeRecently"],
"tags": ["music", "art"]
}
]
}スコア計算の基準
score = sharedSenderCount * 8 + topicOverlap * 2.5 + recentAnswers7d * 2 + recentAnswers30d * 1.2 + answerRate(0..1) * 25 - reportCount * 3 + (sameDomain ? 6 : 0)
同一サーバー候補や Discover 候補を補完に使い、上位を返します。