文档
API 参考与指南:认证、错误码、分页、新鲜度与 X 端点。
OpenAPI 1.0.0
快速开始
5 分钟快速开始
三步完成从零到第一个结构化响应:
- 注册账号——注册同时会创建您的默认 Workspace。 注册
- 在控制台创建 API Key。Secret 仅展示一次,请妥善保存。 创建 API Key
- 使用该 Key 作为 Bearer Token 调用任意端点:
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/x/users/newdev?freshness=default"AI Agent 接入
FetchPI 为 AI Agent 而建:目录、契约与分步指引均为机器可读的静态文件,与本站数据同源生成。
- /llms.txt — 面向 Agent 的站点索引:哪些平台可用、文档与价格入口在哪。
- /SKILL.md — Agent 分步指引:查目录 → 读 schema → 调用 → 看用量,含计费规则。
- /openapi.yaml — 公开 OpenAPI 子集:全部 /v1 数据路径与目录;不含管理面与控制台面。
Agent 工作流:先查目录确认可用性与价格,调用前读 schema,每次请求带一个 API Key,重复查询优先 freshness=cache,拿到答案即停止翻页。
认证
所有 /v1/* 端点都通过 API Key 认证:以 HTTP Bearer Token 方式发送。Key 使用 fp_live_… / fp_test_… 前缀。
Authorization: Bearer fp_live_…请像对待密码一样保管 Secret:它只在创建时展示一次。如疑似泄露,请吊销该 Key 并重新创建。
错误码
所有非 2xx 响应使用统一信封:包含稳定机器可读错误码的 error 对象,以及联系支持时可引用的 request_id。
{
"error": {
"code": "NOT_FOUND",
"message": "API key not found."
},
"request_id": "req_01HTXQ8Z9HTQ"
}| 错误码 | HTTP 状态 | 说明 | 常见触发场景 |
|---|---|---|---|
| UNAUTHENTICATED | 401 | API Key / 会话缺失或无效。 | 数据 API 缺少或携带无效 API Key;控制台会话缺失或已过期。 |
| FORBIDDEN | 403 | 已认证,但该 Key 无权使用此能力。 | Key ACL 未授权该能力、RBAC 拒绝该操作,或工作区 Credits 已冻结(CREDITS_FROZEN)。 |
| NOT_FOUND | 404 | 目标资源不存在或对您不可见。 | 资源不存在或对当前工作区不可见(如 API Key、数据集或订单号)。 |
| DATA_NOT_FOUND | 404 | 无可用数据——例如 cache 模式下没有缓存实体。 | cache 模式下没有缓存数据,或平台用户不存在。 |
| METHOD_NOT_ALLOWED | — | 该路径不支持此 HTTP 方法。 | 对现有路径使用了不支持的 HTTP 方法(如对仅支持 GET 的端点发起 POST)。 |
| VALIDATION | 400 | 请求参数校验失败;详见 error.details.fields。 | 请求参数未通过校验:limit 超出范围、cursor 非法、ID 格式错误等;详见 error.details.fields。 |
| CONFLICT | 409 | 状态冲突,例如资源重复或幂等键被复用。 | 与当前状态冲突,如资源重复或幂等键被复用。 |
| RATE_LIMIT_EXCEEDED | 429 | 请求过于频繁——这是所有限流闸门统一的 429 代码(details.scope 标明具体闸门);请遵循 Retry-After 稍后重试。 | 被任一限流闸门拒绝:Key 分钟窗口、工作区小时窗口、Key 附加小时上限或 RPS 桶(details.scope 标明闸门);请按 Retry-After 重试。 |
| RATE_LIMITER_UNAVAILABLE | 503 | 限流服务后端暂不可用;请求已被拒绝且未消耗配额——请按 Retry-After 稍后重试。 | 共享限流存储(Redis)暂时不可用,请求按 fail-closed 拒绝且不消耗配额。 |
| REGISTRATION_DISABLED | 403 | 注册已关闭——请改用 Google 或 GitHub 登录。 | 部署已关闭直接注册,请改用 Google/GitHub 登录。 |
| OAUTH_PROVIDER_UNAVAILABLE | 404 | 该登录方式暂时不可用;请尝试其他登录方式。 | 该登录提供商未在此部署配置或暂时不可用。 |
| PASSWORD_CHANGE_REQUIRED | — | 您的密码已被运营人员重置,需先修改密码后才能继续。 | 运营人员重置密码后,需先修改密码才能继续使用会话。 |
| INSUFFICIENT_CREDITS | 402 | Credits 不足,请充值后重试。 | 工作区 Credits 余额低于本次请求价格;details 携带所需/可用 Credits。 |
| CREDITS_FROZEN | 403 | 该工作区 Credits 已冻结——充值仍可用,但解冻前数据 API 请求将被拒绝。 | 支付回滚(深度重组)后 Credits 被冻结:充值可用,数据 API 请求被拒。 |
| NOT_IMPLEMENTED | 501 | 该能力已保留但在 V1 未实现。 | 该能力已预留但 V1 未实现。 |
| UPSTREAM_ERROR | 502 | 所有可用的上游数据通道均失败;该请求不计费。 | 所有可用上游数据路径均失败;本请求不计费。 |
| INTERNAL | default | 意外服务器错误;反馈时请提供 request_id。 | 服务器内部错误;反馈时请提供 request_id。 |
| PAYMENT_AMOUNT_UNAVAILABLE | 402 | 该充值金额的名额已全部占用;请更换金额或稍后重试。 | 该充值金额的名额已全部占用;请更换金额或稍后重试。 |
| PAYMENT_NETWORK_DISABLED | 400 | 所选网络/资产当前不接受下单。 | 所选网络/资产当前暂停受理充值订单。 |
| PAYMENT_ORDER_EXPIRED | — | 支付订单已超出支付窗口,无法继续支付;请重新创建订单。 | 订单已超出 30 分钟支付窗口,无法继续支付;请重新创建订单。 |
| PAYMENT_PENDING_LIMIT | 409 | 工作区进行中的支付订单已达上限;请先完成或等待现有订单过期。 | 待支付订单数已达上限;请先完成支付或等待订单过期。 |
| PAYMENT_DUPLICATE_RATE | 409 | 该幂等键已被用不同的订单条件使用过;请沿用原订单或更换新的幂等键。 | 幂等键已用于不同的订单条件;请复用原订单或更换键。 |
| PAYMENT_RATE_STALE | 409 | 该币种的汇率行情已过期;充值下单暂时被拒绝,请稍后再试。 | 汇率数据过期,新充值订单暂时被拒;请稍后重试。 |
| DATASET_NOT_AVAILABLE | 409 | 该数据集当前不可下单——处于收录中或已暂停(合规)状态。 | 该数据集正在收集或已暂停(合规);暂不接单。 |
| DATASET_DUPLICATE_ORDER | 409 | 该幂等键已用于不同的数据集订单;请复用原订单或更换新键。 | 幂等键已用于不同的数据集订单;请复用原订单或更换键。 |
| PAYMENT_PROVIDER_DISABLED | 400 | 该支付渠道已停用或未配置。 | 支付提供商已停用或未配置。 |
| CUSTOM_REQUEST_LIMIT_EXCEEDED | 403 | 已达定制服务请求配额——每个自然月最多 5 个进行中的定制数据请求,请下月再试。 | 定制服务月度配额已超——自然月内进行中的定制数据请求超过 5 个(业务配额,绝非 429 限流)。 |
| SITE_BUILD_NOT_CONFIGURED | — | 官网重建 Webhook 未配置。 | 管理端触发了官网重建,但服务端未配置重建 Webhook 地址。 |
分页
列表端点使用游标分页:传入 limit(1–100,默认 20)与 cursor;响应中的 next_cursor 指向下一页。
GET /v1/x/users/newdev/posts?limit=20&cursor=eyJpZCI6MTAwfQ列表取完后 next_cursor 为 null(或缺失)。游标是不透明字符串——请勿解析,也不要在数据源切换后继续依赖旧游标。
新鲜度
每个数据端点都支持 freshness(cache | default | live)与 max_age(秒)。freshness 优先于 max_age,max_age 优先于平台 TTL;默认为 default。
freshness=cache
绝不访问上游。无缓存数据时返回 404 DATA_NOT_FOUND。
freshness=default
由平台按 TTL 与源策略决定:缓存、已存储或新获取的数据。
freshness=live
请求实时重新抓取,可能产生额外费用(实时倍率)。失败返回 502 UPSTREAM_ERROR——绝不伪造新数据。
每个数据响应都会在 meta.freshness 中报告实际生效的模式、数据年龄与服务层级,详见下方“响应元数据”。
速率限制
请求按 API Key(及 Workspace)进行限流。超限返回 429 RATE_LIMITED,并附带以秒为单位的 Retry-After 响应头。
每个 Key 的请求上限与月度消费上限均可在控制台中配置。
响应元数据
所有 /v1/* 成功响应都带 meta.request_id,以及新鲜度与计费元数据:
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
| mode | cache | default | live | 必填 | Effective mode after merging param > max_age > source policy (D-004). |
| age_seconds | integer | null | 可选 | Age of served data; null when unknown. |
| source_layer | cache | db | upstream | 必填 | Which layer served the response (PRD §10). |
| stale | boolean | 可选 | True when stale data was served under stale_if_error / SWR (D-004). |
| billing.amount_credits | integer | 必填 | Micro-USD (1e-6 USD) actually charged for this request. |
| billing.cache_hit | boolean | 必填 | — |
字段备注为契约英文原文。
API 端点
全部 28 个平台共 176 个已文档化的端点,按平台分组,含参数、响应与示例载荷;归一化 Schema 见各产品详情页。
/v1/x/users/{username}x.profileX 用户资料
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | X 账号(handle),不带 @。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404DATA_NOT_FOUND
- 404NOT_FOUND
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — 暂无可用数据(例如 cache-only 模式下没有缓存实体,或用户名不存在)。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/x/users/newdev"响应示例
{
"data": {
"id": "2244994945",
"platform": "x",
"type": "profile",
"username": "newdev",
"display_name": "New Dev",
"description": "Building data APIs.",
"url": "https://x.com/newdev",
"profile_image_url": "https://cdn.example.com/avatar/newdev.jpg",
"banner_image_url": null,
"location": "Berlin",
"verified": false,
"created_at": "2019-04-01T10:15:00Z",
"metrics": {
"followers": 1204,
"following": 312,
"posts": 870,
"likes": 15200
},
"fetched_at": "2026-09-18T09:00:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 120,
"source_layer": "db",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}/v1/x/users/{username}/postsx.user_postsX 用户帖子
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | X 账号(handle),不带 @。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404NOT_FOUND
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — 用户名不存在。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/x/users/newdev/posts"响应示例
{
"data": [
{
"id": "1842951234567890123",
"platform": "x",
"type": "post",
"author": {
"id": "2244994945",
"username": "newdev",
"display_name": "New Dev",
"verified": false
},
"text": "One API for internet data.",
"lang": "en",
"created_at": "2026-09-17T12:34:56Z",
"metrics": {
"likes": 128,
"reposts": 12,
"replies": 4,
"quotes": 1,
"views": 5230
},
"in_reply_to": null,
"attachments": [],
"fetched_at": "2026-09-18T09:00:00Z"
},
{
"id": "1842909876543210987",
"platform": "x",
"type": "post",
"author": {
"id": "2244994945",
"username": "newdev",
"display_name": "New Dev",
"verified": false
},
"text": "Freshness modes explained.",
"lang": "en",
"created_at": "2026-09-16T08:00:00Z",
"metrics": {
"likes": 64,
"reposts": 3,
"replies": 1,
"quotes": 0,
"views": 1200
},
"in_reply_to": null,
"attachments": [
{
"type": "photo",
"url": "https://cdn.example.com/p/1.jpg",
"width": 1024,
"height": 512
}
],
"fetched_at": "2026-09-18T09:00:00Z"
}
],
"next_cursor": "eyJpZCI6IjE4MjkwMDAwMDAwMDAwMDAwIn0",
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 300,
"cache_hit": false
}
}
}/v1/x/posts/{id}x.postX 帖子详情
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | X 帖子 id(平台原生数字字符串)。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404DATA_NOT_FOUND
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — 缓存、数据库与上游均未找到该帖子。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/x/posts/1842951234567890123"响应示例
{
"data": {
"id": "1842951234567890123",
"platform": "x",
"type": "post",
"author": {
"id": "2244994945",
"username": "newdev",
"display_name": "New Dev",
"verified": false
},
"text": "One API for internet data.",
"lang": "en",
"created_at": "2026-09-17T12:34:56Z",
"metrics": {
"likes": 128,
"reposts": 12,
"replies": 4,
"quotes": 1,
"views": 5230
},
"in_reply_to": null,
"attachments": [],
"fetched_at": "2026-09-18T07:30:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 3600,
"source_layer": "cache",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": true
}
}
}/v1/x/posts/{id}/commentsx.commentsX 帖子评论
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | X 帖子 id(平台原生数字字符串)。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404DATA_NOT_FOUND
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — 帖子不存在。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/x/posts/1842951234567890123/comments"响应示例
{
"data": [
{
"id": "1842951999999999999",
"platform": "x",
"type": "comment",
"post_id": "1842951234567890123",
"author": {
"id": "1122334455",
"username": "curiouscat",
"display_name": "Curious Cat",
"verified": false
},
"text": "Great post!",
"created_at": "2026-09-17T13:00:00Z",
"metrics": {
"likes": 3
},
"fetched_at": "2026-09-18T09:00:00Z"
}
],
"next_cursor": null,
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 600,
"source_layer": "db",
"stale": false
},
"billing": {
"amount_credits": 200,
"cache_hit": false
}
}
}/v1/x/search/postsx.search_postsX 搜索帖子
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| q | query | 必填 | string | 搜索关键词。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404DATA_NOT_FOUND
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — cache-only 模式且无结果时,搜索不可用。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/x/search/posts?q=fetchpi"响应示例
{
"data": [
{
"id": "1841001111111111111",
"platform": "x",
"type": "post",
"author": {
"id": "5566778899",
"username": "datafan",
"display_name": "Data Fan",
"verified": true
},
"text": "fetchpi launch day!",
"lang": "en",
"created_at": "2026-09-15T10:00:00Z",
"metrics": {
"likes": 9,
"reposts": 2,
"replies": 0,
"quotes": 0,
"views": 340
},
"in_reply_to": null,
"attachments": [],
"fetched_at": "2026-09-18T09:05:00Z"
}
],
"next_cursor": null,
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "live",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 300,
"cache_hit": false
}
}
}/v1/x/users/{username}/followersx.user_followers获取粉丝列表
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | X 账号(handle),不带 @。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — 用户名不存在。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/x/users/newdev/followers"响应示例
{
"data": [
{
"id": "2244994945",
"platform": "x",
"type": "profile",
"username": "newdev",
"display_name": "New Dev",
"description": "Building data APIs.",
"url": "https://x.com/newdev",
"profile_image_url": "https://cdn.example.com/avatar/newdev.jpg",
"banner_image_url": null,
"location": "Berlin",
"verified": false,
"created_at": "2019-04-01T10:15:00Z",
"metrics": {
"followers": 1204,
"following": 312,
"posts": 870,
"likes": 15200
},
"fetched_at": "2026-09-18T09: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
}
}
}/v1/x/users/{username}/followingx.user_following获取关注列表
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | X 账号(handle),不带 @。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — 用户名不存在。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/x/users/newdev/following"响应示例
{
"data": [
{
"id": "2244994945",
"platform": "x",
"type": "profile",
"username": "newdev",
"display_name": "New Dev",
"description": "Building data APIs.",
"url": "https://x.com/newdev",
"profile_image_url": "https://cdn.example.com/avatar/newdev.jpg",
"banner_image_url": null,
"location": "Berlin",
"verified": false,
"created_at": "2019-04-01T10:15:00Z",
"metrics": {
"followers": 1204,
"following": 312,
"posts": 870,
"likes": 15200
},
"fetched_at": "2026-09-18T09: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
}
}
}/v1/x/users/{username}/repliesx.user_replies获取用户回复列表
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | X 账号(handle),不带 @。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — 用户名不存在。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/x/users/newdev/replies"响应示例
{
"data": [
{
"id": "1842951234567890123",
"platform": "x",
"type": "post",
"author": {
"id": "2244994945",
"username": "newdev",
"display_name": "New Dev",
"verified": false
},
"text": "One API for internet data.",
"lang": "en",
"created_at": "2026-09-17T12:34:56Z",
"metrics": {
"likes": 128,
"reposts": 12,
"replies": 4,
"quotes": 1,
"views": 5230
},
"in_reply_to": null,
"attachments": [],
"fetched_at": "2026-09-18T09: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
}
}
}/v1/x/users/{username}/mediax.user_media获取用户媒体列表
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | X 账号(handle),不带 @。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — 用户名不存在。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/x/users/newdev/media"响应示例
{
"data": [
{
"id": "1842951234567890123",
"platform": "x",
"type": "post",
"author": {
"id": "2244994945",
"username": "newdev",
"display_name": "New Dev",
"verified": false
},
"text": "One API for internet data.",
"lang": "en",
"created_at": "2026-09-17T12:34:56Z",
"metrics": {
"likes": 128,
"reposts": 12,
"replies": 4,
"quotes": 1,
"views": 5230
},
"in_reply_to": null,
"attachments": [],
"fetched_at": "2026-09-18T09: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
}
}
}/v1/x/trendsx.trends获取趋势
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| q | query | 可选 | string | 热搜的国家(可选)。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/x/trends?q=fetchpi"响应示例
{
"data": {
"platform": "x",
"type": "trends",
"country": "united states",
"trends": [
{
"name": "#FetchPI",
"post_count": 52341
},
{
"name": "Normalized Entities",
"post_count": 8800,
"url": "https://x.com/search?q=normalized"
}
],
"fetched_at": "2026-09-18T09:00:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}/v1/tiktok/users/{username}tiktok.profileTikTok 用户资料
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | TikTok uniqueId 账号,不带 @。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404DATA_NOT_FOUND
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — 暂无可用数据(例如 cache-only 模式下没有缓存实体,或用户名不存在)。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/tiktok/users/newdev"响应示例
{
"data": {
"id": "7004994945112",
"platform": "tiktok",
"type": "profile",
"username": "creatordev",
"display_name": "Creator Dev",
"description": "Short videos about data APIs.",
"url": "https://fetchpi.com",
"profile_image_url": "https://cdn.example.com/avatar/creatordev.jpg",
"verified": true,
"is_private": false,
"created_at": "2017-10-01T00:00:00Z",
"metrics": {
"followers": 88230,
"following": 412,
"posts": 356,
"likes": 2140000
},
"fetched_at": "2026-09-18T09:00:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 120,
"source_layer": "db",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}/v1/tiktok/users/{username}/poststiktok.user_postsTikTok 用户帖子列表
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | TikTok uniqueId 账号,不带 @。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — 用户名不存在。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/tiktok/users/newdev/posts"响应示例
{
"data": [
{
"id": "7410886000000000001",
"platform": "tiktok",
"type": "post",
"author": {
"id": "7004994945112",
"username": "creatordev",
"display_name": "Creator Dev",
"verified": true
},
"text": "One API for every platform.",
"created_at": "2026-09-17T12:34:56Z",
"metrics": {
"likes": 864,
"comments": 42,
"shares": 87,
"collects": 310,
"views": 154203
},
"attachments": [
{
"type": "video",
"preview_image_url": "https://cdn.example.com/cover.jpeg",
"duration_ms": 34567
}
],
"fetched_at": "2026-09-18T09:00:00Z"
},
{
"id": "7410886000000000002",
"platform": "tiktok",
"type": "post",
"author": {
"id": "7004994945112",
"username": "creatordev",
"display_name": "Creator Dev",
"verified": true
},
"text": "Photo dump from launch week.",
"created_at": "2026-09-16T08:00:00Z",
"metrics": {
"likes": 412,
"comments": 18,
"shares": 9,
"collects": 77,
"views": 52100
},
"attachments": [
{
"type": "photo",
"url": "https://cdn.example.com/p/1.jpeg"
}
],
"fetched_at": "2026-09-18T09:00:00Z"
}
],
"next_cursor": "eyJ2IjoxLCJzcmMiOiJ4dGhpcmQiLCJwb3MiOiIxNzU4MzI2NDAwIn0",
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 200,
"cache_hit": false
}
}
}/v1/tiktok/posts/{id}tiktok.postTikTok 视频详情
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | TikTok 视频 id(平台原生数字字符串)。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404DATA_NOT_FOUND
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — 缓存、数据库与上游均未找到该帖子。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/tiktok/posts/1842951234567890123"响应示例
{
"data": {
"id": "7410886000000000001",
"platform": "tiktok",
"type": "post",
"author": {
"id": "7004994945112",
"username": "creatordev",
"display_name": "Creator Dev",
"verified": true
},
"text": "One API for every platform.",
"created_at": "2026-09-17T12:34:56Z",
"metrics": {
"likes": 864,
"comments": 42,
"shares": 87,
"collects": 310,
"views": 154203
},
"attachments": [
{
"type": "video",
"preview_image_url": "https://cdn.example.com/cover.jpeg",
"duration_ms": 34567
}
],
"fetched_at": "2026-09-18T07:30:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 3600,
"source_layer": "cache",
"stale": false
},
"billing": {
"amount_credits": 0,
"cache_hit": true
}
}
}/v1/tiktok/posts/{id}/commentstiktok.commentsTikTok 视频评论
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | TikTok 视频 id(平台原生数字字符串)。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404DATA_NOT_FOUND
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — 帖子不存在。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/tiktok/posts/1842951234567890123/comments"响应示例
{
"data": [
{
"id": "7411111111000000001",
"platform": "tiktok",
"type": "comment",
"post_id": "7410886000000000001",
"author": {
"id": "3311223344",
"username": "curiousfan",
"display_name": "Curious Fan",
"verified": false
},
"text": "This is the future of data APIs.",
"created_at": "2026-09-17T13:00:00Z",
"metrics": {
"likes": 12,
"replies": 2
},
"fetched_at": "2026-09-18T09:00:00Z"
}
],
"next_cursor": null,
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 600,
"source_layer": "db",
"stale": false
},
"billing": {
"amount_credits": 200,
"cache_hit": false
}
}
}/v1/tiktok/search/poststiktok.search_postsTikTok 搜索视频
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| q | query | 必填 | string | 搜索关键词。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404DATA_NOT_FOUND
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — cache-only 模式且无结果时,搜索不可用。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/tiktok/search/posts?q=fetchpi"响应示例
{
"data": [
{
"id": "7410999000000000001",
"platform": "tiktok",
"type": "post",
"author": {
"id": "5566778899001",
"username": "datafan",
"display_name": "Data Fan",
"verified": true
},
"text": "normalized entities for every feed!",
"created_at": "2026-09-15T10:00:00Z",
"metrics": {
"likes": 91,
"comments": 3,
"shares": 12,
"collects": 24,
"views": 40320
},
"attachments": [
{
"type": "video",
"preview_image_url": "https://cdn.example.com/s1.jpeg",
"duration_ms": 21000
}
],
"fetched_at": "2026-09-18T09:05:00Z"
}
],
"next_cursor": null,
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "live",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 300,
"cache_hit": false
}
}
}/v1/tiktok/posts/{id}/comments/{comment_id}/repliestiktok.comment_replies获取评论回复列表
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | TikTok 视频 id(平台原生数字字符串)。 |
| comment_id | path | 必填 | string | 父评论 id,列出其回复。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404DATA_NOT_FOUND
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — 帖子不存在。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/tiktok/posts/1842951234567890123/comments/9901222200001001/replies"响应示例
{
"data": [
{
"id": "7411111111000000001",
"platform": "tiktok",
"type": "comment",
"post_id": "7410886000000000001",
"author": {
"id": "3311223344",
"username": "curiousfan",
"display_name": "Curious Fan",
"verified": false
},
"text": "This is the future of data APIs.",
"created_at": "2026-09-17T13:00:00Z",
"metrics": {
"likes": 12,
"replies": 2
},
"fetched_at": "2026-09-18T09: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
}
}
}/v1/tiktok/users/{username}/followerstiktok.user_followers获取粉丝列表
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | TikTok uniqueId 账号,不带 @。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — 用户名不存在。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/tiktok/users/newdev/followers"响应示例
{
"data": [
{
"id": "7004994945112",
"platform": "tiktok",
"type": "profile",
"username": "creatordev",
"display_name": "Creator Dev",
"description": "Short videos about data APIs.",
"url": "https://fetchpi.com",
"profile_image_url": "https://cdn.example.com/avatar/creatordev.jpg",
"verified": true,
"is_private": false,
"created_at": "2017-10-01T00:00:00Z",
"metrics": {
"followers": 88230,
"following": 412,
"posts": 356,
"likes": 2140000
},
"fetched_at": "2026-09-18T09: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
}
}
}/v1/tiktok/users/{username}/followingtiktok.user_following获取关注列表
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | TikTok uniqueId 账号,不带 @。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — 用户名不存在。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/tiktok/users/newdev/following"响应示例
{
"data": [
{
"id": "7004994945112",
"platform": "tiktok",
"type": "profile",
"username": "creatordev",
"display_name": "Creator Dev",
"description": "Short videos about data APIs.",
"url": "https://fetchpi.com",
"profile_image_url": "https://cdn.example.com/avatar/creatordev.jpg",
"verified": true,
"is_private": false,
"created_at": "2017-10-01T00:00:00Z",
"metrics": {
"followers": 88230,
"following": 412,
"posts": 356,
"likes": 2140000
},
"fetched_at": "2026-09-18T09: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
}
}
}/v1/tiktok/search/userstiktok.search_users搜索用户
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| q | query | 必填 | string | 搜索关键词。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404DATA_NOT_FOUND
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — cache-only 模式且无结果时,搜索不可用。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/tiktok/search/users?q=fetchpi"响应示例
{
"query": "data api",
"data": [
{
"id": "7004994945112",
"platform": "tiktok",
"type": "profile",
"username": "creatordev",
"display_name": "Creator Dev",
"description": "Short videos about data APIs.",
"url": "https://fetchpi.com",
"profile_image_url": "https://cdn.example.com/avatar/creatordev.jpg",
"verified": true,
"is_private": false,
"created_at": "2017-10-01T00:00:00Z",
"metrics": {
"followers": 88230,
"following": 412,
"posts": 356,
"likes": 2140000
},
"fetched_at": "2026-09-18T09:00:00Z"
}
],
"next_cursor": null,
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 300,
"cache_hit": false
}
}
}/v1/tiktok/hashtags/{tag}tiktok.hashtag获取话题详情
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| tag | path | 必填 | string | TikTok 话题名(不含 #);在帖子列表端点则为按原样转发的上游挑战 id。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/tiktok/hashtags/trending"响应示例
{
"data": {
"id": "1600000000000000001",
"platform": "tiktok",
"type": "hashtag",
"name": "fetchpi",
"description": "One API for every platform feed.",
"cover_image_url": "https://p19-sign-sg.tiktokcdn.com/aweme/hashtag/fetchpi.jpeg",
"metrics": {
"views": 4820000000
},
"fetched_at": "2026-09-18T09:00:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}/v1/tiktok/hashtags/{tag}/poststiktok.hashtag_posts获取话题视频列表
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| tag | path | 必填 | string | TikTok 话题名(不含 #);在帖子列表端点则为按原样转发的上游挑战 id。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/tiktok/hashtags/trending/posts"响应示例
{
"data": [
{
"id": "7410886000000000001",
"platform": "tiktok",
"type": "post",
"author": {
"id": "7004994945112",
"username": "creatordev",
"display_name": "Creator Dev",
"verified": true
},
"text": "One API for every platform.",
"created_at": "2026-09-17T12:34:56Z",
"metrics": {
"likes": 864,
"comments": 42,
"shares": 87,
"collects": 310,
"views": 154203
},
"attachments": [
{
"type": "video",
"preview_image_url": "https://cdn.example.com/cover.jpeg",
"duration_ms": 34567
}
],
"fetched_at": "2026-09-18T09: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
}
}
}/v1/tiktok/musics/{id}tiktok.music获取音乐详情
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | TikTok 平台原生媒体 id(/musics 为音乐 id、/live 为直播间 id、/download 为视频 id)。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/tiktok/musics/1842951234567890123"响应示例
{
"data": {
"id": "7416880000000000001",
"platform": "tiktok",
"type": "music",
"title": "Sim Song (prod. Creator Dev)",
"author_name": "Creator Dev",
"duration_ms": 34567,
"cover_image_url": "https://p16-sign-sg.tiktokcdn.com/aweme/music/7416880000000000001.jpeg",
"metrics": {
"videos": 128000
},
"fetched_at": "2026-09-18T09:00:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}/v1/tiktok/live/{id}tiktok.live_room获取直播间信息
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | TikTok 平台原生媒体 id(/musics 为音乐 id、/live 为直播间 id、/download 为视频 id)。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/tiktok/live/1842951234567890123"响应示例
{
"data": {
"id": "8800000000000000001",
"platform": "tiktok",
"type": "live_room",
"title": "Live: normalized entities Q&A",
"username": "creatordev",
"display_name": "Creator Dev",
"status": "LIVE",
"viewer_count": 2345,
"started_at": "2026-09-20T00:00:00Z",
"cover_image_url": "https://p19-sign-sg.tiktokcdn.com/aweme/live/8800000000000000001.jpeg",
"fetched_at": "2026-09-18T09:00:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}/v1/tiktok/search/livetiktok.live_search搜索直播
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| q | query | 必填 | string | 搜索关键词。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404DATA_NOT_FOUND
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — cache-only 模式且无结果时,搜索不可用。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/tiktok/search/live?q=fetchpi"响应示例
{
"query": "data talk",
"data": [
{
"id": "8800000000000000001",
"platform": "tiktok",
"type": "live_room",
"title": "Live: normalized entities Q&A",
"username": "creatordev",
"display_name": "Creator Dev",
"status": "LIVE",
"viewer_count": 2345,
"started_at": "2026-09-20T00:00:00Z",
"cover_image_url": "https://p19-sign-sg.tiktokcdn.com/aweme/live/8800000000000000001.jpeg",
"fetched_at": "2026-09-18T09:00:00Z"
}
],
"next_cursor": null,
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 300,
"cache_hit": false
}
}
}/v1/tiktok/homefeedtiktok.homefeed获取推荐流
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — 用户名不存在。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/tiktok/homefeed"响应示例
{
"data": [
{
"id": "7410886000000000001",
"platform": "tiktok",
"type": "post",
"author": {
"id": "7004994945112",
"username": "creatordev",
"display_name": "Creator Dev",
"verified": true
},
"text": "One API for every platform.",
"created_at": "2026-09-17T12:34:56Z",
"metrics": {
"likes": 864,
"comments": 42,
"shares": 87,
"collects": 310,
"views": 154203
},
"attachments": [
{
"type": "video",
"preview_image_url": "https://cdn.example.com/cover.jpeg",
"duration_ms": 34567
}
],
"fetched_at": "2026-09-18T09: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
}
}
}/v1/tiktok/download/{id}tiktok.download解析无水印下载
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | TikTok 平台原生媒体 id(/musics 为音乐 id、/live 为直播间 id、/download 为视频 id)。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/tiktok/download/1842951234567890123"响应示例
{
"data": {
"id": "7412050000000000001",
"platform": "tiktok",
"type": "download",
"play_url": "https://v16-webapp.tiktok.com/aweme/v1/play/?video_id=7412050000000000001&no-watermark=1",
"preview_image_url": "https://p19-sign-sg.tiktokcdn.com/aweme/cover/7412050000000000001.jpeg",
"duration_ms": 34567,
"fetched_at": "2026-09-18T09:00:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}/v1/ig/users/{username}ig.profileInstagram 用户资料
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | Instagram 用户名,不带 @。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404DATA_NOT_FOUND
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — 暂无可用数据(例如 cache-only 模式下没有缓存实体,或用户名不存在)。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/ig/users/newdev"响应示例
{
"data": {
"id": "1295448945",
"platform": "instagram",
"type": "profile",
"username": "creatordev",
"display_name": "Creator Dev",
"description": "Photo dumps and API graphs.",
"url": "https://fetchpi.com",
"profile_image_url": "https://cdn.example.com/profile_pic/creatordev.jpg",
"verified": true,
"is_private": false,
"created_at": null,
"metrics": {
"followers": 51230,
"following": 310,
"posts": 862
},
"fetched_at": "2026-09-18T09:00:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 120,
"source_layer": "db",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}/v1/ig/users/{username}/postsig.user_postsInstagram 用户帖子列表
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | Instagram 用户名,不带 @。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — 用户名不存在。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/ig/users/newdev/posts"响应示例
{
"data": [
{
"id": "CwxOne00001",
"platform": "instagram",
"type": "post",
"author": {
"id": "1295448945",
"username": "creatordev",
"display_name": "Creator Dev",
"verified": true
},
"text": "Carousel dump",
"created_at": "2026-09-17T12:34:56Z",
"metrics": {
"likes": 1204,
"comments": 36,
"views": 0
},
"attachments": [
{
"type": "photo",
"url": "https://cdn.example.com/1.jpg"
},
{
"type": "photo",
"url": "https://cdn.example.com/2.jpg"
}
],
"fetched_at": "2026-09-18T09:00:00Z"
},
{
"id": "CwxTwo00002",
"platform": "instagram",
"type": "post",
"author": {
"id": "1295448945",
"username": "creatordev",
"display_name": "Creator Dev",
"verified": true
},
"text": "Reel day",
"created_at": "2026-09-16T08:00:00Z",
"metrics": {
"likes": 640,
"comments": 21,
"views": 60110
},
"attachments": [
{
"type": "video",
"url": "https://cdn.example.com/reel2.mp4",
"duration_ms": 30100
}
],
"fetched_at": "2026-09-18T09:00:00Z"
}
],
"next_cursor": "QVFBQ2daOTItcGxhdGZvcm0",
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 200,
"cache_hit": false
}
}
}/v1/ig/posts/{id}ig.postInstagram 帖子详情
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | Instagram 帖子 SHORTCODE(即 /p/{code} 寻址键)。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404DATA_NOT_FOUND
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — 缓存、数据库与上游均未找到该帖子。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/ig/posts/1842951234567890123"响应示例
{
"data": {
"id": "Creel00001",
"platform": "instagram",
"type": "post",
"author": {
"id": "1295448945",
"username": "creatordev",
"display_name": "Creator Dev",
"verified": true
},
"text": "Reel day",
"created_at": "2026-09-17T12:34:56Z",
"metrics": {
"likes": 1204,
"comments": 36,
"views": 88231
},
"attachments": [
{
"type": "video",
"url": "https://cdn.example.com/reel.mp4",
"duration_ms": 32500
}
],
"fetched_at": "2026-09-18T07:30:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 3600,
"source_layer": "cache",
"stale": false
},
"billing": {
"amount_credits": 0,
"cache_hit": true
}
}
}/v1/ig/posts/{id}/commentsig.commentsInstagram 帖子评论
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | Instagram 帖子 SHORTCODE(即 /p/{code} 寻址键)。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404DATA_NOT_FOUND
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — 帖子不存在。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/ig/posts/1842951234567890123/comments"响应示例
{
"data": [
{
"id": "17990000000000001",
"platform": "instagram",
"type": "comment",
"post_id": "CwxOne00001",
"author": {
"id": "8811223344",
"username": "curiousfan",
"display_name": "Curious Fan",
"verified": false
},
"text": "Clean normalized shape!",
"created_at": "2026-09-17T13:00:00Z",
"metrics": {
"likes": 5
},
"fetched_at": "2026-09-18T09:00:00Z"
}
],
"next_cursor": null,
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 600,
"source_layer": "db",
"stale": false
},
"billing": {
"amount_credits": 200,
"cache_hit": false
}
}
}/v1/ig/search/postsig.search_postsInstagram 搜索帖子
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| q | query | 必填 | string | 搜索关键词。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404DATA_NOT_FOUND
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — cache-only 模式且无结果时,搜索不可用。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/ig/search/posts?q=fetchpi"响应示例
{
"data": [
{
"id": "Creel00001",
"platform": "instagram",
"type": "post",
"author": {
"id": "5566778899001",
"username": "datafan",
"display_name": "Data Fan",
"verified": true
},
"text": "search hit one",
"created_at": "2026-09-15T10:00:00Z",
"metrics": {
"likes": 341,
"comments": 12,
"views": 88231
},
"attachments": [
{
"type": "video",
"url": "https://cdn.example.com/reel1.mp4",
"duration_ms": 32500
}
],
"fetched_at": "2026-09-18T09:05:00Z"
}
],
"next_cursor": null,
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "live",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 300,
"cache_hit": false
}
}
}/v1/ig/posts/{id}/comments/{comment_id}/repliesig.comment_replies获取评论回复列表
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | Instagram 帖子 SHORTCODE(即 /p/{code} 寻址键)。 |
| comment_id | path | 必填 | string | 父评论 id,列出其回复。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404DATA_NOT_FOUND
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — 帖子不存在。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/ig/posts/1842951234567890123/comments/9901222200001001/replies"响应示例
{
"data": [
{
"id": "17990000000000001",
"platform": "instagram",
"type": "comment",
"post_id": "CwxOne00001",
"author": {
"id": "8811223344",
"username": "curiousfan",
"display_name": "Curious Fan",
"verified": false
},
"text": "Clean normalized shape!",
"created_at": "2026-09-17T13:00:00Z",
"metrics": {
"likes": 5
},
"fetched_at": "2026-09-18T09: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
}
}
}/v1/ig/users/{username}/followersig.user_followers获取粉丝列表
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | Instagram 用户名,不带 @。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — 用户名不存在。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/ig/users/newdev/followers"响应示例
{
"data": [
{
"id": "1295448945",
"platform": "instagram",
"type": "profile",
"username": "creatordev",
"display_name": "Creator Dev",
"description": "Photo dumps and API graphs.",
"url": "https://fetchpi.com",
"profile_image_url": "https://cdn.example.com/profile_pic/creatordev.jpg",
"verified": true,
"is_private": false,
"created_at": null,
"metrics": {
"followers": 51230,
"following": 310,
"posts": 862
},
"fetched_at": "2026-09-18T09: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
}
}
}/v1/ig/users/{username}/followingig.user_following获取关注列表
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | Instagram 用户名,不带 @。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — 用户名不存在。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/ig/users/newdev/following"响应示例
{
"data": [
{
"id": "1295448945",
"platform": "instagram",
"type": "profile",
"username": "creatordev",
"display_name": "Creator Dev",
"description": "Photo dumps and API graphs.",
"url": "https://fetchpi.com",
"profile_image_url": "https://cdn.example.com/profile_pic/creatordev.jpg",
"verified": true,
"is_private": false,
"created_at": null,
"metrics": {
"followers": 51230,
"following": 310,
"posts": 862
},
"fetched_at": "2026-09-18T09: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
}
}
}/v1/ig/search/usersig.search_users搜索用户
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| q | query | 必填 | string | 搜索关键词。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404DATA_NOT_FOUND
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — cache-only 模式且无结果时,搜索不可用。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/ig/search/users?q=fetchpi"响应示例
{
"query": "data api",
"data": [
{
"id": "1295448945",
"platform": "instagram",
"type": "profile",
"username": "creatordev",
"display_name": "Creator Dev",
"description": "Photo dumps and API graphs.",
"url": "https://fetchpi.com",
"profile_image_url": "https://cdn.example.com/profile_pic/creatordev.jpg",
"verified": true,
"is_private": false,
"created_at": null,
"metrics": {
"followers": 51230,
"following": 310,
"posts": 862
},
"fetched_at": "2026-09-18T09:00:00Z"
}
],
"next_cursor": null,
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 300,
"cache_hit": false
}
}
}/v1/ig/users/{username}/storiesig.stories获取快拍列表
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | Instagram 用户名,不带 @。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — 用户名不存在。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/ig/users/newdev/stories"响应示例
{
"data": [
{
"id": "CwxOne00001",
"platform": "instagram",
"type": "post",
"author": {
"id": "1295448945",
"username": "creatordev",
"display_name": "Creator Dev",
"verified": true
},
"text": "Carousel dump #1",
"created_at": "2026-09-17T12:34:56Z",
"metrics": {
"likes": 1204,
"comments": 36,
"views": 0
},
"attachments": [
{
"type": "photo",
"url": "https://cdn.example.com/1.jpg"
},
{
"type": "photo",
"url": "https://cdn.example.com/2.jpg"
}
],
"fetched_at": "2026-09-18T09: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
}
}
}/v1/ig/users/{username}/highlightsig.highlights获取精选集列表
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | Instagram 用户名,不带 @。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/ig/users/newdev/highlights"响应示例
{
"data": [
{
"id": "highlight_launch",
"platform": "instagram",
"type": "highlight",
"title": "Launch Week",
"username": "creatordev",
"cover_image_url": "https://scontent.cdninstagram.com/hl-launch.jpg",
"media_count": 3,
"fetched_at": "2026-09-18T09: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
}
}
}/v1/ig/posts/{id}/likersig.post_likers获取帖子点赞用户
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | Instagram 帖子 SHORTCODE(即 /p/{code} 寻址键)。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404DATA_NOT_FOUND
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — 缓存、数据库与上游均未找到该帖子。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/ig/posts/1842951234567890123/likers"响应示例
{
"data": [
{
"id": "1295448945",
"platform": "instagram",
"type": "profile",
"username": "creatordev",
"display_name": "Creator Dev",
"description": "Photo dumps and API graphs.",
"url": "https://fetchpi.com",
"profile_image_url": "https://cdn.example.com/profile_pic/creatordev.jpg",
"verified": true,
"is_private": false,
"created_at": null,
"metrics": {
"followers": 51230,
"following": 310,
"posts": 862
},
"fetched_at": "2026-09-18T09: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
}
}
}/v1/xhs/users/{username}xhs.profile小红书 用户资料
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | 小红书用户 id——上游按数字用户 id 寻址,调用值按原样转发(handle 换算是待上游校准项)。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404DATA_NOT_FOUND
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — 暂无可用数据(例如 cache-only 模式下没有缓存实体,或用户不存在)。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/xhs/users/newdev"响应示例
{
"data": {
"id": "66f2a1de000000001e0167a1",
"platform": "xiaohongshu",
"type": "profile",
"username": "creatordev",
"display_name": "Creator Dev",
"description": "Notes about data APIs.",
"profile_image_url": "https://cdn.example.com/avatar/creatordev.jpg",
"verified": true,
"created_at": null,
"metrics": {
"followers": 51230,
"following": 310,
"posts": 862,
"likes": 2140000
},
"fetched_at": "2026-09-18T09:00:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 120,
"source_layer": "db",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}/v1/xhs/users/{username}/postsxhs.user_posts小红书 用户帖子列表
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | 小红书用户 id——上游按数字用户 id 寻址,调用值按原样转发(handle 换算是待上游校准项)。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — 用户不存在。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/xhs/users/newdev/posts"响应示例
{
"data": [
{
"id": "66f2b1de000000001f0167a1",
"platform": "xiaohongshu",
"type": "post",
"author": null,
"title": "First note on the platform.",
"text": null,
"created_at": null,
"metrics": {
"likes": 512,
"collects": 0,
"comments": 0,
"shares": 0
},
"attachments": [
{
"type": "photo",
"url": "https://cdn.example.com/n1-cover.jpg"
}
],
"fetched_at": "2026-09-18T09:00:00Z"
},
{
"id": "66f2b1de000000001f0167a2",
"platform": "xiaohongshu",
"type": "post",
"author": null,
"title": "Freshness modes, explained in 30s.",
"text": null,
"created_at": null,
"metrics": {
"likes": 512,
"collects": 0,
"comments": 0,
"shares": 0
},
"attachments": [
{
"type": "video",
"preview_image_url": "https://cdn.example.com/n2-cover.jpg"
}
],
"fetched_at": "2026-09-18T09:00:00Z"
}
],
"next_cursor": "eyJ2IjoxLCJzcmMiOiJ4dGhpcmQiLCJwb3MiOiI2NmYyYjFkZTAwIn0",
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 200,
"cache_hit": false
}
}
}/v1/xhs/posts/{id}xhs.post小红书 帖子详情
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | 小红书笔记 id。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404DATA_NOT_FOUND
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — 缓存、数据库与上游均未找到该帖子。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/xhs/posts/1842951234567890123"响应示例
{
"data": {
"id": "66f2b1de000000001f0167a1",
"platform": "xiaohongshu",
"type": "post",
"author": {
"id": "66f2a1de000000001e0167a1",
"username": "creatordev",
"display_name": "Creator Dev",
"verified": true
},
"title": "One API for every feed.",
"text": "One API for every platform.",
"created_at": "2026-09-17T12:34:56Z",
"metrics": {
"likes": 1204,
"collects": 310,
"comments": 42,
"shares": 87
},
"attachments": [
{
"type": "video",
"url": "https://cdn.example.com/note.mp4",
"preview_image_url": "https://cdn.example.com/note-cover.jpg"
}
],
"fetched_at": "2026-09-18T07:30:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 3600,
"source_layer": "cache",
"stale": false
},
"billing": {
"amount_credits": 0,
"cache_hit": true
}
}
}/v1/xhs/posts/{id}/commentsxhs.comments小红书 帖子评论
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | 小红书笔记 id。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404DATA_NOT_FOUND
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — 帖子不存在。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/xhs/posts/1842951234567890123/comments"响应示例
{
"data": [
{
"id": "66f3a1de000000001f0267c1",
"platform": "xiaohongshu",
"type": "comment",
"post_id": "66f2b1de000000001f0167a1",
"author": {
"id": "66f1a1de000000001f0167d1",
"username": "curiousfan",
"display_name": "Curious Fan",
"verified": false
},
"text": "This is the future of data APIs.",
"created_at": "2026-09-17T13:06:40Z",
"metrics": {
"likes": 12,
"replies": 2
},
"fetched_at": "2026-09-18T09:00:00Z"
}
],
"next_cursor": null,
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 600,
"source_layer": "db",
"stale": false
},
"billing": {
"amount_credits": 200,
"cache_hit": false
}
}
}/v1/xhs/search/postsxhs.search_posts小红书 搜索帖子
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| q | query | 必填 | string | 搜索关键词。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404DATA_NOT_FOUND
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — cache-only 模式且无结果时,搜索不可用。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/xhs/search/posts?q=fetchpi"响应示例
{
"data": [
{
"id": "66f2c1de000000001f0167b1",
"platform": "xiaohongshu",
"type": "post",
"author": null,
"title": "search hit one",
"text": null,
"created_at": null,
"metrics": {
"likes": 512,
"collects": 0,
"comments": 0,
"shares": 0
},
"attachments": [
{
"type": "photo",
"url": "https://cdn.example.com/s1-cover.jpg"
}
],
"fetched_at": "2026-09-18T09:05:00Z"
}
],
"next_cursor": null,
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "live",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 300,
"cache_hit": false
}
}
}/v1/xhs/posts/{id}/comments/{comment_id}/repliesxhs.comment_replies获取评论回复列表
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | TikTok 视频 id(平台原生数字字符串)。 |
| comment_id | path | 必填 | string | 父评论 id,列出其子评论。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404DATA_NOT_FOUND
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — 帖子不存在。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/xhs/posts/1842951234567890123/comments/9901222200001001/replies"响应示例
{
"data": [
{
"id": "66f3a1de000000001f0267c1",
"platform": "xiaohongshu",
"type": "comment",
"post_id": "66f2b1de000000001f0167a1",
"author": {
"id": "66f1a1de000000001f0167d1",
"username": "curiousfan",
"display_name": "Curious Fan",
"verified": false
},
"text": "This is the future of data APIs.",
"created_at": "2026-09-17T13:06:40Z",
"metrics": {
"likes": 12,
"replies": 2
},
"fetched_at": "2026-09-18T09: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
}
}
}/v1/xhs/search/usersxhs.search_users搜索用户
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| q | query | 必填 | string | 搜索关键词。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404DATA_NOT_FOUND
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — cache-only 模式且无结果时,搜索不可用。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/xhs/search/users?q=fetchpi"响应示例
{
"query": "data api",
"data": [
{
"id": "66f2a1de000000001e0167a1",
"platform": "xiaohongshu",
"type": "profile",
"username": "creatordev",
"display_name": "Creator Dev",
"description": "Notes about data APIs.",
"profile_image_url": "https://cdn.example.com/avatar/creatordev.jpg",
"verified": true,
"created_at": null,
"metrics": {
"followers": 51230,
"following": 310,
"posts": 862,
"likes": 2140000
},
"fetched_at": "2026-09-18T09:00:00Z"
}
],
"next_cursor": null,
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 300,
"cache_hit": false
}
}
}/v1/xhs/homefeedxhs.homefeed获取推荐流
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — 用户名不存在。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/xhs/homefeed"响应示例
{
"data": [
{
"id": "66f2b1de000000001f0167a1",
"platform": "xiaohongshu",
"type": "post",
"author": {
"id": "66f2a1de000000001e0167a1",
"username": "creatordev",
"display_name": "Creator Dev",
"verified": true
},
"title": "One API for every feed.",
"text": "One API for every platform.",
"created_at": "2026-09-17T12:34:56Z",
"metrics": {
"likes": 1204,
"collects": 310,
"comments": 42,
"shares": 87
},
"attachments": [
{
"type": "video",
"url": "https://cdn.example.com/note.mp4",
"preview_image_url": "https://cdn.example.com/note-cover.jpg"
}
],
"fetched_at": "2026-09-18T09: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
}
}
}/v1/youtube/users/{username}youtube.profileYouTube 频道资料(频道即用户)
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | YouTube 频道 id(UC…)——频道即平台用户主体;上游按频道 id 寻址,调用值按原样转发(容错 handle 为待上游校准项)。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404DATA_NOT_FOUND
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — 暂无可用数据(例如 cache-only 模式下没有缓存实体,或频道不存在)。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/youtube/users/newdev"响应示例
{
"data": {
"id": "UCsim0000000000000000777",
"platform": "youtube",
"type": "profile",
"username": "creatordev",
"display_name": "Creator Dev",
"description": "Videos about data APIs.",
"url": "https://www.youtube.com/@creatordev",
"profile_image_url": "https://cdn.example.com/avatar/creatordev.jpg",
"verified": true,
"created_at": "2019-04-01T10:15:00Z",
"metrics": {
"subscribers": 51230,
"views": 19824567,
"posts": 862
},
"fetched_at": "2026-09-18T09:00:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 120,
"source_layer": "db",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}/v1/youtube/users/{username}/postsyoutube.user_postsYouTube 频道视频列表
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | YouTube 频道 id(UC…)——频道即平台用户主体;上游按频道 id 寻址,调用值按原样转发(容错 handle 为待上游校准项)。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — 频道不存在。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/youtube/users/newdev/posts"响应示例
{
"data": [
{
"id": "wSimVideo0001",
"platform": "youtube",
"type": "post",
"author": null,
"title": "First video on the platform.",
"text": null,
"created_at": "2026-09-16T08:00:00Z",
"metrics": {
"views": 0,
"likes": 0,
"comments": 0
},
"attachments": [
{
"type": "video",
"preview_image_url": "https://cdn.example.com/t1.jpg",
"duration_ms": 30000
}
],
"fetched_at": "2026-09-18T09:00:00Z"
},
{
"id": "wSimVideo0002",
"platform": "youtube",
"type": "post",
"author": null,
"title": "Freshness modes, explained in 30s.",
"text": null,
"created_at": "2026-09-15T08:00:00Z",
"metrics": {
"views": 52100,
"likes": 0,
"comments": 0
},
"attachments": [
{
"type": "video",
"preview_image_url": "https://cdn.example.com/t2.jpg",
"duration_ms": 30000
}
],
"fetched_at": "2026-09-18T09:00:00Z"
}
],
"next_cursor": "eyJ2IjoxLCJzcmMiOiJ4dGhpcmQiLCJwb3MiOiJDQlFTRCJ9",
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 200,
"cache_hit": false
}
}
}/v1/youtube/posts/{id}youtube.postYouTube 帖子详情
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | YouTube 视频 id。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404DATA_NOT_FOUND
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — 缓存、数据库与上游均未找到该帖子。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/youtube/posts/1842951234567890123"响应示例
{
"data": {
"id": "wSimVideo0001",
"platform": "youtube",
"type": "post",
"author": {
"id": "UCsim0000000000000000777",
"username": "creatordev",
"display_name": "Creator Dev",
"verified": true
},
"title": "One API for every platform.",
"text": "One API for every platform.",
"created_at": "2026-09-17T12:34:56Z",
"metrics": {
"views": 154203,
"likes": 864,
"comments": 42
},
"attachments": [
{
"type": "video",
"preview_image_url": "https://cdn.example.com/thumb.jpg",
"duration_ms": 212000
}
],
"fetched_at": "2026-09-18T07:30:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 3600,
"source_layer": "cache",
"stale": false
},
"billing": {
"amount_credits": 0,
"cache_hit": true
}
}
}/v1/youtube/posts/{id}/commentsyoutube.commentsYouTube 视频评论
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | YouTube 视频 id。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404DATA_NOT_FOUND
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — 帖子不存在。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/youtube/posts/1842951234567890123/comments"响应示例
{
"data": [
{
"id": "UgxSim000000000001",
"platform": "youtube",
"type": "comment",
"post_id": "wSimVideo0001",
"author": {
"id": "UCsimfan000000000001",
"username": "curiousfan",
"display_name": "Curious Fan",
"verified": false
},
"text": "This is the future of data APIs.",
"created_at": "2026-09-17T13:00:00Z",
"metrics": {
"likes": 12,
"replies": 2
},
"fetched_at": "2026-09-18T09:00:00Z"
}
],
"next_cursor": null,
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 600,
"source_layer": "db",
"stale": false
},
"billing": {
"amount_credits": 200,
"cache_hit": false
}
}
}/v1/youtube/search/postsyoutube.search_postsYouTube 搜索视频
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| q | query | 必填 | string | 搜索关键词。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404DATA_NOT_FOUND
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — cache-only 模式且无结果时,搜索不可用。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/youtube/search/posts?q=fetchpi"响应示例
{
"data": [
{
"id": "sSimVideo001",
"platform": "youtube",
"type": "post",
"author": {
"id": "UCsimsearch00000000001",
"username": "datafan",
"display_name": "Data Fan",
"verified": false
},
"title": "normalized entities for every feed!",
"text": null,
"created_at": null,
"metrics": {
"views": 0,
"likes": 0,
"comments": 0
},
"attachments": [],
"fetched_at": "2026-09-18T09:05:00Z"
}
],
"next_cursor": null,
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "live",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 300,
"cache_hit": false
}
}
}/v1/youtube/search/usersyoutube.search_users搜索频道
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| q | query | 必填 | string | 搜索关键词。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404DATA_NOT_FOUND
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — cache-only 模式且无结果时,搜索不可用。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/youtube/search/users?q=fetchpi"响应示例
{
"query": "data api",
"data": [
{
"id": "UCsim0000000000000000777",
"platform": "youtube",
"type": "profile",
"username": "creatordev",
"display_name": "Creator Dev",
"description": "Videos about data APIs.",
"url": "https://www.youtube.com/@creatordev",
"profile_image_url": "https://cdn.example.com/avatar/creatordev.jpg",
"verified": true,
"created_at": "2019-04-01T10:15:00Z",
"metrics": {
"subscribers": 51230,
"views": 19824567,
"posts": 862
},
"fetched_at": "2026-09-18T09:00:00Z"
}
],
"next_cursor": null,
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 300,
"cache_hit": false
}
}
}/v1/reddit/users/{username}reddit.profileReddit 用户资料
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | Reddit 用户名,不带 u/。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404DATA_NOT_FOUND
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — 暂无可用数据(例如 cache-only 模式下没有缓存实体,或用户名不存在)。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/reddit/users/newdev"响应示例
{
"data": {
"id": "1a2b3c",
"platform": "reddit",
"type": "profile",
"username": "creatordev",
"display_name": "Creator Dev",
"description": "Posts about data APIs.",
"profile_image_url": "https://cdn.example.com/avatar/creatordev.png",
"verified": true,
"created_at": "2019-04-01T08:15:00Z",
"metrics": {
"karma_posts": 8620,
"karma_comments": 15300,
"total_karma": 24100,
"followers": 4811
},
"fetched_at": "2026-09-18T09:00:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 120,
"source_layer": "db",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}/v1/reddit/users/{username}/postsreddit.user_postsReddit 用户帖子列表
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | Reddit 用户名,不带 u/。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — 用户名不存在。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/reddit/users/newdev/posts"响应示例
{
"data": [
{
"id": "1simpost01",
"platform": "reddit",
"type": "post",
"author": {
"id": "7004994945",
"username": "creatordev",
"display_name": null,
"verified": false
},
"title": "First post on the platform.",
"text": "One API for every platform.",
"url": "https://www.reddit.com/r/dataapi/comments/1simpost01/",
"created_at": "2026-09-16T19:23:20Z",
"metrics": {
"upvotes": 864,
"downvotes": 12,
"comments": 42
},
"attachments": [],
"fetched_at": "2026-09-18T09:00:00Z"
},
{
"id": "1simpost02",
"platform": "reddit",
"type": "post",
"author": {
"id": "7004994945",
"username": "creatordev",
"display_name": null,
"verified": false
},
"title": "Freshness modes, explained.",
"text": "One API for every platform.",
"url": "https://www.reddit.com/r/dataapi/comments/1simpost02/",
"created_at": "2026-09-16T08:00:00Z",
"metrics": {
"upvotes": 412,
"downvotes": 9,
"comments": 18
},
"attachments": [
{
"type": "photo",
"url": "https://cdn.example.com/p1-full.jpg",
"preview_image_url": "https://cdn.example.com/p1.jpg"
},
{
"type": "video",
"url": "https://cdn.example.com/p2.mp4",
"preview_image_url": "https://cdn.example.com/p2.jpg"
}
],
"fetched_at": "2026-09-18T09:00:00Z"
}
],
"next_cursor": "eyJ2IjoxLCJzcmMiOiJ4dGhpcmQiLCJwb3MiOiJ0M19zaW0ifQ",
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 200,
"cache_hit": false
}
}
}/v1/reddit/posts/{id}reddit.postReddit 帖子详情
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | Reddit 帖子 id(t3 base36,不带前缀)。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404DATA_NOT_FOUND
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — 缓存、数据库与上游均未找到该帖子。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/reddit/posts/1842951234567890123"响应示例
{
"data": {
"id": "1simpost01",
"platform": "reddit",
"type": "post",
"author": {
"id": "7004994945",
"username": "creatordev",
"display_name": null,
"verified": false
},
"title": "One API for every platform.",
"text": "One API for every platform.",
"url": "https://www.reddit.com/r/dataapi/comments/1simpost01/",
"created_at": "2026-09-17T12:34:56Z",
"metrics": {
"upvotes": 864,
"downvotes": 12,
"comments": 42
},
"attachments": [],
"fetched_at": "2026-09-18T07:30:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 3600,
"source_layer": "cache",
"stale": false
},
"billing": {
"amount_credits": 0,
"cache_hit": true
}
}
}/v1/reddit/posts/{id}/commentsreddit.commentsReddit 帖子评论
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | Reddit 帖子 id(t3 base36,不带前缀)。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404DATA_NOT_FOUND
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — 帖子不存在。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/reddit/posts/1842951234567890123/comments"响应示例
{
"data": [
{
"id": "simcomment1",
"platform": "reddit",
"type": "comment",
"post_id": "1simpost01",
"author": {
"id": "fan0000001",
"username": "curiousfan",
"display_name": null,
"verified": false
},
"text": "This is the future of data APIs.",
"created_at": "2026-09-17T13:06:40Z",
"metrics": {
"upvotes": 12,
"downvotes": 1
},
"fetched_at": "2026-09-18T09:00:00Z"
}
],
"next_cursor": null,
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 600,
"source_layer": "db",
"stale": false
},
"billing": {
"amount_credits": 200,
"cache_hit": false
}
}
}/v1/reddit/search/postsreddit.search_postsReddit 搜索帖子
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| q | query | 必填 | string | 搜索关键词。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404DATA_NOT_FOUND
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — cache-only 模式且无结果时,搜索不可用。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/reddit/search/posts?q=fetchpi"响应示例
{
"data": [
{
"id": "1simsear01",
"platform": "reddit",
"type": "post",
"author": {
"id": "5566778899",
"username": "datafan",
"display_name": null,
"verified": false
},
"title": "normalized entities for every feed!",
"text": "One API for every platform.",
"url": "https://www.reddit.com/r/dataapi/comments/1simsear01/",
"created_at": "2026-09-17T12:34:56Z",
"metrics": {
"upvotes": 91,
"downvotes": 2,
"comments": 3
},
"attachments": [],
"fetched_at": "2026-09-18T09:05:00Z"
}
],
"next_cursor": null,
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "live",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 300,
"cache_hit": false
}
}
}/v1/reddit/search/usersreddit.search_users搜索用户
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| q | query | 必填 | string | 搜索关键词。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404DATA_NOT_FOUND
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — cache-only 模式且无结果时,搜索不可用。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/reddit/search/users?q=fetchpi"响应示例
{
"query": "data api",
"data": [
{
"id": "1a2b3c",
"platform": "reddit",
"type": "profile",
"username": "creatordev",
"display_name": "Creator Dev",
"description": "Posts about data APIs.",
"profile_image_url": "https://cdn.example.com/avatar/creatordev.png",
"verified": true,
"created_at": "2019-04-01T08:15:00Z",
"metrics": {
"karma_posts": 8620,
"karma_comments": 15300,
"total_karma": 24100,
"followers": 4811
},
"fetched_at": "2026-09-18T09:00:00Z"
}
],
"next_cursor": null,
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 300,
"cache_hit": false
}
}
}/v1/reddit/subreddits/{name}/postsreddit.subreddit_posts获取版块帖子列表
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| name | path | 必填 | string | Subreddit 版名,不带 r/。 |
| sort | query | 可选 | hot | new | top = hot | Subreddit 帖子列表的上游信息流排序。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/reddit/subreddits/technology/posts"响应示例
{
"data": [
{
"id": "1simpost01",
"platform": "reddit",
"type": "post",
"author": {
"id": "7004994945",
"username": "creatordev",
"display_name": null,
"verified": false
},
"title": "One API for every platform.",
"text": "One API for every platform.",
"url": "https://www.reddit.com/r/dataapi/comments/1simpost01/",
"created_at": "2026-09-17T12:34:56Z",
"metrics": {
"upvotes": 864,
"downvotes": 12,
"comments": 42
},
"attachments": [],
"fetched_at": "2026-09-18T09: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
}
}
}/v1/reddit/users/{username}/commentsreddit.user_comments获取用户评论列表
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | Reddit 用户名,不带 u/。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — 用户名不存在。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/reddit/users/newdev/comments"响应示例
{
"data": [
{
"id": "simcomment1",
"platform": "reddit",
"type": "comment",
"post_id": "1simpost01",
"author": {
"id": "fan0000001",
"username": "curiousfan",
"display_name": null,
"verified": false
},
"text": "This is the future of data APIs.",
"created_at": "2026-09-17T13:06:40Z",
"metrics": {
"upvotes": 12,
"downvotes": 1
},
"fetched_at": "2026-09-18T09: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
}
}
}/v1/douyin/users/{username}douyin.profile抖音 用户资料
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | 抖音用户寻址键(sec_user_id)——上游按 sec_user_id 寻址,调用值按原样转发(handle 换算是待上游校准项)。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/douyin/users/newdev"响应示例
{
"data": {
"id": "7004994945113",
"platform": "douyin",
"type": "profile",
"username": "fetchpi_dev",
"display_name": "FetchPI 抖音站",
"description": "短视频形式的数据 API 教程。",
"url": "https://fetchpi.com",
"profile_image_url": "https://cdn.example.com/avatar/douyin-fetchpi.jpg",
"verified": true,
"created_at": "2019-06-01T00:00:00Z",
"metrics": {
"followers": 1288000,
"following": 88,
"posts": 412,
"likes": 18600000
},
"fetched_at": "2026-09-21T09:00:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}/v1/douyin/posts/{id}douyin.post抖音 视频详情
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | 抖音视频 id(平台原生 aweme id;也是 /download 的寻址键)。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/douyin/posts/1842951234567890123"响应示例
{
"data": {
"id": "7412050000000001001",
"platform": "douyin",
"type": "post",
"author": {
"id": "7004994945113",
"username": "fetchpi_dev",
"display_name": "FetchPI 抖音站",
"verified": true
},
"text": "一条关于数据 API 的短视频。",
"created_at": "2026-09-17T12:34:56Z",
"metrics": {
"likes": 32810,
"comments": 1204,
"shares": 988,
"collects": 5600,
"views": 2140000
},
"attachments": [
{
"type": "video",
"preview_image_url": "https://cdn.example.com/cover/douyin-7412050000000001001.jpeg",
"duration_ms": 45678
}
],
"fetched_at": "2026-09-21T09:00:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}/v1/douyin/users/{username}/postsdouyin.user_posts抖音 用户视频
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | 抖音用户寻址键(sec_user_id)——上游按 sec_user_id 寻址,调用值按原样转发(handle 换算是待上游校准项)。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/douyin/users/newdev/posts"响应示例
{
"data": [
{
"id": "7412050000000001001",
"platform": "douyin",
"type": "post",
"author": {
"id": "7004994945113",
"username": "fetchpi_dev",
"display_name": "FetchPI 抖音站",
"verified": true
},
"text": "一条关于数据 API 的短视频。",
"created_at": "2026-09-17T12:34:56Z",
"metrics": {
"likes": 32810,
"comments": 1204,
"shares": 988,
"collects": 5600,
"views": 2140000
},
"attachments": [
{
"type": "video",
"preview_image_url": "https://cdn.example.com/cover/douyin-7412050000000001001.jpeg",
"duration_ms": 45678
}
],
"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
}
}
}/v1/douyin/posts/{id}/commentsdouyin.comments抖音 视频评论
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | 抖音视频 id(平台原生 aweme id;也是 /download 的寻址键)。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/douyin/posts/1842951234567890123/comments"响应示例
{
"data": [
{
"id": "7411222200000001001",
"platform": "douyin",
"type": "comment",
"post_id": "7412050000000001001",
"author": {
"id": "7004994945114",
"username": "commentfan",
"display_name": "评论粉丝",
"verified": false
},
"text": "讲得清楚,赞。",
"created_at": "2026-09-17T13:01:22Z",
"metrics": {
"likes": 823,
"replies": 12
},
"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
}
}
}/v1/douyin/posts/{id}/comments/{comment_id}/repliesdouyin.comment_replies抖音 评论回复
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | 抖音视频 id(平台原生 aweme id;也是 /download 的寻址键)。 |
| comment_id | path | 必填 | string | 父评论 id,列出其回复。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/douyin/posts/1842951234567890123/comments/9901222200001001/replies"响应示例
{
"data": [
{
"id": "7411222200000001001",
"platform": "douyin",
"type": "comment",
"post_id": "7412050000000001001",
"author": {
"id": "7004994945114",
"username": "commentfan",
"display_name": "评论粉丝",
"verified": false
},
"text": "讲得清楚,赞。",
"created_at": "2026-09-17T13:01:22Z",
"metrics": {
"likes": 823,
"replies": 12
},
"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
}
}
}/v1/douyin/users/{username}/followersdouyin.user_followers抖音 粉丝列表
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | 抖音用户寻址键(sec_user_id)——上游按 sec_user_id 寻址,调用值按原样转发(handle 换算是待上游校准项)。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/douyin/users/newdev/followers"响应示例
{
"data": [
{
"id": "7004994945113",
"platform": "douyin",
"type": "profile",
"username": "fetchpi_dev",
"display_name": "FetchPI 抖音站",
"description": "短视频形式的数据 API 教程。",
"url": "https://fetchpi.com",
"profile_image_url": "https://cdn.example.com/avatar/douyin-fetchpi.jpg",
"verified": true,
"created_at": "2019-06-01T00:00:00Z",
"metrics": {
"followers": 1288000,
"following": 88,
"posts": 412,
"likes": 18600000
},
"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
}
}
}/v1/douyin/users/{username}/followingdouyin.user_following抖音 关注列表
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | 抖音用户寻址键(sec_user_id)——上游按 sec_user_id 寻址,调用值按原样转发(handle 换算是待上游校准项)。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/douyin/users/newdev/following"响应示例
{
"data": [
{
"id": "7004994945113",
"platform": "douyin",
"type": "profile",
"username": "fetchpi_dev",
"display_name": "FetchPI 抖音站",
"description": "短视频形式的数据 API 教程。",
"url": "https://fetchpi.com",
"profile_image_url": "https://cdn.example.com/avatar/douyin-fetchpi.jpg",
"verified": true,
"created_at": "2019-06-01T00:00:00Z",
"metrics": {
"followers": 1288000,
"following": 88,
"posts": 412,
"likes": 18600000
},
"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
}
}
}/v1/douyin/hashtags/{tag}douyin.hashtag抖音 话题详情
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| tag | path | 必填 | string | 抖音话题寻址键:上游挑战 id ch_id,按原样转发。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/douyin/hashtags/trending"响应示例
{
"data": {
"id": "1655000000000001001",
"platform": "douyin",
"type": "hashtag",
"name": "数据API",
"description": "话题详情(按上游 ch_id 寻址)。",
"cover_image_url": "https://cdn.example.com/cover/douyin-hashtag.jpeg",
"metrics": {
"views": 960000000,
"posts": 128000
},
"fetched_at": "2026-09-21T09:00:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}/v1/douyin/hashtags/{tag}/postsdouyin.hashtag_posts抖音 话题视频
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| tag | path | 必填 | string | 抖音话题寻址键:上游挑战 id ch_id,按原样转发。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/douyin/hashtags/trending/posts"响应示例
{
"data": [
{
"id": "7412050000000001001",
"platform": "douyin",
"type": "post",
"author": {
"id": "7004994945113",
"username": "fetchpi_dev",
"display_name": "FetchPI 抖音站",
"verified": true
},
"text": "一条关于数据 API 的短视频。",
"created_at": "2026-09-17T12:34:56Z",
"metrics": {
"likes": 32810,
"comments": 1204,
"shares": 988,
"collects": 5600,
"views": 2140000
},
"attachments": [
{
"type": "video",
"preview_image_url": "https://cdn.example.com/cover/douyin-7412050000000001001.jpeg",
"duration_ms": 45678
}
],
"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
}
}
}/v1/douyin/musics/{id}douyin.music抖音 音乐详情
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | 抖音平台原生媒体 id(/musics 为音乐 id、/live 为直播间 id)。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/douyin/musics/1842951234567890123"响应示例
{
"data": {
"id": "7416880000000001001",
"platform": "douyin",
"type": "music",
"title": "原创音源(数据 API 主题曲)",
"author_name": "数据工场",
"duration_ms": 45678,
"cover_image_url": "https://cdn.example.com/cover/douyin-music.jpeg",
"metrics": {
"videos": 128000
},
"fetched_at": "2026-09-21T09:00:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}/v1/douyin/musics/{id}/postsdouyin.music_posts抖音 音乐视频
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | 抖音平台原生媒体 id(/musics 为音乐 id、/live 为直播间 id)。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/douyin/musics/1842951234567890123/posts"响应示例
{
"data": [
{
"id": "7412050000000001001",
"platform": "douyin",
"type": "post",
"author": {
"id": "7004994945113",
"username": "fetchpi_dev",
"display_name": "FetchPI 抖音站",
"verified": true
},
"text": "一条关于数据 API 的短视频。",
"created_at": "2026-09-17T12:34:56Z",
"metrics": {
"likes": 32810,
"comments": 1204,
"shares": 988,
"collects": 5600,
"views": 2140000
},
"attachments": [
{
"type": "video",
"preview_image_url": "https://cdn.example.com/cover/douyin-7412050000000001001.jpeg",
"duration_ms": 45678
}
],
"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
}
}
}/v1/douyin/live/{id}douyin.live_room抖音 直播间信息
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | 抖音平台原生媒体 id(/musics 为音乐 id、/live 为直播间 id)。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/douyin/live/1842951234567890123"响应示例
{
"data": {
"id": "8800000000000001001",
"platform": "douyin",
"type": "live_room",
"title": "直播:数据 API 问答",
"username": "fetchpi_dev",
"display_name": "FetchPI 抖音站",
"status": "LIVE",
"viewer_count": 3456,
"started_at": "2026-09-21T08:00:00Z",
"cover_image_url": "https://cdn.example.com/cover/douyin-live.jpeg",
"fetched_at": "2026-09-21T09:00:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}/v1/douyin/hot-searchdouyin.hot_search抖音 热搜榜
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/douyin/hot-search"响应示例
{
"data": {
"platform": "douyin",
"type": "hot_search",
"words": [
{
"word": "数据开放",
"hot_value": 4821000
},
{
"word": "实体层",
"hot_value": 3120004
}
],
"updated_at": "2026-09-21T08:00:00Z",
"fetched_at": "2026-09-21T09:00:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}/v1/douyin/download/{id}douyin.download抖音 视频地址解析
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | 抖音视频 id(平台原生 aweme id;也是 /download 的寻址键)。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/douyin/download/1842951234567890123"响应示例
{
"data": {
"id": "7412050000000001001",
"platform": "douyin",
"type": "download",
"play_url": "https://v.douyincdn.com/aweme/7412050000000001001/play.mp4?no-watermark=1",
"preview_image_url": "https://cdn.example.com/cover/douyin-7412050000000001001.jpeg",
"duration_ms": 45678,
"fetched_at": "2026-09-21T09:00:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}/v1/kuaishou/users/{username}kuaishou.profile快手 用户资料
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | 快手用户 id——上游按数字 user_id 寻址,调用值按原样转发。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/kuaishou/users/newdev"响应示例
{
"data": {
"id": "3185500122",
"platform": "kuaishou",
"type": "profile",
"username": "fetchpi_ks",
"display_name": "FetchPI 快手号",
"description": "快手短视频与数据开放。",
"url": "https://fetchpi.com",
"profile_image_url": "https://cdn.example.com/avatar/kuaishou-fetchpi.jpg",
"verified": false,
"created_at": "2018-03-15T00:00:00Z",
"metrics": {
"followers": 156000,
"following": 210,
"posts": 389,
"likes": 2100000
},
"fetched_at": "2026-09-21T09:00:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}/v1/kuaishou/posts/{id}kuaishou.post快手 作品详情
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | 快手作品 id(平台原生 photo_id)。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/kuaishou/posts/1842951234567890123"响应示例
{
"data": {
"id": "5566778899001",
"platform": "kuaishou",
"type": "post",
"author": {
"id": "3185500122",
"username": "fetchpi_ks",
"display_name": "FetchPI 快手号",
"verified": false
},
"text": "快手短视频数据示例。",
"created_at": "2026-09-16T10:00:00Z",
"metrics": {
"likes": 8642,
"comments": 512,
"shares": 87,
"views": 154000
},
"attachments": [
{
"type": "video",
"preview_image_url": "https://cdn.example.com/cover/kuaishou-5566778899001.jpeg",
"duration_ms": 38400
}
],
"fetched_at": "2026-09-21T09:00:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}/v1/kuaishou/users/{username}/postskuaishou.user_posts快手 用户作品
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | 快手用户 id——上游按数字 user_id 寻址,调用值按原样转发。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/kuaishou/users/newdev/posts"响应示例
{
"data": [
{
"id": "5566778899001",
"platform": "kuaishou",
"type": "post",
"author": {
"id": "3185500122",
"username": "fetchpi_ks",
"display_name": "FetchPI 快手号",
"verified": false
},
"text": "快手短视频数据示例。",
"created_at": "2026-09-16T10:00:00Z",
"metrics": {
"likes": 8642,
"comments": 512,
"shares": 87,
"views": 154000
},
"attachments": [
{
"type": "video",
"preview_image_url": "https://cdn.example.com/cover/kuaishou-5566778899001.jpeg",
"duration_ms": 38400
}
],
"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
}
}
}/v1/kuaishou/posts/{id}/commentskuaishou.comments快手 作品评论
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | 快手作品 id(平台原生 photo_id)。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/kuaishou/posts/1842951234567890123/comments"响应示例
{
"data": [
{
"id": "7700112233445",
"platform": "kuaishou",
"type": "comment",
"post_id": "5566778899001",
"author": {
"id": "4400112233445",
"username": "ksfan001",
"display_name": "快手网友",
"verified": false
},
"text": "这个讲解很实用。",
"created_at": "2026-09-16T10:20:00Z",
"metrics": {
"likes": 96,
"replies": 3
},
"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
}
}
}/v1/kuaishou/search/postskuaishou.search_posts快手 搜索作品
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| q | query | 必填 | string | 搜索关键词。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404DATA_NOT_FOUND
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — cache-only 模式且无结果时,搜索不可用。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/kuaishou/search/posts?q=fetchpi"响应示例
{
"data": [
{
"id": "5566778899001",
"platform": "kuaishou",
"type": "post",
"author": {
"id": "3185500122",
"username": "fetchpi_ks",
"display_name": "FetchPI 快手号",
"verified": false
},
"text": "快手短视频数据示例。",
"created_at": "2026-09-16T10:00:00Z",
"metrics": {
"likes": 8642,
"comments": 512,
"shares": 87,
"views": 154000
},
"attachments": [
{
"type": "video",
"preview_image_url": "https://cdn.example.com/cover/kuaishou-5566778899001.jpeg",
"duration_ms": 38400
}
],
"fetched_at": "2026-09-21T09:00:00Z"
}
],
"next_cursor": null,
"query": "数据",
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 300,
"cache_hit": false
}
}
}/v1/kuaishou/posts/{id}/comments/{comment_id}/replieskuaishou.comment_replies快手 评论回复
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | 快手作品 id(平台原生 photo_id)。 |
| comment_id | path | 必填 | string | 根评论 id,列出其子评论。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/kuaishou/posts/1842951234567890123/comments/9901222200001001/replies"响应示例
{
"data": [
{
"id": "7700112233445",
"platform": "kuaishou",
"type": "comment",
"post_id": "5566778899001",
"author": {
"id": "4400112233445",
"username": "ksfan001",
"display_name": "快手网友",
"verified": false
},
"text": "这个讲解很实用。",
"created_at": "2026-09-16T10:20:00Z",
"metrics": {
"likes": 96,
"replies": 3
},
"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
}
}
}/v1/kuaishou/search/userskuaishou.search_users快手 搜索用户
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| q | query | 必填 | string | 搜索关键词。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404DATA_NOT_FOUND
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — cache-only 模式且无结果时,搜索不可用。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/kuaishou/search/users?q=fetchpi"响应示例
{
"data": [
{
"id": "3185500122",
"platform": "kuaishou",
"type": "profile",
"username": "fetchpi_ks",
"display_name": "FetchPI 快手号",
"description": "快手短视频与数据开放。",
"url": "https://fetchpi.com",
"profile_image_url": "https://cdn.example.com/avatar/kuaishou-fetchpi.jpg",
"verified": false,
"created_at": "2018-03-15T00:00:00Z",
"metrics": {
"followers": 156000,
"following": 210,
"posts": 389,
"likes": 2100000
},
"fetched_at": "2026-09-21T09:00:00Z"
}
],
"next_cursor": null,
"query": "数据",
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 300,
"cache_hit": false
}
}
}/v1/kuaishou/hashtags/{tag}/postskuaishou.hashtag_posts快手 标签作品
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| tag | path | 必填 | string | 快手标签寻址键:上游 general_tag_id,按原样转发(该池无标签详情路由)。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/kuaishou/hashtags/trending/posts"响应示例
{
"data": [
{
"id": "5566778899001",
"platform": "kuaishou",
"type": "post",
"author": {
"id": "3185500122",
"username": "fetchpi_ks",
"display_name": "FetchPI 快手号",
"verified": false
},
"text": "快手短视频数据示例。",
"created_at": "2026-09-16T10:00:00Z",
"metrics": {
"likes": 8642,
"comments": 512,
"shares": 87,
"views": 154000
},
"attachments": [
{
"type": "video",
"preview_image_url": "https://cdn.example.com/cover/kuaishou-5566778899001.jpeg",
"duration_ms": 38400
}
],
"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
}
}
}/v1/kuaishou/users/{username}/livekuaishou.live_room快手 直播间信息
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | 快手用户 id——上游按数字 user_id 寻址,调用值按原样转发。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/kuaishou/users/newdev/live"响应示例
{
"data": {
"id": "8810000000000001001",
"platform": "kuaishou",
"type": "live_room",
"title": "快手直播:数据开放夜",
"username": "fetchpi_ks",
"display_name": "FetchPI 快手号",
"status": "LIVE",
"viewer_count": 1234,
"started_at": "2026-09-21T07:30:00Z",
"cover_image_url": "https://cdn.example.com/cover/kuaishou-live.jpeg",
"fetched_at": "2026-09-21T09:00:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}/v1/xigua/users/{username}xigua.profile西瓜视频 用户资料
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | 西瓜视频用户 id——上游按数字 user_id 寻址,调用值按原样转发。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/xigua/users/newdev"响应示例
{
"data": {
"id": "7004994945115",
"platform": "xigua",
"type": "profile",
"username": "fetchpi_xigua",
"display_name": "FetchPI 西瓜号",
"description": "中视频数据 API 演示。",
"url": "https://fetchpi.com",
"profile_image_url": "https://cdn.example.com/avatar/xigua-fetchpi.jpg",
"verified": false,
"created_at": "2020-01-10T00:00:00Z",
"metrics": {
"followers": 86500,
"following": 35,
"posts": 128,
"likes": 940000
},
"fetched_at": "2026-09-21T09:00:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}/v1/xigua/posts/{id}xigua.post西瓜视频 视频详情
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | 西瓜视频视频 id(平台原生 item id;也是 /download 的寻址键)。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/xigua/posts/1842951234567890123"响应示例
{
"data": {
"id": "7413050000000001001",
"platform": "xigua",
"type": "post",
"author": {
"id": "7004994945115",
"username": "fetchpi_xigua",
"display_name": "FetchPI 西瓜号",
"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"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}/v1/xigua/users/{username}/postsxigua.user_posts西瓜视频 用户视频
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | 西瓜视频用户 id——上游按数字 user_id 寻址,调用值按原样转发。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/xigua/users/newdev/posts"响应示例
{
"data": [
{
"id": "7413050000000001001",
"platform": "xigua",
"type": "post",
"author": {
"id": "7004994945115",
"username": "fetchpi_xigua",
"display_name": "FetchPI 西瓜号",
"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
}
}
}/v1/xigua/posts/{id}/commentsxigua.comments西瓜视频 视频评论
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | 西瓜视频视频 id(平台原生 item id;也是 /download 的寻址键)。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/xigua/posts/1842951234567890123/comments"响应示例
{
"data": [
{
"id": "7413222200000001001",
"platform": "xigua",
"type": "comment",
"post_id": "7413050000000001001",
"author": {
"id": "7004994945116",
"username": "xiguafan",
"display_name": "西瓜观众",
"verified": false
},
"text": "中视频也可以结构化。",
"created_at": "2026-09-15T09:12:00Z",
"metrics": {
"likes": 41,
"replies": 2
},
"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
}
}
}/v1/xigua/search/postsxigua.search_posts西瓜视频 搜索视频
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| q | query | 必填 | string | 搜索关键词。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404DATA_NOT_FOUND
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — cache-only 模式且无结果时,搜索不可用。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/xigua/search/posts?q=fetchpi"响应示例
{
"data": [
{
"id": "7413050000000001001",
"platform": "xigua",
"type": "post",
"author": {
"id": "7004994945115",
"username": "fetchpi_xigua",
"display_name": "FetchPI 西瓜号",
"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,
"query": "数据",
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 300,
"cache_hit": false
}
}
}/v1/xigua/download/{id}xigua.download西瓜视频 播放地址解析
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | 西瓜视频视频 id(平台原生 item id;也是 /download 的寻址键)。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/xigua/download/1842951234567890123"响应示例
{
"data": {
"id": "7413050000000001001",
"platform": "xigua",
"type": "download",
"play_url": "https://v.xiguacdn.com/item/7413050000000001001/play.mp4",
"preview_image_url": "https://cdn.example.com/cover/xigua-7413050000000001001.jpeg",
"duration_ms": 732000,
"fetched_at": "2026-09-21T09:00:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}/v1/toutiao/users/{username}toutiao.profile今日头条 作者资料
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | 今日头条用户 id——上游按数字 user_id 寻址,调用值按原样转发。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/toutiao/users/newdev"响应示例
{
"data": {
"id": "1567049494",
"platform": "toutiao",
"type": "profile",
"username": "toutiao_datastudio",
"display_name": "数据工场头条号",
"description": "今日头条创作与数据开放。",
"url": "https://fetchpi.com",
"profile_image_url": "https://cdn.example.com/avatar/toutiao-fetchpi.jpg",
"verified": true,
"created_at": "2016-08-01T00:00:00Z",
"metrics": {
"followers": 235000,
"following": 12,
"posts": 890,
"likes": 620000
},
"fetched_at": "2026-09-21T09:00:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}/v1/toutiao/posts/{id}toutiao.post今日头条 文章详情
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | 今日头条内容 id(平台原生文章 group_id)。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/toutiao/posts/1842951234567890123"响应示例
{
"data": {
"id": "1820000000001001",
"platform": "toutiao",
"type": "post",
"author": {
"id": "1567049494",
"username": "toutiao_datastudio",
"display_name": "数据工场头条号",
"verified": true
},
"title": "头条文章:实体层与数据集市",
"text": "结构化访问文章内容与互动指标。",
"url": "https://www.toutiao.com/article/1820000000001001",
"created_at": "2026-09-14T07:00:00Z",
"metrics": {
"likes": 610,
"comments": 88,
"views": 45200
},
"fetched_at": "2026-09-21T09:00:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}/v1/toutiao/posts/{id}/commentstoutiao.comments今日头条 文章评论
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | 今日头条内容 id(平台原生文章 group_id)。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/toutiao/posts/1842951234567890123/comments"响应示例
{
"data": [
{
"id": "1821000000001001",
"platform": "toutiao",
"type": "comment",
"post_id": "1820000000001001",
"author": {
"id": "1567049500",
"username": "toutiaoreader",
"display_name": "头条读者",
"verified": false
},
"text": "文章数据口径讲得明白。",
"created_at": "2026-09-14T08:05:00Z",
"metrics": {
"likes": 18,
"replies": 1
},
"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
}
}
}/v1/lemon8/users/{username}lemon8.profileLemon8 用户资料
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | Lemon8 用户 id——上游按 user_id 寻址,调用值按原样转发。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/lemon8/users/newdev"响应示例
{
"data": {
"id": "7304994945116",
"platform": "lemon8",
"type": "profile",
"username": "fetchpi_lemon",
"display_name": "FetchPI on Lemon8",
"description": "Lifestyle data notes.",
"url": "https://fetchpi.com",
"profile_image_url": "https://cdn.example.com/avatar/lemon8-fetchpi.jpg",
"verified": false,
"created_at": "2023-04-01T00:00:00Z",
"metrics": {
"followers": 24800,
"following": 150,
"posts": 96,
"likes": 158000
},
"fetched_at": "2026-09-21T09:00:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}/v1/lemon8/posts/{id}lemon8.postLemon8 笔记详情
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | Lemon8 笔记 id(平台原生 item id)。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/lemon8/posts/1842951234567890123"响应示例
{
"data": {
"id": "7423050000000001001",
"platform": "lemon8",
"type": "post",
"author": {
"id": "7304994945116",
"username": "fetchpi_lemon",
"display_name": "FetchPI on Lemon8",
"verified": false
},
"title": "Lemon8 note: data APIs",
"text": "A lifestyle note with structured metrics.",
"created_at": "2026-09-13T11:00:00Z",
"metrics": {
"likes": 1320,
"comments": 64,
"collects": 210
},
"attachments": [
{
"type": "photo",
"url": "https://cdn.example.com/images/lemon8-7423050000000001001-1.jpeg"
},
{
"type": "photo",
"url": "https://cdn.example.com/images/lemon8-7423050000000001001-2.jpeg"
}
],
"fetched_at": "2026-09-21T09:00:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}/v1/lemon8/search/postslemon8.search_postsLemon8 搜索笔记
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| q | query | 必填 | string | 搜索关键词。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404DATA_NOT_FOUND
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — cache-only 模式且无结果时,搜索不可用。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/lemon8/search/posts?q=fetchpi"响应示例
{
"data": [
{
"id": "7423050000000001001",
"platform": "lemon8",
"type": "post",
"author": {
"id": "7304994945116",
"username": "fetchpi_lemon",
"display_name": "FetchPI on Lemon8",
"verified": false
},
"title": "Lemon8 note: data APIs",
"text": "A lifestyle note with structured metrics.",
"created_at": "2026-09-13T11:00:00Z",
"metrics": {
"likes": 1320,
"comments": 64,
"collects": 210
},
"attachments": [
{
"type": "photo",
"url": "https://cdn.example.com/images/lemon8-7423050000000001001-1.jpeg"
},
{
"type": "photo",
"url": "https://cdn.example.com/images/lemon8-7423050000000001001-2.jpeg"
}
],
"fetched_at": "2026-09-21T09:00:00Z"
}
],
"next_cursor": null,
"query": "数据",
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 300,
"cache_hit": false
}
}
}/v1/lemon8/users/{username}/followerslemon8.user_followersLemon8 粉丝列表
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | Lemon8 用户 id——上游按 user_id 寻址,调用值按原样转发。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/lemon8/users/newdev/followers"响应示例
{
"data": [
{
"id": "7304994945116",
"platform": "lemon8",
"type": "profile",
"username": "fetchpi_lemon",
"display_name": "FetchPI on Lemon8",
"description": "Lifestyle data notes.",
"url": "https://fetchpi.com",
"profile_image_url": "https://cdn.example.com/avatar/lemon8-fetchpi.jpg",
"verified": false,
"created_at": "2023-04-01T00:00:00Z",
"metrics": {
"followers": 24800,
"following": 150,
"posts": 96,
"likes": 158000
},
"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
}
}
}/v1/lemon8/users/{username}/followinglemon8.user_followingLemon8 关注列表
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | Lemon8 用户 id——上游按 user_id 寻址,调用值按原样转发。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/lemon8/users/newdev/following"响应示例
{
"data": [
{
"id": "7304994945116",
"platform": "lemon8",
"type": "profile",
"username": "fetchpi_lemon",
"display_name": "FetchPI on Lemon8",
"description": "Lifestyle data notes.",
"url": "https://fetchpi.com",
"profile_image_url": "https://cdn.example.com/avatar/lemon8-fetchpi.jpg",
"verified": false,
"created_at": "2023-04-01T00:00:00Z",
"metrics": {
"followers": 24800,
"following": 150,
"posts": 96,
"likes": 158000
},
"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
}
}
}/v1/lemon8/topics/{id}lemon8.topicLemon8 话题详情
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | Lemon8 话题 id(平台原生论坛 id)。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/lemon8/topics/1842951234567890123"响应示例
{
"data": {
"id": "1666000000000001001",
"platform": "lemon8",
"type": "topic",
"name": "数据开放",
"description": "Lemon8 话题详情(按 forum_id 寻址)。",
"metrics": {
"posts": 8600
},
"fetched_at": "2026-09-21T09:00:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}/v1/bilibili/users/{username}bilibili.profile哔哩哔哩 用户资料
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | B 站用户寻址键(数字 uid)——上游按 uid 寻址,调用值按原样转发。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/bilibili/users/newdev"响应示例
{
"data": {
"id": "3255000122",
"platform": "bilibili",
"type": "profile",
"username": "FetchPI 哔哩站",
"display_name": "FetchPI 哔哩站",
"description": "哔哩哔哩数据开放。",
"profile_image_url": "https://cdn.example.com/avatar/bilibili-fetchpi.jpg",
"verified": true,
"metrics": {
"followers": 328000,
"following": 45,
"posts": 388
},
"fetched_at": "2026-09-21T09:00:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}/v1/bilibili/posts/{id}bilibili.post哔哩哔哩 视频详情
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | B 站视频 id(平台原生 BV 号)。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/bilibili/posts/1842951234567890123"响应示例
{
"data": {
"id": "BV1ma101c0001",
"platform": "bilibili",
"type": "post",
"author": {
"id": "3255000122",
"username": "FetchPI 哔哩站",
"display_name": "FetchPI 哔哩站",
"verified": true
},
"title": "哔哩哔哩:数据 API 实战",
"text": "一条关于数据 API 的视频。",
"created_at": "2026-09-16T11:20:00Z",
"metrics": {
"likes": 18220,
"comments": 940,
"collects": 2100,
"views": 480000
},
"attachments": [
{
"type": "video",
"preview_image_url": "https://cdn.example.com/cover/bilibili-BV1ma101c0001.jpeg"
}
],
"fetched_at": "2026-09-21T09:00:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}/v1/bilibili/users/{username}/postsbilibili.user_posts哔哩哔哩 用户视频
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | B 站用户寻址键(数字 uid)——上游按 uid 寻址,调用值按原样转发。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/bilibili/users/newdev/posts"响应示例
{
"data": [
{
"id": "BV1ma101c0001",
"platform": "bilibili",
"type": "post",
"author": {
"id": "3255000122",
"username": "FetchPI 哔哩站",
"display_name": "FetchPI 哔哩站",
"verified": true
},
"title": "哔哩哔哩:数据 API 实战",
"text": "一条关于数据 API 的视频。",
"created_at": "2026-09-16T11:20:00Z",
"metrics": {
"likes": 18220,
"comments": 940,
"collects": 2100,
"views": 480000
},
"attachments": [
{
"type": "video",
"preview_image_url": "https://cdn.example.com/cover/bilibili-BV1ma101c0001.jpeg"
}
],
"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
}
}
}/v1/bilibili/posts/{id}/commentsbilibili.comments哔哩哔哩 视频评论
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | B 站视频 id(平台原生 BV 号)。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/bilibili/posts/1842951234567890123/comments"响应示例
{
"data": [
{
"id": "887711220001",
"platform": "bilibili",
"type": "comment",
"post_id": "BV1ma101c0001",
"author": {
"id": "3255000200",
"username": "哔哩网友",
"display_name": "哔哩网友",
"verified": false
},
"text": "讲得清楚,赞。",
"created_at": "2026-09-16T12:01:22Z",
"metrics": {
"likes": 96,
"replies": 3
},
"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
}
}
}/v1/bilibili/posts/{id}/comments/{comment_id}/repliesbilibili.comment_replies哔哩哔哩 评论回复
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | B 站视频 id(平台原生 BV 号)。 |
| comment_id | path | 必填 | string | 父评论 id(rpid),列出其回复。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/bilibili/posts/1842951234567890123/comments/9901222200001001/replies"响应示例
{
"data": [
{
"id": "887711220001",
"platform": "bilibili",
"type": "comment",
"post_id": "BV1ma101c0001",
"author": {
"id": "3255000200",
"username": "哔哩网友",
"display_name": "哔哩网友",
"verified": false
},
"text": "讲得清楚,赞。",
"created_at": "2026-09-16T12:01:22Z",
"metrics": {
"likes": 96,
"replies": 3
},
"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
}
}
}/v1/bilibili/search/postsbilibili.search_posts哔哩哔哩 搜索视频
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| q | query | 必填 | string | 搜索关键词。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404DATA_NOT_FOUND
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — cache-only 模式且无结果时,搜索不可用。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/bilibili/search/posts?q=fetchpi"响应示例
{
"data": [
{
"id": "BV1ma101c0001",
"platform": "bilibili",
"type": "post",
"author": {
"id": "3255000122",
"username": "FetchPI 哔哩站",
"display_name": "FetchPI 哔哩站",
"verified": true
},
"title": "哔哩哔哩:数据 API 实战",
"text": "一条关于数据 API 的视频。",
"created_at": "2026-09-16T11:20:00Z",
"metrics": {
"likes": 18220,
"comments": 940,
"collects": 2100,
"views": 480000
},
"attachments": [
{
"type": "video",
"preview_image_url": "https://cdn.example.com/cover/bilibili-BV1ma101c0001.jpeg"
}
],
"fetched_at": "2026-09-21T09:00:00Z"
}
],
"next_cursor": null,
"query": "数据",
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 300,
"cache_hit": false
}
}
}/v1/bilibili/popularbilibili.popular哔哩哔哩 热门视频
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/bilibili/popular"响应示例
{
"data": [
{
"id": "BV1ma101c0001",
"platform": "bilibili",
"type": "post",
"author": {
"id": "3255000122",
"username": "FetchPI 哔哩站",
"display_name": "FetchPI 哔哩站",
"verified": true
},
"title": "哔哩哔哩:数据 API 实战",
"text": "一条关于数据 API 的视频。",
"created_at": "2026-09-16T11:20:00Z",
"metrics": {
"likes": 18220,
"comments": 940,
"collects": 2100,
"views": 480000
},
"attachments": [
{
"type": "video",
"preview_image_url": "https://cdn.example.com/cover/bilibili-BV1ma101c0001.jpeg"
}
],
"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
}
}
}/v1/bilibili/hot-searchbilibili.hot_search哔哩哔哩 热搜榜
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/bilibili/hot-search"响应示例
{
"data": {
"platform": "bilibili",
"type": "hot_search",
"words": [
{
"word": "数据开放",
"hot_value": 4821000
},
{
"word": "实体层",
"hot_value": 3120004
}
],
"fetched_at": "2026-09-21T09:00:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}/v1/bilibili/live/{id}bilibili.live_room哔哩哔哩 直播间信息
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | B 站直播间 id(平台原生 room_id)。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/bilibili/live/1842951234567890123"响应示例
{
"data": {
"id": "8900000000001001",
"platform": "bilibili",
"type": "live_room",
"title": "直播:数据 API 问答",
"username": "FetchPI 哔哩站",
"display_name": "FetchPI 哔哩站",
"status": "LIVE",
"viewer_count": 3456,
"cover_image_url": "https://cdn.example.com/cover/bilibili-live.jpeg",
"fetched_at": "2026-09-21T09:00:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}/v1/weibo/users/{username}weibo.profile微博 用户资料
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | 微博用户寻址键(数字 uid)——上游按 uid 寻址,调用值按原样转发。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/weibo/users/newdev"响应示例
{
"data": {
"id": "6605000122",
"platform": "weibo",
"type": "profile",
"username": "微博数据站",
"display_name": "微博数据站",
"description": "微博数据开放。",
"profile_image_url": "https://cdn.example.com/avatar/weibo-fetchpi.jpg",
"verified": true,
"created_at": "2018-06-01T00:00:00Z",
"metrics": {
"followers": 1288000,
"following": 210,
"posts": 19800
},
"fetched_at": "2026-09-21T09:00:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}/v1/weibo/posts/{id}weibo.post微博 博文详情
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | 微博帖子 id(平台原生 status id)。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/weibo/posts/1842951234567890123"响应示例
{
"data": {
"id": "5551000000001001",
"platform": "weibo",
"type": "post",
"author": {
"id": "6605000122",
"username": "微博数据站",
"display_name": "微博数据站",
"verified": true
},
"text": "一条关于数据 API 的微博。",
"created_at": "2026-09-17T04:34:56Z",
"metrics": {
"likes": 8230,
"comments": 1204,
"shares": 988
},
"attachments": [
{
"type": "photo",
"url": "https://cdn.example.com/images/weibo-5551000000001001-1.jpeg"
},
{
"type": "photo",
"url": "https://cdn.example.com/images/weibo-5551000000001001-2.jpeg"
}
],
"fetched_at": "2026-09-21T09:00:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}/v1/weibo/users/{username}/postsweibo.user_posts微博 用户博文
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | 微博用户寻址键(数字 uid)——上游按 uid 寻址,调用值按原样转发。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/weibo/users/newdev/posts"响应示例
{
"data": [
{
"id": "5551000000001001",
"platform": "weibo",
"type": "post",
"author": {
"id": "6605000122",
"username": "微博数据站",
"display_name": "微博数据站",
"verified": true
},
"text": "一条关于数据 API 的微博。",
"created_at": "2026-09-17T04:34:56Z",
"metrics": {
"likes": 8230,
"comments": 1204,
"shares": 988
},
"attachments": [
{
"type": "photo",
"url": "https://cdn.example.com/images/weibo-5551000000001001-1.jpeg"
},
{
"type": "photo",
"url": "https://cdn.example.com/images/weibo-5551000000001001-2.jpeg"
}
],
"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
}
}
}/v1/weibo/posts/{id}/commentsweibo.comments微博 博文评论
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | 微博帖子 id(平台原生 status id)。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/weibo/posts/1842951234567890123/comments"响应示例
{
"data": [
{
"id": "5551222200001001",
"platform": "weibo",
"type": "comment",
"post_id": "5551000000001001",
"author": {
"id": "6605000200",
"username": "微博网友",
"display_name": "微博网友",
"verified": false
},
"text": "讲得清楚,赞。",
"created_at": "2026-09-17T05:01:22Z",
"metrics": {
"likes": 96,
"replies": 3
},
"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
}
}
}/v1/weibo/posts/{id}/comments/{comment_id}/repliesweibo.comment_replies微博 评论回复
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | 微博帖子 id(平台原生 status id)。 |
| comment_id | path | 必填 | string | 父评论 id(主评论 id),列出其子评论。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/weibo/posts/1842951234567890123/comments/9901222200001001/replies"响应示例
{
"data": [
{
"id": "5551222200001001",
"platform": "weibo",
"type": "comment",
"post_id": "5551000000001001",
"author": {
"id": "6605000200",
"username": "微博网友",
"display_name": "微博网友",
"verified": false
},
"text": "讲得清楚,赞。",
"created_at": "2026-09-17T05:01:22Z",
"metrics": {
"likes": 96,
"replies": 3
},
"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
}
}
}/v1/weibo/posts/{id}/repostsweibo.post_reposts微博 博文转发
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | 微博帖子 id(平台原生 status id)。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/weibo/posts/1842951234567890123/reposts"响应示例
{
"data": [
{
"id": "5551000000001001",
"platform": "weibo",
"type": "post",
"author": {
"id": "6605000122",
"username": "微博数据站",
"display_name": "微博数据站",
"verified": true
},
"text": "一条关于数据 API 的微博。",
"created_at": "2026-09-17T04:34:56Z",
"metrics": {
"likes": 8230,
"comments": 1204,
"shares": 988
},
"attachments": [
{
"type": "photo",
"url": "https://cdn.example.com/images/weibo-5551000000001001-1.jpeg"
},
{
"type": "photo",
"url": "https://cdn.example.com/images/weibo-5551000000001001-2.jpeg"
}
],
"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
}
}
}/v1/weibo/posts/{id}/likersweibo.post_likers微博 博文点赞
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | 微博帖子 id(平台原生 status id)。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/weibo/posts/1842951234567890123/likers"响应示例
{
"data": [
{
"id": "6605000122",
"platform": "weibo",
"type": "profile",
"username": "微博数据站",
"display_name": "微博数据站",
"description": "微博数据开放。",
"profile_image_url": "https://cdn.example.com/avatar/weibo-fetchpi.jpg",
"verified": true,
"created_at": "2018-06-01T00:00:00Z",
"metrics": {
"followers": 1288000,
"following": 210,
"posts": 19800
},
"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
}
}
}/v1/weibo/users/{username}/followersweibo.user_followers微博 粉丝列表
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | 微博用户寻址键(数字 uid)——上游按 uid 寻址,调用值按原样转发。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/weibo/users/newdev/followers"响应示例
{
"data": [
{
"id": "6605000122",
"platform": "weibo",
"type": "profile",
"username": "微博数据站",
"display_name": "微博数据站",
"description": "微博数据开放。",
"profile_image_url": "https://cdn.example.com/avatar/weibo-fetchpi.jpg",
"verified": true,
"created_at": "2018-06-01T00:00:00Z",
"metrics": {
"followers": 1288000,
"following": 210,
"posts": 19800
},
"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
}
}
}/v1/weibo/users/{username}/followingweibo.user_following微博 关注列表
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | 微博用户寻址键(数字 uid)——上游按 uid 寻址,调用值按原样转发。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/weibo/users/newdev/following"响应示例
{
"data": [
{
"id": "6605000122",
"platform": "weibo",
"type": "profile",
"username": "微博数据站",
"display_name": "微博数据站",
"description": "微博数据开放。",
"profile_image_url": "https://cdn.example.com/avatar/weibo-fetchpi.jpg",
"verified": true,
"created_at": "2018-06-01T00:00:00Z",
"metrics": {
"followers": 1288000,
"following": 210,
"posts": 19800
},
"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
}
}
}/v1/weibo/search/postsweibo.search_posts微博 搜索博文
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| q | query | 必填 | string | 搜索关键词。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404DATA_NOT_FOUND
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — cache-only 模式且无结果时,搜索不可用。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/weibo/search/posts?q=fetchpi"响应示例
{
"data": [
{
"id": "5551000000001001",
"platform": "weibo",
"type": "post",
"author": {
"id": "6605000122",
"username": "微博数据站",
"display_name": "微博数据站",
"verified": true
},
"text": "一条关于数据 API 的微博。",
"created_at": "2026-09-17T04:34:56Z",
"metrics": {
"likes": 8230,
"comments": 1204,
"shares": 988
},
"attachments": [
{
"type": "photo",
"url": "https://cdn.example.com/images/weibo-5551000000001001-1.jpeg"
},
{
"type": "photo",
"url": "https://cdn.example.com/images/weibo-5551000000001001-2.jpeg"
}
],
"fetched_at": "2026-09-21T09:00:00Z"
}
],
"next_cursor": null,
"query": "数据",
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 300,
"cache_hit": false
}
}
}/v1/weibo/search/usersweibo.search_users微博 搜索用户
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| q | query | 必填 | string | 搜索关键词。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404DATA_NOT_FOUND
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — cache-only 模式且无结果时,搜索不可用。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/weibo/search/users?q=fetchpi"响应示例
{
"data": [
{
"id": "6605000122",
"platform": "weibo",
"type": "profile",
"username": "微博数据站",
"display_name": "微博数据站",
"description": "微博数据开放。",
"profile_image_url": "https://cdn.example.com/avatar/weibo-fetchpi.jpg",
"verified": true,
"created_at": "2018-06-01T00:00:00Z",
"metrics": {
"followers": 1288000,
"following": 210,
"posts": 19800
},
"fetched_at": "2026-09-21T09:00:00Z"
}
],
"next_cursor": null,
"query": "数据",
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 300,
"cache_hit": false
}
}
}/v1/weibo/hot-searchweibo.hot_search微博 热搜榜
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/weibo/hot-search"响应示例
{
"data": {
"platform": "weibo",
"type": "hot_search",
"words": [
{
"word": "数据开放",
"hot_value": 4821000
},
{
"word": "实体层",
"hot_value": 3120004
}
],
"fetched_at": "2026-09-21T09:00:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}/v1/zhihu/users/{username}zhihu.profile知乎 用户资料
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | 知乎用户寻址键(url_token)——上游按 url_token 寻址,调用值按原样转发。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/zhihu/users/newdev"响应示例
{
"data": {
"id": "9905000122",
"platform": "zhihu",
"type": "profile",
"username": "fetchpi-zhihu",
"display_name": "知乎数据答主",
"description": "知乎数据开放。",
"profile_image_url": "https://cdn.example.com/avatar/zhihu-fetchpi.jpg",
"verified": false,
"metrics": {
"followers": 86500,
"following": 35,
"posts": 128
},
"fetched_at": "2026-09-21T09:00:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}/v1/zhihu/answers/{id}zhihu.post知乎 回答详情
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | 知乎回答 id(知乎帖子面的规范形态)。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/zhihu/answers/1842951234567890123"响应示例
{
"data": {
"id": "8801000000001001",
"platform": "zhihu",
"type": "post",
"author": {
"id": "9905000122",
"username": "fetchpi-zhihu",
"display_name": "知乎数据答主",
"verified": false
},
"title": "实体层是如何炼成的?",
"text": "回答:结构化访问知乎内容。",
"created_at": "2026-09-16T11:20:00Z",
"metrics": {
"likes": 5120,
"comments": 320
},
"fetched_at": "2026-09-21T09:00:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}/v1/zhihu/articles/{id}zhihu.article知乎 文章详情
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | 知乎专栏文章 id。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/zhihu/articles/1842951234567890123"响应示例
{
"data": {
"id": "8801000000001001",
"platform": "zhihu",
"type": "post",
"author": {
"id": "9905000122",
"username": "fetchpi-zhihu",
"display_name": "知乎数据答主",
"verified": false
},
"title": "实体层是如何炼成的?",
"text": "回答:结构化访问知乎内容。",
"created_at": "2026-09-16T11:20:00Z",
"metrics": {
"likes": 5120,
"comments": 320
},
"fetched_at": "2026-09-21T09:00:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}/v1/zhihu/questions/{id}zhihu.question知乎 问题详情
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | 知乎问题 id。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/zhihu/questions/1842951234567890123"响应示例
{
"data": {
"id": "7701000000001001",
"platform": "zhihu",
"type": "question",
"title": "实体层是如何炼成的?",
"detail": "问题详情:数据 API 的实体层设计。",
"metrics": {
"answers": 1280,
"followers": 8600
},
"fetched_at": "2026-09-21T09:00:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}/v1/zhihu/questions/{id}/answerszhihu.question_answers知乎 问题回答列表
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | 知乎问题 id。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/zhihu/questions/1842951234567890123/answers"响应示例
{
"data": [
{
"id": "8801000000001001",
"platform": "zhihu",
"type": "post",
"author": {
"id": "9905000122",
"username": "fetchpi-zhihu",
"display_name": "知乎数据答主",
"verified": false
},
"title": "实体层是如何炼成的?",
"text": "回答:结构化访问知乎内容。",
"created_at": "2026-09-16T11:20:00Z",
"metrics": {
"likes": 5120,
"comments": 320
},
"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
}
}
}/v1/zhihu/users/{username}/answerszhihu.user_answers知乎 用户回答列表
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | 知乎用户寻址键(url_token)——上游按 url_token 寻址,调用值按原样转发。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/zhihu/users/newdev/answers"响应示例
{
"data": [
{
"id": "8801000000001001",
"platform": "zhihu",
"type": "post",
"author": {
"id": "9905000122",
"username": "fetchpi-zhihu",
"display_name": "知乎数据答主",
"verified": false
},
"title": "实体层是如何炼成的?",
"text": "回答:结构化访问知乎内容。",
"created_at": "2026-09-16T11:20:00Z",
"metrics": {
"likes": 5120,
"comments": 320
},
"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
}
}
}/v1/zhihu/users/{username}/articleszhihu.user_articles知乎 用户文章列表
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | 知乎用户寻址键(url_token)——上游按 url_token 寻址,调用值按原样转发。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/zhihu/users/newdev/articles"响应示例
{
"data": [
{
"id": "8801000000001001",
"platform": "zhihu",
"type": "post",
"author": {
"id": "9905000122",
"username": "fetchpi-zhihu",
"display_name": "知乎数据答主",
"verified": false
},
"title": "实体层是如何炼成的?",
"text": "回答:结构化访问知乎内容。",
"created_at": "2026-09-16T11:20:00Z",
"metrics": {
"likes": 5120,
"comments": 320
},
"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
}
}
}/v1/zhihu/answers/{id}/commentszhihu.comments知乎 回答评论
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | 知乎回答 id(知乎帖子面的规范形态)。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/zhihu/answers/1842951234567890123/comments"响应示例
{
"data": [
{
"id": "9901222200001001",
"platform": "zhihu",
"type": "comment",
"post_id": "8801000000001001",
"author": {
"id": "9905000200",
"username": "zhihu-fan",
"display_name": "知乎网友",
"verified": false
},
"text": "讲得明白。",
"created_at": "2026-09-16T12:01:22Z",
"metrics": {
"likes": 41,
"replies": 2
},
"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
}
}
}/v1/zhihu/answers/{id}/comments/{comment_id}/replieszhihu.comment_replies知乎 评论回复
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | 知乎回答 id(知乎帖子面的规范形态)。 |
| comment_id | path | 必填 | string | 父评论 id,列出其子评论。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/zhihu/answers/1842951234567890123/comments/9901222200001001/replies"响应示例
{
"data": [
{
"id": "9901222200001001",
"platform": "zhihu",
"type": "comment",
"post_id": "8801000000001001",
"author": {
"id": "9905000200",
"username": "zhihu-fan",
"display_name": "知乎网友",
"verified": false
},
"text": "讲得明白。",
"created_at": "2026-09-16T12:01:22Z",
"metrics": {
"likes": 41,
"replies": 2
},
"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
}
}
}/v1/zhihu/users/{username}/followerszhihu.user_followers知乎 关注者列表
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | 知乎用户寻址键(url_token)——上游按 url_token 寻址,调用值按原样转发。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/zhihu/users/newdev/followers"响应示例
{
"data": [
{
"id": "9905000122",
"platform": "zhihu",
"type": "profile",
"username": "fetchpi-zhihu",
"display_name": "知乎数据答主",
"description": "知乎数据开放。",
"profile_image_url": "https://cdn.example.com/avatar/zhihu-fetchpi.jpg",
"verified": false,
"metrics": {
"followers": 86500,
"following": 35,
"posts": 128
},
"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
}
}
}/v1/zhihu/users/{username}/followingzhihu.user_following知乎 关注列表
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | 知乎用户寻址键(url_token)——上游按 url_token 寻址,调用值按原样转发。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/zhihu/users/newdev/following"响应示例
{
"data": [
{
"id": "9905000122",
"platform": "zhihu",
"type": "profile",
"username": "fetchpi-zhihu",
"display_name": "知乎数据答主",
"description": "知乎数据开放。",
"profile_image_url": "https://cdn.example.com/avatar/zhihu-fetchpi.jpg",
"verified": false,
"metrics": {
"followers": 86500,
"following": 35,
"posts": 128
},
"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
}
}
}/v1/zhihu/search/postszhihu.search_posts知乎 搜索文章
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| q | query | 必填 | string | 搜索关键词。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404DATA_NOT_FOUND
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — cache-only 模式且无结果时,搜索不可用。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/zhihu/search/posts?q=fetchpi"响应示例
{
"data": [
{
"id": "8801000000001001",
"platform": "zhihu",
"type": "post",
"author": {
"id": "9905000122",
"username": "fetchpi-zhihu",
"display_name": "知乎数据答主",
"verified": false
},
"title": "实体层是如何炼成的?",
"text": "回答:结构化访问知乎内容。",
"created_at": "2026-09-16T11:20:00Z",
"metrics": {
"likes": 5120,
"comments": 320
},
"fetched_at": "2026-09-21T09:00:00Z"
}
],
"next_cursor": null,
"query": "数据",
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 300,
"cache_hit": false
}
}
}/v1/zhihu/search/userszhihu.search_users知乎 搜索用户
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| q | query | 必填 | string | 搜索关键词。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404DATA_NOT_FOUND
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — cache-only 模式且无结果时,搜索不可用。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/zhihu/search/users?q=fetchpi"响应示例
{
"data": [
{
"id": "9905000122",
"platform": "zhihu",
"type": "profile",
"username": "fetchpi-zhihu",
"display_name": "知乎数据答主",
"description": "知乎数据开放。",
"profile_image_url": "https://cdn.example.com/avatar/zhihu-fetchpi.jpg",
"verified": false,
"metrics": {
"followers": 86500,
"following": 35,
"posts": 128
},
"fetched_at": "2026-09-21T09:00:00Z"
}
],
"next_cursor": null,
"query": "数据",
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 300,
"cache_hit": false
}
}
}/v1/zhihu/hot-listzhihu.hot_list知乎 热榜
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/zhihu/hot-list"响应示例
{
"data": {
"platform": "zhihu",
"type": "hot_list",
"items": [
{
"title": "实体层是如何炼成的?",
"question_id": "7701000000001001",
"heat": 4821000
},
{
"title": "数据开放意味着什么?",
"question_id": "7701000000001002",
"heat": 3120004
}
],
"fetched_at": "2026-09-21T09:00:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}/v1/threads/users/{username}threads.profile获取用户资料
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | Threads 用户寻址键——主页按 username、列表按数字 user_id 寻址,调用值按原样转发。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/threads/users/newdev"响应示例
{
"data": {
"id": "7455000122",
"platform": "threads",
"type": "profile",
"username": "fetchpi",
"display_name": "FetchPI Threads",
"description": "Threads 数据开放。",
"profile_image_url": "https://cdn.example.com/avatar/threads-fetchpi.jpg",
"verified": true,
"created_at": "2021-07-06T00:00:00Z",
"metrics": {
"followers": 815000,
"following": 310,
"posts": 4200
},
"fetched_at": "2026-09-21T09:00:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}/v1/threads/posts/{id}threads.post获取帖子
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | Threads 帖子 id(平台原生 pk)。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/threads/posts/1842951234567890123"响应示例
{
"data": {
"id": "7459000000001001",
"platform": "threads",
"type": "post",
"author": {
"id": "7455000122",
"username": "fetchpi",
"display_name": "FetchPI Threads",
"verified": true
},
"text": "一条关于数据 API 的 Threads。",
"created_at": "2026-09-16T11:20:00Z",
"metrics": {
"likes": 12480,
"comments": 214,
"shares": 66,
"views": 91000
},
"attachments": [
{
"type": "photo",
"url": "https://cdn.example.com/images/threads-7459000000001001-1.jpeg"
},
{
"type": "photo",
"url": "https://cdn.example.com/images/threads-7459000000001001-2.jpeg"
},
{
"type": "video",
"preview_image_url": "https://cdn.example.com/media/threads-7459000000001001.mp4"
}
],
"fetched_at": "2026-09-21T09:00:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}/v1/threads/users/{username}/poststhreads.user_posts获取用户帖子列表
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | Threads 用户寻址键——主页按 username、列表按数字 user_id 寻址,调用值按原样转发。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/threads/users/newdev/posts"响应示例
{
"data": [
{
"id": "7459000000001001",
"platform": "threads",
"type": "post",
"author": {
"id": "7455000122",
"username": "fetchpi",
"display_name": "FetchPI Threads",
"verified": true
},
"text": "一条关于数据 API 的 Threads。",
"created_at": "2026-09-16T11:20:00Z",
"metrics": {
"likes": 12480,
"comments": 214,
"shares": 66,
"views": 91000
},
"attachments": [
{
"type": "photo",
"url": "https://cdn.example.com/images/threads-7459000000001001-1.jpeg"
},
{
"type": "photo",
"url": "https://cdn.example.com/images/threads-7459000000001001-2.jpeg"
},
{
"type": "video",
"preview_image_url": "https://cdn.example.com/media/threads-7459000000001001.mp4"
}
],
"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
}
}
}/v1/threads/users/{username}/repliesthreads.user_replies获取用户回复列表
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | Threads 用户寻址键——主页按 username、列表按数字 user_id 寻址,调用值按原样转发。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/threads/users/newdev/replies"响应示例
{
"data": [
{
"id": "7458000000003001",
"platform": "threads",
"type": "comment",
"post_id": "7459000000001001",
"author": {
"id": "7455000200",
"username": "threads_fan",
"display_name": null,
"verified": false
},
"text": "讲得清楚,赞。",
"created_at": "2026-09-16T12:01:22Z",
"metrics": {
"likes": 96,
"replies": 3
},
"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
}
}
}/v1/threads/users/{username}/repoststhreads.user_reposts获取用户转发列表
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | Threads 用户寻址键——主页按 username、列表按数字 user_id 寻址,调用值按原样转发。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/threads/users/newdev/reposts"响应示例
{
"data": [
{
"id": "7459000000001001",
"platform": "threads",
"type": "post",
"author": {
"id": "7455000122",
"username": "fetchpi",
"display_name": "FetchPI Threads",
"verified": true
},
"text": "一条关于数据 API 的 Threads。",
"created_at": "2026-09-16T11:20:00Z",
"metrics": {
"likes": 12480,
"comments": 214,
"shares": 66,
"views": 91000
},
"attachments": [
{
"type": "photo",
"url": "https://cdn.example.com/images/threads-7459000000001001-1.jpeg"
},
{
"type": "photo",
"url": "https://cdn.example.com/images/threads-7459000000001001-2.jpeg"
},
{
"type": "video",
"preview_image_url": "https://cdn.example.com/media/threads-7459000000001001.mp4"
}
],
"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
}
}
}/v1/threads/posts/{id}/commentsthreads.comments获取帖子评论
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | Threads 帖子 id(平台原生 pk)。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/threads/posts/1842951234567890123/comments"响应示例
{
"data": [
{
"id": "7458000000003001",
"platform": "threads",
"type": "comment",
"post_id": "7459000000001001",
"author": {
"id": "7455000200",
"username": "threads_fan",
"display_name": null,
"verified": false
},
"text": "讲得清楚,赞。",
"created_at": "2026-09-16T12:01:22Z",
"metrics": {
"likes": 96,
"replies": 3
},
"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
}
}
}/v1/threads/search/usersthreads.search_users搜索用户
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| q | query | 必填 | string | 搜索关键词。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404DATA_NOT_FOUND
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — cache-only 模式且无结果时,搜索不可用。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/threads/search/users?q=fetchpi"响应示例
{
"data": [
{
"id": "7455000122",
"platform": "threads",
"type": "profile",
"username": "fetchpi",
"display_name": "FetchPI Threads",
"description": "Threads 数据开放。",
"profile_image_url": "https://cdn.example.com/avatar/threads-fetchpi.jpg",
"verified": true,
"created_at": "2021-07-06T00:00:00Z",
"metrics": {
"followers": 815000,
"following": 310,
"posts": 4200
},
"fetched_at": "2026-09-21T09:00:00Z"
}
],
"next_cursor": null,
"query": "数据",
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 300,
"cache_hit": false
}
}
}/v1/linkedin/users/{username}linkedin.profile获取成员资料
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | LinkedIn 会员寻址键:个人主页 URL 经百分号编码——按原样作为上游 url query 转发。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/linkedin/users/newdev"响应示例
{
"data": {
"id": "6155000122",
"platform": "linkedin",
"type": "profile",
"username": "fetchpi-linkedin",
"display_name": "FetchPI LinkedIn",
"description": "结构化 LinkedIn 数据。",
"url": "https://www.linkedin.com/in/fetchpi-linkedin",
"profile_image_url": "https://cdn.example.com/avatar/linkedin-fetchpi.jpg",
"verified": false,
"metrics": {
"followers": 92000,
"following": 4800,
"posts": 610
},
"fetched_at": "2026-09-21T09:00:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}/v1/linkedin/users/{username}/postslinkedin.user_posts获取成员帖子列表
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | LinkedIn 会员寻址键:个人主页 URL 经百分号编码——按原样作为上游 url query 转发。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/linkedin/users/newdev/posts"响应示例
{
"data": [
{
"id": "7255000000001001",
"platform": "linkedin",
"type": "post",
"author": {
"id": "6155000122",
"username": "fetchpi-linkedin",
"display_name": "FetchPI LinkedIn",
"verified": false
},
"text": "一条关于数据 API 的 LinkedIn 帖子。",
"created_at": "2026-09-16T11:20:00Z",
"metrics": {
"likes": 3120,
"comments": 96,
"shares": 18
},
"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
}
}
}/v1/linkedin/companies/{username}linkedin.company_profile获取公司主页
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | LinkedIn 公司寻址键:公司主页 URL 经百分号编码——按原样作为上游 url query 转发。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/linkedin/companies/newdev"响应示例
{
"data": {
"id": "6155000122",
"platform": "linkedin",
"type": "profile",
"username": "fetchpi-linkedin",
"display_name": "FetchPI LinkedIn",
"description": "结构化 LinkedIn 数据。",
"url": "https://www.linkedin.com/in/fetchpi-linkedin",
"profile_image_url": "https://cdn.example.com/avatar/linkedin-fetchpi.jpg",
"verified": false,
"metrics": {
"followers": 92000,
"following": 4800,
"posts": 610
},
"fetched_at": "2026-09-21T09:00:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}/v1/linkedin/companies/{username}/postslinkedin.company_posts获取公司帖子列表
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | LinkedIn 公司寻址键:公司主页 URL 经百分号编码——按原样作为上游 url query 转发。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/linkedin/companies/newdev/posts"响应示例
{
"data": [
{
"id": "7255000000001001",
"platform": "linkedin",
"type": "post",
"author": {
"id": "6155000122",
"username": "fetchpi-linkedin",
"display_name": "FetchPI LinkedIn",
"verified": false
},
"text": "一条关于数据 API 的 LinkedIn 帖子。",
"created_at": "2026-09-16T11:20:00Z",
"metrics": {
"likes": 3120,
"comments": 96,
"shares": 18
},
"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
}
}
}/v1/linkedin/posts/{id}linkedin.post获取帖子详情
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | LinkedIn 帖子寻址键:帖子 URL 经百分号编码——按原样作为上游 url query 转发。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/linkedin/posts/1842951234567890123"响应示例
{
"data": {
"id": "7255000000001001",
"platform": "linkedin",
"type": "post",
"author": {
"id": "6155000122",
"username": "fetchpi-linkedin",
"display_name": "FetchPI LinkedIn",
"verified": false
},
"text": "一条关于数据 API 的 LinkedIn 帖子。",
"created_at": "2026-09-16T11:20:00Z",
"metrics": {
"likes": 3120,
"comments": 96,
"shares": 18
},
"fetched_at": "2026-09-21T09:00:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}/v1/linkedin/posts/{id}/commentslinkedin.post_comments获取帖子评论
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | LinkedIn 分享 URN(百分号编码)——按原样作为上游 urn query 转发。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/linkedin/posts/1842951234567890123/comments"响应示例
{
"data": [
{
"id": "7258000000002001",
"platform": "linkedin",
"type": "comment",
"post_id": "7255000000001001",
"author": {
"id": "6155000200",
"username": "linkedin-fan",
"display_name": "LinkedIn 网友",
"verified": false
},
"text": "讲得清楚,赞。",
"created_at": "2026-09-16T12:01:22Z",
"metrics": {
"likes": 12,
"replies": 1
},
"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
}
}
}/v1/linkedin/jobs/{id}linkedin.job获取职位详情
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | LinkedIn 职位寻址键:职位 URL 经百分号编码——按原样作为上游 url query 转发。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/linkedin/jobs/1842951234567890123"响应示例
{
"data": {
"id": "6257000000001001",
"platform": "linkedin",
"type": "job",
"title": "数据平台工程师",
"company": "FetchPI",
"location": "Remote",
"description": "数据平台工程师职位。",
"employment_type": "FULL_TIME",
"posted_at": "2026-09-15T11:20:00Z",
"fetched_at": "2026-09-21T09:00:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}/v1/linkedin/search/jobslinkedin.search_jobs搜索职位
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| q | query | 必填 | string | 搜索关键词。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404DATA_NOT_FOUND
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — cache-only 模式且无结果时,搜索不可用。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/linkedin/search/jobs?q=fetchpi"响应示例
{
"data": [
{
"id": "6257000000001001",
"platform": "linkedin",
"type": "job",
"title": "数据平台工程师",
"company": "FetchPI",
"location": "Remote",
"description": "数据平台工程师职位。",
"employment_type": "FULL_TIME",
"posted_at": "2026-09-15T11:20:00Z",
"fetched_at": "2026-09-21T09:00:00Z"
}
],
"next_cursor": null,
"query": "数据",
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 300,
"cache_hit": false
}
}
}/v1/telegram/channels/{username}telegram.profile获取频道信息
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | Telegram 频道寻址键(频道 handle)——按原样作为上游 channel query 转发。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/telegram/channels/newdev"响应示例
{
"data": {
"id": "8355000122",
"platform": "telegram",
"type": "profile",
"username": "fetchpi_tg",
"display_name": "FetchPI 频道",
"description": "Telegram 频道数据开放。",
"profile_image_url": "https://cdn.example.com/avatar/telegram-fetchpi_tg.jpg",
"verified": false,
"metrics": {
"followers": 230000,
"following": 0,
"posts": 5100
},
"fetched_at": "2026-09-21T09:00:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}/v1/telegram/channels/{username}/poststelegram.user_posts获取频道消息列表
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | Telegram 频道寻址键(频道 handle)——按原样作为上游 channel query 转发。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/telegram/channels/newdev/posts"响应示例
{
"data": [
{
"id": "8359000000001002",
"platform": "telegram",
"type": "post",
"author": {
"id": "8355000122",
"username": "fetchpi_tg",
"display_name": "FetchPI 频道",
"verified": false
},
"text": "频道消息:数据 API 发布。",
"created_at": "2026-09-16T11:20:00Z",
"metrics": {
"likes": 0,
"comments": 2,
"shares": 120,
"views": 51000
},
"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
}
}
}/v1/telegram/channels/{username}/posts/{id}telegram.post获取单条消息
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | Telegram 频道寻址键(频道 handle)——按原样作为上游 channel query 转发。 |
| id | path | 必填 | string | Telegram 消息 id(上游 post_id query)。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/telegram/channels/newdev/posts/1842951234567890123"响应示例
{
"data": {
"id": "8359000000001002",
"platform": "telegram",
"type": "post",
"author": {
"id": "8355000122",
"username": "fetchpi_tg",
"display_name": "FetchPI 频道",
"verified": false
},
"text": "频道消息:数据 API 发布。",
"created_at": "2026-09-16T11:20:00Z",
"metrics": {
"likes": 0,
"comments": 2,
"shares": 120,
"views": 51000
},
"fetched_at": "2026-09-21T09:00:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}/v1/telegram/channels/{username}/posts/{id}/commentstelegram.comments获取消息评论
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | Telegram 频道寻址键(频道 handle)——按原样作为上游 channel query 转发。 |
| id | path | 必填 | string | Telegram 消息 id(上游 post_id query)。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/telegram/channels/newdev/posts/1842951234567890123/comments"响应示例
{
"data": [
{
"id": "8358000000002001",
"platform": "telegram",
"type": "comment",
"post_id": "8359000000001002",
"author": {
"id": "8355000200",
"username": "tg_fan",
"display_name": "TG 网友",
"verified": false
},
"text": "讲得清楚,赞。",
"created_at": "2026-09-16T12:01:22Z",
"metrics": {
"likes": 8,
"replies": 0
},
"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
}
}
}/v1/telegram/channels/{username}/search/poststelegram.search_posts频道内搜索
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | Telegram 频道寻址键(频道 handle)——按原样作为上游 channel query 转发。 |
| q | query | 必填 | string | 搜索关键词。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404DATA_NOT_FOUND
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — cache-only 模式且无结果时,搜索不可用。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/telegram/channels/newdev/search/posts?q=fetchpi"响应示例
{
"data": [
{
"id": "8359000000001002",
"platform": "telegram",
"type": "post",
"author": {
"id": "8355000122",
"username": "fetchpi_tg",
"display_name": "FetchPI 频道",
"verified": false
},
"text": "频道消息:数据 API 发布。",
"created_at": "2026-09-16T11:20:00Z",
"metrics": {
"likes": 0,
"comments": 2,
"shares": 120,
"views": 51000
},
"fetched_at": "2026-09-21T09:00:00Z"
}
],
"next_cursor": null,
"query": "数据",
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 300,
"cache_hit": false
}
}
}/v1/telegram/channels/{username}/similartelegram.similar_channels获取相似频道
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | Telegram 频道寻址键(频道 handle)——按原样作为上游 channel query 转发。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/telegram/channels/newdev/similar"响应示例
{
"data": [
{
"id": "8355000122",
"platform": "telegram",
"type": "profile",
"username": "fetchpi_tg",
"display_name": "FetchPI 频道",
"description": "Telegram 频道数据开放。",
"profile_image_url": "https://cdn.example.com/avatar/telegram-fetchpi_tg.jpg",
"verified": false,
"metrics": {
"followers": 230000,
"following": 0,
"posts": 5100
},
"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
}
}
}/v1/pipixia/users/{username}pipixia.profile获取用户资料
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | 皮皮虾用户寻址键(数字 user_id)——上游按 user_id 寻址,调用值按原样转发。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/pipixia/users/newdev"响应示例
{
"data": {
"id": "9255000122",
"platform": "pipixia",
"type": "profile",
"username": "皮皮虾数据站",
"display_name": "皮皮虾数据站",
"description": "皮皮虾数据开放。",
"profile_image_url": "https://cdn.example.com/avatar/pipixia-fetchpi.jpg",
"verified": false,
"created_at": "2021-06-30T17:33:20Z",
"metrics": {
"followers": 456000,
"following": 64,
"posts": 1320
},
"fetched_at": "2026-09-21T09:00:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}/v1/pipixia/users/{username}/postspipixia.user_posts获取用户作品列表
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | 皮皮虾用户寻址键(数字 user_id)——上游按 user_id 寻址,调用值按原样转发。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/pipixia/users/newdev/posts"响应示例
{
"data": [
{
"id": "9259000000001001",
"platform": "pipixia",
"type": "post",
"author": {
"id": "9255000122",
"username": "皮皮虾数据站",
"display_name": "皮皮虾数据站",
"verified": false
},
"title": "皮皮虾:数据 API 实战",
"text": "一条关于数据 API 的作品。",
"created_at": "2026-09-16T11:20:00Z",
"metrics": {
"likes": 21000,
"comments": 158,
"shares": 74,
"views": 780000
},
"attachments": [
{
"type": "photo",
"url": "https://cdn.example.com/images/pipixia-9259000000001001-1.jpeg"
},
{
"type": "video",
"preview_image_url": "https://cdn.example.com/cover/pipixia-9259000000001001.jpeg",
"duration_ms": 45000
}
],
"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
}
}
}/v1/pipixia/users/{username}/followerspipixia.user_followers获取粉丝列表
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | 皮皮虾用户寻址键(数字 user_id)——上游按 user_id 寻址,调用值按原样转发。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/pipixia/users/newdev/followers"响应示例
{
"data": [
{
"id": "9255000122",
"platform": "pipixia",
"type": "profile",
"username": "皮皮虾数据站",
"display_name": "皮皮虾数据站",
"description": "皮皮虾数据开放。",
"profile_image_url": "https://cdn.example.com/avatar/pipixia-fetchpi.jpg",
"verified": false,
"created_at": "2021-06-30T17:33:20Z",
"metrics": {
"followers": 456000,
"following": 64,
"posts": 1320
},
"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
}
}
}/v1/pipixia/users/{username}/followingpipixia.user_following获取关注列表
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| username | path | 必填 | string | 皮皮虾用户寻址键(数字 user_id)——上游按 user_id 寻址,调用值按原样转发。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/pipixia/users/newdev/following"响应示例
{
"data": [
{
"id": "9255000122",
"platform": "pipixia",
"type": "profile",
"username": "皮皮虾数据站",
"display_name": "皮皮虾数据站",
"description": "皮皮虾数据开放。",
"profile_image_url": "https://cdn.example.com/avatar/pipixia-fetchpi.jpg",
"verified": false,
"created_at": "2021-06-30T17:33:20Z",
"metrics": {
"followers": 456000,
"following": 64,
"posts": 1320
},
"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
}
}
}/v1/pipixia/posts/{id}pipixia.post获取作品详情
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | 皮皮虾作品 id(平台原生 cell id)。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/pipixia/posts/1842951234567890123"响应示例
{
"data": {
"id": "9259000000001001",
"platform": "pipixia",
"type": "post",
"author": {
"id": "9255000122",
"username": "皮皮虾数据站",
"display_name": "皮皮虾数据站",
"verified": false
},
"title": "皮皮虾:数据 API 实战",
"text": "一条关于数据 API 的作品。",
"created_at": "2026-09-16T11:20:00Z",
"metrics": {
"likes": 21000,
"comments": 158,
"shares": 74,
"views": 780000
},
"attachments": [
{
"type": "photo",
"url": "https://cdn.example.com/images/pipixia-9259000000001001-1.jpeg"
},
{
"type": "video",
"preview_image_url": "https://cdn.example.com/cover/pipixia-9259000000001001.jpeg",
"duration_ms": 45000
}
],
"fetched_at": "2026-09-21T09:00:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}/v1/pipixia/posts/{id}/commentspipixia.comments获取作品评论
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| id | path | 必填 | string | 皮皮虾作品 id(平台原生 cell id)。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/pipixia/posts/1842951234567890123/comments"响应示例
{
"data": [
{
"id": "9258000000002001",
"platform": "pipixia",
"type": "comment",
"post_id": "9259000000001001",
"author": {
"id": "9255000200",
"username": "皮皮虾网友",
"display_name": "皮皮虾网友",
"verified": false
},
"text": "讲得清楚,赞。",
"created_at": "2026-09-16T12:01:22Z",
"metrics": {
"likes": 22,
"replies": 1
},
"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
}
}
}/v1/pipixia/search/postspipixia.search_posts搜索作品
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| q | query | 必填 | string | 搜索关键词。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
- 400VALIDATION
- 401UNAUTHENTICATED
- 402INSUFFICIENT_CREDITS
- 403FORBIDDEN
- 403CREDITS_FROZEN
- 404DATA_NOT_FOUND
- 429RATE_LIMIT_EXCEEDED
- 502UPSTREAM_ERROR
- 503RATE_LIMITER_UNAVAILABLE
- defaultINTERNAL
404 — cache-only 模式且无结果时,搜索不可用。
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/pipixia/search/posts?q=fetchpi"响应示例
{
"data": [
{
"id": "9259000000001001",
"platform": "pipixia",
"type": "post",
"author": {
"id": "9255000122",
"username": "皮皮虾数据站",
"display_name": "皮皮虾数据站",
"verified": false
},
"title": "皮皮虾:数据 API 实战",
"text": "一条关于数据 API 的作品。",
"created_at": "2026-09-16T11:20:00Z",
"metrics": {
"likes": 21000,
"comments": 158,
"shares": 74,
"views": 780000
},
"attachments": [
{
"type": "photo",
"url": "https://cdn.example.com/images/pipixia-9259000000001001-1.jpeg"
},
{
"type": "video",
"preview_image_url": "https://cdn.example.com/cover/pipixia-9259000000001001.jpeg",
"duration_ms": 45000
}
],
"fetched_at": "2026-09-21T09:00:00Z"
}
],
"next_cursor": null,
"query": "数据",
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 300,
"cache_hit": false
}
}
}/v1/pipixia/hashtags/{tag}pipixia.hashtag获取话题详情
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| tag | path | 必填 | string | 皮皮虾话题 id——按原样作为上游 hashtag_id query 转发。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/pipixia/hashtags/trending"响应示例
{
"data": {
"id": "9257000000001001",
"platform": "pipixia",
"type": "hashtag",
"name": "数据开放",
"description": "皮皮虾话题面。",
"metrics": {
"views": 88000000,
"posts": 123000
},
"fetched_at": "2026-09-21T09:00:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}/v1/pipixia/hashtags/{tag}/postspipixia.hashtag_posts获取话题作品列表
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| tag | path | 必填 | string | 皮皮虾话题 id——按原样作为上游 hashtag_id query 转发。 |
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/pipixia/hashtags/trending/posts"响应示例
{
"data": [
{
"id": "9259000000001001",
"platform": "pipixia",
"type": "post",
"author": {
"id": "9255000122",
"username": "皮皮虾数据站",
"display_name": "皮皮虾数据站",
"verified": false
},
"title": "皮皮虾:数据 API 实战",
"text": "一条关于数据 API 的作品。",
"created_at": "2026-09-16T11:20:00Z",
"metrics": {
"likes": 21000,
"comments": 158,
"shares": 74,
"views": 780000
},
"attachments": [
{
"type": "photo",
"url": "https://cdn.example.com/images/pipixia-9259000000001001-1.jpeg"
},
{
"type": "video",
"preview_image_url": "https://cdn.example.com/cover/pipixia-9259000000001001.jpeg",
"duration_ms": 45000
}
],
"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
}
}
}/v1/pipixia/homefeedpipixia.homefeed获取首页推荐
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| limit | query | 可选 | integer = 20 | 分页大小,1–100(默认 20)。 |
| cursor | query | 可选 | string | 上一次响应 next_cursor 返回的不透明分页游标。 |
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/pipixia/homefeed"响应示例
{
"data": [
{
"id": "9259000000001001",
"platform": "pipixia",
"type": "post",
"author": {
"id": "9255000122",
"username": "皮皮虾数据站",
"display_name": "皮皮虾数据站",
"verified": false
},
"title": "皮皮虾:数据 API 实战",
"text": "一条关于数据 API 的作品。",
"created_at": "2026-09-16T11:20:00Z",
"metrics": {
"likes": 21000,
"comments": 158,
"shares": 74,
"views": 780000
},
"attachments": [
{
"type": "photo",
"url": "https://cdn.example.com/images/pipixia-9259000000001001-1.jpeg"
},
{
"type": "video",
"preview_image_url": "https://cdn.example.com/cover/pipixia-9259000000001001.jpeg",
"duration_ms": 45000
}
],
"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
}
}
}/v1/pipixia/hot-searchpipixia.hot_search获取热搜榜
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
| max_age | query | 可选 | integer | 接受数据的最大时长(秒);会被 freshness 覆盖。 |
| freshness | query | 可选 | cache | default | live = default | 新鲜度模式:cache(绝不请求上游)、default、live(可能额外计费)。 |
响应
请求示例
curl -H "Authorization: Bearer $FETCHPI_API_KEY" \
"https://fetchpi.com/v1/pipixia/hot-search"响应示例
{
"data": {
"platform": "pipixia",
"type": "hot_search",
"words": [
{
"word": "数据开放",
"hot_value": 4821000
},
{
"word": "实体层",
"hot_value": 3120004
}
],
"fetched_at": "2026-09-21T09:00:00Z"
},
"meta": {
"request_id": "req_01HTXQ8Z9HTQ",
"freshness": {
"mode": "default",
"age_seconds": 0,
"source_layer": "upstream",
"stale": false
},
"billing": {
"amount_credits": 100,
"cache_hit": false
}
}
}