FetchPI
登入
← 瀏覽全部 API

西瓜影片 user_posts API

一次 REST 呼叫取得 西瓜影片 user_posts 資料——以 FetchPI 全平台共用的穩定 JSON 結構標準化輸出。

  • 1 個已發布端點
  • GET /v1/xigua/users/{username}/posts

契約摘要(英文): List Xigua user videos (capability xigua.user_posts)

標準化回應實體
xigua/user_posts
capability
xigua.user_posts

每個回應都附帶新鮮度(cache / default / live)與計費中繼資料。

使用場景

  • 按順序監測 {{platform}} 帳號發布的內容,每筆都帶標準化指標。
  • 排程任務重新查詢該 feed 即可發現新動態,適合告警與摘要流程。
  • 用口徑一致的結構化輸出,橫向比較各帳號的發文節奏與互動表現。

回應欄位

Xigua Video xigua.user_posts response (normalized envelope)

Response envelope of the /v1/xigua xigua.user_posts capability. Cursor is opaque and platform-independent; page size follows the request's `limit` parameter (1..100, default 20).

欄位類型必填說明
datapost[]必填—
next_cursorstring | null必填Opaque pagination cursor; null when the list is exhausted.
meta.request_idstring必填—
meta.freshness.modecache | default | live必填—
meta.freshness.age_secondsinteger | null可選—
meta.freshness.source_layercache | db | upstream必填—
meta.freshness.staleboolean可選—
meta.billing.cache_hitboolean必填—
meta.billing.amount_creditsinteger必填Credits actually charged for this request (the settlement unit; 1 credit = $0.0001, permanent).

欄位備註為契約英文原文。

回應中繼資料

欄位類型必填說明
modecache | default | live必填Effective mode after merging param > max_age > source policy (D-004).
age_secondsinteger | null可選Age of served data; null when unknown.
source_layercache | db | upstream必填Which layer served the response (PRD §10).
staleboolean可選True when stale data was served under stale_if_error / SWR (D-004).
billing.amount_creditsinteger必填Micro-USD (1e-6 USD) actually charged for this request.
billing.cache_hitboolean必填—

欄位備註為契約英文原文。

請求與回應範例

GET/v1/xigua/users/{username}/posts
curl -H "Authorization: Bearer $MESHDATA_API_KEY" \
  "https://api.fetchpi.com/v1/xigua/users/newdev/posts"
{
  "data": [
    {
      "id": "7413050000000001001",
      "platform": "xigua",
      "type": "post",
      "author": {
        "id": "7004994945115",
        "username": "meshdata_xigua",
        "display_name": "MeshData 西瓜号",
        "verified": false
      },
      "title": "西瓜视频:一条中视频",
      "text": "中视频格式的数据 API 演示。",
      "created_at": "2026-09-15T08:30:00Z",
      "metrics": {
        "likes": 5120,
        "comments": 320,
        "shares": 140,
        "views": 880000
      },
      "attachments": [
        {
          "type": "video",
          "preview_image_url": "https://cdn.example.com/cover/xigua-7413050000000001001.jpeg",
          "duration_ms": 732000
        }
      ],
      "fetched_at": "2026-09-21T09:00:00Z"
    }
  ],
  "next_cursor": null,
  "meta": {
    "request_id": "req_01HTXQ8Z9HTQ",
    "freshness": {
      "mode": "default",
      "age_seconds": 0,
      "source_layer": "upstream",
      "stale": false
    },
    "billing": {
      "amount_credits": 200,
      "cache_hit": false
    }
  }
}

免費試用

註冊免費帳號、取得 API Key,即可在瀏覽器版 Playground 直接呼叫該端點。

在 Playground 試用

該端點的參數表、錯誤碼與回應語義見 API 文件。

查看端點參考

常見問題

可以按排程輪詢 feed 嗎?

可以——這就是普通的 REST 呼叫,任何排程器都能定期查詢。用新鮮度參數控制每次回傳的資料新舊與計費方式。

可以免費試用該端點嗎?

可以——註冊帳號、取得 API Key 後,即可在主控台的 Playground 呼叫該端點。

user_posts 能力怎麼計費?

Data API 按請求以點數計費,cache/live 新鮮度有不同倍率。目前各能力的價格以價格頁為準。

價格

按請求以點數計費,支援 cache/live 新鮮度選項——最新價格以價格頁為準。