Mewk

見つける

Discover / Explore / Trending / Recommendations の取得 API と重み付け仕様です。

GET/api/v1/discover

質問箱のおすすめ一覧を取得します。popular または personalized を選択できます。

認証

認証不要。mode=personalized の場合、認証済みユーザー情報があればスコアに反映されます。

クエリパラメータ

パラメータ説明
modepopular | personalizedpopular: 全体人気 / personalized: 閲覧者との相性を加味
cursorstring前のレスポンスからのページネーションカーソル(質問 ID)
limitnumberページごとの件数(デフォルト: 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

キーワード・タグ・インスタンス・言語で質問箱を探索します。

認証

認証不要(公開エンドポイント)

クエリパラメータ

パラメータ説明
qstringユーザー名・表示名・ドメイン・タグに対する全文検索キー
tagstring指定タグを含む候補に絞り込み
domainstring指定ドメインを含む候補に絞り込み
langstringプロフィール言語コードで絞り込み
sortrelevance | popular | active | newrelevance/popular/active/new の重み付けで並び替え
cursorstring前のレスポンスからのページネーションカーソル(質問 ID)
limitnumberページごとの件数(デフォルト: 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/users/:handle/recommendations

指定ユーザーに似た質問箱の推薦一覧を取得します。

認証

認証不要(公開エンドポイント)

パスパラメータ

パラメータ説明
handle@user@instance.example 形式のユーザーハンドル

クエリパラメータ

パラメータ説明
limitnumberページごとの件数(デフォルト: 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 候補を補完に使い、上位を返します。