Discovery

Endpoints and scoring rules for Discover, Explore, Trending, and Recommendations.

GET/api/v1/discover

Get recommended question boxes with popular or personalized mode.

Authentication

Public endpoint. With mode=personalized, viewer context is applied when authenticated.

Query Parameters

ParameterTypeDescription
mode popular | personalized popular: global ranking / personalized: adds viewer affinity
cursor string Pagination cursor (question ID) from previous response
limit number Number of results per page (default: 20, max: 50)

Response

{
  "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"
}

Scoring Criteria

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

Search question boxes by keyword, tag, instance domain, and language.

Authentication

No authentication required (public endpoint)

Query Parameters

ParameterTypeDescription
q string Free-text query for username, display name, domain, and tags
tag string Filter to candidates that include the specified tag
domain string Filter candidates by matching instance domain
lang string Filter candidates by profile language code
sort relevance | popular | active | new Sort with weighted relevance/popular/active/new scoring
cursor string Pagination cursor (question ID) from previous response
limit number Number of results per page (default: 20, max: 50)

Response

{
  "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"
  }
}

Scoring Criteria

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

Get similar question box recommendations for a target handle.

Authentication

No authentication required (public endpoint)

Path Parameters

ParameterDescription
handle User handle in the format @user@instance.example

Query Parameters

ParameterTypeDescription
limit number Number of results per page (default: 20, max: 50)

Response

{
  "target": {
    "handle": "@target@example.com"
  },
  "recommendations": [
    {
      "handle": "@alice@example.com",
      "score": 87.3,
      "reasonCodes": ["sharedAudience", "sharedTopics", "sameInstance", "activeRecently"],
      "tags": ["music", "art"]
    }
  ]
}

Scoring Criteria

score =
  sharedSenderCount * 8
+ topicOverlap * 2.5
+ recentAnswers7d * 2
+ recentAnswers30d * 1.2
+ answerRate(0..1) * 25
- reportCount * 3
+ (sameDomain ? 6 : 0)

Same-instance and discover fallback candidates are used to fill and rank results.