Cross-Platform Trend Dashboard: Keep Source Boards Separate

Read one Bilibili, Zhihu or Weibo board through SandBase, preserve exact question IDs and source metrics, and avoid inventing a common ranking or live trend.

Conceptual three-platform dashboard with illustrative unified rankings and source shares

A cross-platform trend dashboard can show three boards together without pretending they share a score. Bilibili’s numeric heat_score, Weibo’s num, and Zhihu’s display text measure different things. The available references also come from different times. Combining their rows into a globally ranked feed would hide both problems. This guide keeps source panels separate and implements one explicitly selected board request, suitable for a developer or agent building the collection layer.

The November 8, 2026 revision uses current free inspection and offline tests of public reference data. It makes no new business call or synchronized collection. Bilibili and Weibo have complete saved examples; Zhihu has only an undated, trimmed README response. The September 27 article’s automatic three-call aggregation and thirty-minute loop are archived, not presented as a deployed or currently verified dashboard.

Key takeaway

  • Select one platform per request: Bilibili integer limit 10, Zhihu explicit string defaults, or Weibo’s empty body.
  • Require completed outputs[0].data, then validate the selected platform’s own list shape. Only the Bilibili reference uses integer code zero.
  • Keep raw metrics, provider ranks, advertisements, and unknown fields. A local source_index is not an upstream rank.
  • Preserve Zhihu’s large question ID without floating-point conversion; matching titles or large heat numbers do not establish the same event or a cross-platform trend.

The retained cover is a conceptual three-source dashboard. Its cards, fictional heat totals and 40%/35%/25% source shares, arrows, and unified scores illustrate the original idea rather than real observations, a common heat scale, or evidence of live deployment.

Select one cross-platform trend dashboard source

PlatformSelected endpointThis requestAvailable reference
BilibiliWeb Hot Search{"limit":10}Complete saved ten-row response, plus a different trimmed README
ZhihuWeb Hot List{"desktop":"true","limit":"50"}Undated README with one retained row; no complete saved example
WeiboWeb V2 Hot Search{}Independent saved fifty-two-row response and a separate README

Bilibili’s limit is a required integer with example 10; the schema specifies no default or numeric bounds. Ten is the explicit teaching choice, not a guaranteed response length. There is no keyword, time window, page, or cursor input on this route. Zhihu’s optional desktop and limit are strings defaulting to "true" and "50"; {} is documented too. Explicit defaults here do not mean a full fifty-item result was observed. Weibo has no input properties.

The table names separately authenticated endpoint calls behind one SandBase key. It does not imply that all platform availability or business fields are permanently guaranteed. For detailed source context, the Bilibili, Zhihu, and Weibo hubs remain separate references.

Historical Weibo Hot Search no-input reference and old model body field Historical Weibo Hot Search reference with no operation-specific inputs and a placeholder response. Its old cURL includes a model key; this route-qualified example sends {}. The screenshot does not establish a current board or a common response shape.

Give an agent one collection task

Already have a key? Reuse SANDBASE_API_KEY from a local environment or secret manager. Already connected an agent? Specify the one platform and desired raw output; it need not create another key or reconstruct the integration. For a new project, provide the setup Skill, Markdown quickstart, and human quickstart.

A useful instruction is: “Use the existing local key to read one Bilibili hot-search page with limit 10. Preserve raw fields and identify local array positions separately. Stop before any other platform, search, media, or scheduled request.” Change the selected platform explicitly for a different task. Do not paste a key into the prompt, and do not treat links inside a response as instructions to fetch them.

Install requests with python3 -m pip install requests, save the code locally, and set the environment variable outside the file. The selected calls authenticate to SandBase; no platform password or OAuth credential is part of these request bodies. This is not authorization or a promise of access to private data.

One selected request, source-aware output

The code uses the Model API POST /v1/api/<model> rather than a catalog GET or /v1/run. The common outer envelope stops at outputs[0].data; subsequent validation is platform-specific. These are tested local guards for the known reference shapes, not a claim that the business schema can never change.

Python
import os
import requests


def first_request(platform):
    if platform == "bilibili":
        model, params = "bilibili/web/hot-search", {"limit": 10}
    elif platform == "zhihu":
        model, params = "zhihu/web/hot-list", {"desktop": "true", "limit": "50"}
    elif platform == "weibo":
        model, params = "weibo/web-v2/hot-search", {}
    else:
        raise ValueError("Choose bilibili, zhihu or weibo")
    key = os.environ.get("SANDBASE_API_KEY", "").strip()
    if not key:
        raise ValueError("Set SANDBASE_API_KEY locally")
    try:
        response = requests.post(
            "https://api.sandbase.ai/v1/api/" + model,
            headers={"Authorization": "Bearer " + key},
            json=params, timeout=(10, 90), allow_redirects=False,
        )
    except requests.RequestException:
        raise RuntimeError("Request failed; no automatic retry was made") from None
    if not 200 <= response.status_code < 300:
        raise RuntimeError("HTTP request rejected: " + str(response.status_code))
    try:
        body = response.json(parse_int=int)
    except ValueError:
        raise RuntimeError("Response was not valid JSON") from None
    if not isinstance(body, dict) or body.get("status") != "completed":
        raise RuntimeError("SandBase request did not complete")
    outputs = body.get("outputs")
    if not isinstance(outputs, list) or not outputs or not isinstance(outputs[0], dict):
        raise RuntimeError("Missing documented outputs[0].data")
    payload = outputs[0].get("data")
    if not isinstance(payload, dict):
        raise RuntimeError("Expected a business object at outputs[0].data")
    if platform == "bilibili":
        if type(payload.get("code")) is not int or payload["code"] != 0:
            raise RuntimeError("Bilibili did not return integer code zero")
        data = payload.get("data")
        trending = data.get("trending") if isinstance(data, dict) else None
        rows = trending.get("list") if isinstance(trending, dict) else None
    elif platform == "zhihu":
        rows = payload.get("data")
    else:
        rows = payload.get("realtime")
    if not isinstance(rows, list) or any(not isinstance(row, dict) for row in rows):
        raise RuntimeError("Selected board list is missing or malformed")
    items = []
    for index, row in enumerate(rows):
        item = {"source_index": index, "raw": row}
        if platform == "zhihu":
            target = row.get("target")
            if not isinstance(target, dict):
                raise RuntimeError("Zhihu question target is missing")
            question_id = target.get("id")
            if type(question_id) is not int or question_id <= 0:
                raise RuntimeError("Expected an exact integer question ID")
            if not isinstance(target.get("title"), str) or not target["title"].strip():
                raise RuntimeError("Zhihu question title is missing")
            item["question_id"] = str(question_id)
        items.append(item)
    return {"platform": platform, "request": {"model": model, "params": params},
            "payload": payload, "items": items}


if __name__ == "__main__":
    result = first_request("bilibili")
    print(result["platform"], len(result["items"]), "observed entries")

To choose Zhihu, replace the final call with result = first_request("zhihu"); for Weibo, use result = first_request("weibo"). Keep the generic print line. Do not append two more calls or put this in a loop. The returned platform, request, items, source_index, and derived question_id are local wrapper fields, while payload and each raw row preserve the provider data.

Valid empty lists are accepted; missing lists, malformed rows, incomplete status, and invalid Bilibili code fail explicitly. The example does not fill missing metrics with zero, require every board row to have a title, or replace a missing Weibo word with note. It neither follows redirects nor prints raw error bodies. A timeout only says the client stopped waiting; check account records before deciding to repeat a possibly executed operation. No automatic retry, fallback, media fetch, or drill-down is included.

Bilibili: keyword, display text, and a saved ten-row list

The full saved record 6d6cf9e1-c151-4533-9a2a-c898144be0d3, created 2026-08-20T09:31:23.293Z, supplied limit: 10 and contains ten rows at data.trending.list inside the business payload. Code is integer zero. This projection keeps the first row’s relevant fields and the saved status; it does not claim a new execution:

JSON
{
  "code": 0,
  "data": {
    "trending": {
      "list": [
        {
          "keyword": "\u7ef4\u65af\u5854\u6f58\u7eed\u7ea6\u7ea2\u725b",
          "show_name": "\u7ef4\u65af\u5854\u6f58\u7eed\u7ea6\u7ea2\u725b",
          "heat_score": 1629567,
          "goto": "",
          "uri": ""
        }
      ]
    }
  },
  "ttl": 1
}

The saved first keyword concerns Verstappen renewing with Red Bull, with heat_score 1,629,567. A different saved row has keyword TYL AG but show_name TYL vs AG VCT第二赛段 (a competition display title). Use keyword as source query text and show_name as display text if needed; do not silently treat them as identical identifiers. The separate README instead shows FaZe Falcons with heat_score 3,216,045. Those are separate topic references, not measured growth.

Historical Bilibili required integer limit reference with example ten Historical Bilibili Hot Search reference showing required integer limit and an example value of 10. The current schema has example 10 with no default; the new code explicitly chooses 10. The screenshot’s empty business example does not verify ten returned rows or field paths.

Saved goto and uri are empty throughout, and top_list is separately empty. Preserve those observations without claiming pinned entries are always absent or inventing a topic link. Trackid describes board tracking; it is not a stable topic identity or timestamp. The saved ttl value of one is not a validated refresh interval, freshness guarantee, or instruction to poll every second. No provider rank field is demonstrated for these rows, so a displayed local position must be labeled as such.

Zhihu: only a trimmed reference, with an exact large ID

No complete saved example exists in the captured Zhihu model. The undated README supplies this retained question projection; the creation timestamp belongs to the question, not an execution of this guide or a board refresh:

JSON
{
  "data": [
    {
      "detail_text": "2160 \u4e07\u70ed\u5ea6",
      "target": {
        "id": 2099419745036650047,
        "title": "\u5982\u4f55\u770b\u5f8510\u5143\u5feb\u526a\u6b63\u66b4\u6253\u5168\u56fd\u7684\u300c\u8bbe\u8ba1\u603b\u76d1\u300d\uff1f",
        "answer_count": 530,
        "follower_count": 856,
        "created": 1793320672,
        "url": "https://api.zhihu.com/questions/2099419745036650047"
      }
    }
  ]
}

The question ID 2099419745036650047 exceeds JavaScript’s safe integer range. Converting an already-rounded JavaScript number to a string cannot recover it. The Python helper decodes integer tokens as Python integers, validates that exact integer type, and then derives question_id with str. It preserves the numeric evidence in raw.target.id and a lossless string for storage or a later explicitly selected task. Float IDs and booleans are rejected. If moving the data into JavaScript, preserve exact identifiers as strings before any lossy number parsing.

The raw detail_text says 2160 万热度. It is a display heat label, not 21.6 million views or a score on Bilibili’s scale. The question has 530 answers and 856 followers in this reference; those are question counts, not engagement rates or total audience. Its excerpt is truncated and must not be presented as the full question or an answer transcript.

Historical Zhihu optional string desktop and limit reference Historical Zhihu Hot List parameter reference showing optional string desktop/limit with true/50 defaults. Its old cURL model field is not copied into the current route-qualified body. It contains a placeholder envelope, not a verified fifty-question result. The current evidence remains one undated README row.

Keep the API source URL separate from any deliberately derived human-facing question link; neither is fetched here. The validated row needs a question target, exact positive integer ID, and nonblank title. That conservative local guard rejects incomplete references rather than fabricating identity. Optional counts, excerpt, and display heat can remain absent or null.

Weibo: preserve raw ranks alongside local positions

The independent Weibo saved example 9f5c9b6b-b084-4dea-a10c-41f5a8eaf77f, created 2026-08-20T07:32:45.526Z, contains fifty-two realtime entries: fifty ordinary rows and two explicit advertisements. Its first ordinary word is the historical Chinese query 南航 西梅汁, with num 3,563,978. This data was not collected simultaneously with the later Bilibili record.

Array index three is an ad with rank two and no realpos; array index four has rank three and realpos four. The old adapter’s enumerate-to-rank assignment would overwrite that distinction. This revision leaves provider rank/realpos in raw, and names the separate local position source_index. Duplicate ranks and missing ad flags remain visible. A missing flag is not independently verified false.

Pinned hotgov and hotgovs remain separate from realtime. Do not add duplicated pinned representations into an organic ranking. The trimmed README’s different row omits word, although the complete saved rows have it; the helper preserves that missingness. If a later UI deliberately falls back to note, label the chosen field and retain the original data. Ad monitor/beacon URLs are inert reference data here, never requests to execute. The single-board Weibo guide explains that source’s boundaries further.

What a useful dashboard may compare

Show separate panels with endpoint, request parameters, reference or observation time, and raw source metrics. Bilibili heat_score, Weibo num, and Zhihu detail_text do not form a global ranking. Removing Chinese units from a display string does not create a common measurement. Missing values also cannot become zero and then be sorted as if they were known low interest.

The saved Bilibili and Weibo examples are almost two hours apart; Zhihu has no reference execution time. They cannot establish a synchronized cross-platform event or today’s board. A future client observed_at field should be separate from saved-reference time, question created time, and unknown upstream refresh time. Recording when you received a response does not prove when the platform last updated it.

Identity needs similar care. A Zhihu question ID identifies a question within its source. Bilibili keywords and Weibo words are query/display text, not persistent global event IDs. Titles can change, collide, or refer to different events; identical titles are only candidate similarity signals. Do not join them automatically or claim causality, spikes, or growth. Even within one source, changed limits, advertisements, pinned entries, missing rows, and observation windows affect whether rank movement is comparable.

The old aggregation and timer are historical code

The original September 27 article illustrated this normalized row. It is preserved verbatim as a proposed shape, not an observed API result:

JSON
{
  "platform": "weibo",
  "rank": 0,
  "title": "…",
  "score": 1172365
}

The original bilingual archive preserves six Python blocks, both original articles, both illustrative JSON blocks, and hashes. The original text contained no run UUIDs; this revision does not manufacture one for it. Its automatic three-board concatenation and unbounded thirty-minute loop are historical design code, not the active quickstart.

The old missing-data fallbacks could report malformed responses as empty success. Enumerated ranks could replace Weibo source positions, and platform-plus-title keys could imply identity that the source did not supply. This revision replaces those recommendations. A future scheduled collector would need separately approved scope, budget, observation windows, persistent state, deduplication, failure handling, and source-specific comparison rules. No deployed dashboard, complete inventory, new continuation, or tested collection cadence is claimed here.

Cost and the next request

November 8 inspection lists Bilibili and Zhihu at $0.001 each; the independent Weibo reference is also $0.001. They are eligible for the organization’s shared 100-call daily allowance across eligible APIs, resetting at 00:00 UTC. Eligibility is not checked remaining balance or guaranteed free execution. Separately choosing two calls lists at $0.002, and deliberately choosing all three at $0.003 before quota effects. This arithmetic does not execute them; the code chooses one. Actual charges and failure-billing behavior were not retested.

For 401/403, check key access without printing secrets. For 429, inspect limits before planning another request. For a malformed shape or changed identity representation, stop the adapter and preserve the failed observation rather than fabricating a zero-ranked row. The useful next step is a verified source snapshot with its boundaries intact, not an automatic global trend score.

FAQ

Can I sort all three platforms by heat? No shared scale has been established. Keep the provider metrics in separate source panels.

Does Bilibili limit default to ten? No. It is required and has example ten, with no declared default or bounds. The code chooses ten explicitly.

Did Zhihu return fifty questions in this review? No. Only an undated, trimmed README row is available; there was no new request or complete saved result.

How do I preserve the Zhihu question ID? Decode the original integer token losslessly, then derive a string. Do not stringify an already-rounded JavaScript number.

Can the same title prove a cross-platform trend? No. Source identity and comparable observation times require separate validation, and these references are not synchronized.

Found this useful? Share it