article_idstring必填
Article ID
https://api.sandbase.ai/v1/api/zhihu/web/column-relationshipReturns interaction details and relationship metadata for a Zhihu column article, including endorsement reaction text and navigation action links by article ID.
[
{
"data": {
"Member": null,
"action_url": "zhihu://hybrid?zh_url=https://www.zhihu.com/appview/article/669214677/voters&zh_hide_nav_bar=true",
"is_bold": false,
"text": "291 人赞同了该文章",
"text_color": "GBL05A",
"text_size": 14,
"type": "reaction_endorse"
}
}
]选择一个示例,将其输入和结果加载到 playground 中。
Returns the endorsement reaction summary for one Zhihu column article. It needs the article_id of the article. The response includes a display text such as the number of people who endorsed the article and an in-app link to the voter list.
text string to track how many people endorsed an article.type field.curl -X POST "https://api.sandbase.ai/v1/api/zhihu/web/column-relationship" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"article_id": "669214677"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
article_id | string | Yes | Article ID |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"Member": null,
"action_url": "zhihu://hybrid?zh_url=https://www.zhihu.com/appview/article/669214677/voters&zh_…",
"is_bold": false,
"text": "291 人赞同了该文章",
"text_color": "GBL05A",
"text_size": 14,
"type": "reaction_endorse"
}
| Field | Meaning |
|---|---|
text | Display string for the reaction. In the example it reads "291 人赞同了该文章" (291 people endorsed the article), so the count sits inside the text. |
type | Kind of relationship item. The example value is reaction_endorse. |
action_url | Zhihu app deep link that opens the voter list page for the article. The link embeds the article ID. |
text_color | Color code Zhihu uses to style the text, for example GBL05A. |
text_size / is_bold | Styling hints for the text. text_size is a number (14 in the example) and is_bold is a boolean. |
Member | Member data tied to the reaction. It is null in the example response. |
text string.action_url uses the zhihu:// scheme, so it opens in the Zhihu app and not in a browser.$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
开始构建
具备统一身份验证和使用情况跟踪的平台 API 端点。
curl -X POST "https://api.sandbase.ai/v1/api/zhihu/web/column-relationship" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"article_id": "669214677"
}'将您的 SandBase API 密钥设置到服务器环境中。请求使用 Bearer 身份验证。
export SANDBASE_API_KEY="YOUR_API_KEY"请将密钥保存在服务器端。不要在浏览器代码中暴露它。
article_idstring必填Article ID
这是该 API 保存的示例响应;查看时不会发起实时请求。
[
{
"data": {
"Member": null,
"action_url": "zhihu://hybrid?zh_url=https://www.zhihu.com/appview/article/669214677/voters&zh_hide_nav_bar=true",
"is_bold": false,
"text": "291 人赞同了该文章",
"text_color": "GBL05A",
"text_size": 14,
"type": "reaction_endorse"
}
}
]探索更多
| API | 价格 | 响应 |
|---|---|---|
Zhihu | $0.001 每次调用 | JSON |
Zhihu | $0.005 每次调用 | JSON |
Zhihu | $0.001 每次调用 | JSON |
Zhihu | $0.001 每次调用 | JSON |
Zhihu | $0.001 每次调用 | JSON |
Zhihu | $0.001 每次调用 | JSON |
问题
向 https://api.sandbase.ai/v1/api/zhihu/web/column-relationship 发送 POST 请求,在 Authorization 请求头中使用您的 SandBase API key(Bearer),并将参数作为 JSON 请求体传入。您也可以直接在本页的 Playground 中试用,无需编写代码。
每次调用 $0.001,从您的 SandBase 余额中扣费。您只需为实际调用付费;无需订阅。
必填:article_id (string)。 Parameters 表和本页的 Playground 列出了每个字段。
在同一个 HTTP 请求中返回的 JSON 响应(同步)。 本页的 README 包含一个示例响应。
不需要。Zhihu Column Article Relationship 通过 SandBase 运行,因此一个 SandBase API key 即可覆盖此端点以及目录中的其他所有 API 和模型。您无需单独申请 Zhihu API 访问权限。