知乎 API - 专栏文章详情 (V1)
根据文章ID获取指定知乎专栏文章的详细信息。
典型使用场景:
- 对专业文章进行深度内容分析。
- 创作者表现评估与话题趋势监控。
请求参数
| 参数名 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
token | query | string | 是 | TOKEN |
id | query | string | 是 | 文章ID |
代码示例
💡 环境说明
默认示例使用 https://api.justoneapi.com (prod-global)。中国大陆地区建议替换为 http://47.117.133.51:30015 (prod-cn) 以获得更好的访问体验。详见 环境选择。
bash
# 提示: 中国大陆地区建议将 https://api.justoneapi.com 替换为 http://47.117.133.51:30015
curl -X GET "https://api.justoneapi.com/api/zhihu/get-column-article-detail/v1?token=YOUR_API_KEY&id=VALUE"text
我想使用 Just One API 提供的“专栏文章详情 (V1)”接口。
接口地址: https://api.justoneapi.com/api/zhihu/get-column-article-detail/v1
HTTP 方法: GET
身份验证: 在 URL 后添加查询参数“?token=您的API密钥”。
OpenAPI 定义: https://docs.justoneapi.com/openapi/zhihu-apis/column-article-details-v1-zh.json
请求参数说明:
- token (query): TOKEN (必填)
- id (query): 文章ID (必填)
返回格式: JSON
响应处理与错误码:
1. 需通过返回体中的 "code" 字段判断业务结果(code 为 0 表示成功)。
2. 超时建议:建议将请求超时时间设置为至少 60 秒。
3. 业务码说明:
- 0: 成功
- 100: Token 无效或已失效
- 301: 采集失败,请重试
- 302: 超出速率限制
- 303: 超出每日配额
- 400: 参数错误
- 500: 内部服务器错误
- 600: 权限不足
- 601: 余额不足
请帮我用我擅长的编程语言写一个脚本来调用这个接口,并处理返回结果。python
# 提示: 中国大陆地区建议将 https://api.justoneapi.com 替换为 http://47.117.133.51:30015
import requests
url = "https://api.justoneapi.com/api/zhihu/get-column-article-detail/v1?token=YOUR_API_KEY&id=VALUE"
response = requests.get(url)
print(response.json())js
// 提示: 中国大陆地区建议将 https://api.justoneapi.com 替换为 http://47.117.133.51:30015
const response = await fetch("https://api.justoneapi.com/api/zhihu/get-column-article-detail/v1?token=YOUR_API_KEY&id=VALUE", {
method: "GET"
});
const data = await response.json();
console.log(data);java
// 提示: 中国大陆地区建议将 https://api.justoneapi.com 替换为 http://47.117.133.51:30015
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.justoneapi.com/api/zhihu/get-column-article-detail/v1?token=YOUR_API_KEY&id=VALUE"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}go
// 提示: 中国大陆地区建议将 https://api.justoneapi.com 替换为 http://47.117.133.51:30015
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
client := &http.Client{}
url := "https://api.justoneapi.com/api/zhihu/get-column-article-detail/v1?token=YOUR_API_KEY&id=VALUE"
req, _ := http.NewRequest("GET", url, nil)
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}php
// 提示: 中国大陆地区建议将 https://api.justoneapi.com 替换为 http://47.117.133.51:30015
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.justoneapi.com/api/zhihu/get-column-article-detail/v1?token=YOUR_API_KEY&id=VALUE");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
$response = curl_exec($ch);
curl_close($ch);
echo $response;响应结果
json
{
"code": 0,
"data": {
"id": "8077537920",
"title": "AI Agent代理技术栈的创新实践-2024最新洞察!从0到1构建自己的AI Agent智能代理,最强选型,看这一篇就够了!",
"type": "article",
"article_type": "normal",
"excerpt_title": "",
"url": "https://api.zhihu.com/articles/8077537920",
"image_url": "https://pic1.zhimg.com/v2-9ae2261199636605c7c56f84f6114658_720w.jpg?source=172ae18b",
"title_image": "https://pic1.zhimg.com/v2-9ae2261199636605c7c56f84f6114658_720w.jpg?source=172ae18b",
"excerpt": "<img src=\"https://pic1.zhimg.com/v2-7c97b2f7d9db876dd71b36e6132fc7fe_200x112.png\" data-caption=\"\" da...",
"created": 1732111214,
"updated": 1732111214,
"author": {
"is_followed": false,
"avatar_url_template": "https://picx.zhimg.com/v2-280d52fbb3dbb075097191aeaf8b3775.jpg?source=172ae18b",
"uid": "54639823159296",
"user_type": "people",
"is_following": false,
"url_token": "lei-ao-jiao",
"id": "82db2a17bd6a6e118ea5d629431cb3cc",
"description": "横纵连横学问挖掘",
"name": "同桌的AI小纸条",
"is_advertiser": false,
"headline": "日常AI知识蒸馏师,主业大厂全栈架构师",
"gender": 1,
"url": "https://api.zhihu.com/people/82db2a17bd6a6e118ea5d629431cb3cc",
"avatar_url": "https://pic1.zhimg.com/v2-280d52fbb3dbb075097191aeaf8b3775_l.jpg?source=172ae18b",
"is_org": false,
"type": "people",
"badge": [],
"badge_v2": {
"title": "日常AI知识蒸馏师,主业大厂全栈架构师",
"merged_badges": [],
"detail_badges": [],
"icon": "",
"night_icon": ""
}
},
"comment_permission": "all",
"copyright_permission": "need_review",
"state": "published",
"ip_info": "浙江",
"image_width": 900,
"image_height": 383,
"content": "<p data-pid=\"7g0IRdIF\">硅谷科技评论的数据库svtr.ai显示,全球有超过50家有潜力的初创企业在AI代理领域获得了知名投资机构的支持。其中,Letta是近期特别引人注目的一家A...",
"content_need_truncated": false,
"force_login_when_click_read_more": false,
"admin_closed_comment": false,
"topics": [
{
"url": "https://api.zhihu.com/topics/28352669",
"type": "topic",
"id": "28352669",
"name": "Agent"
}
],
"voteup_count": 2,
"voting": 0,
"heavy_up_status": "allow_heavy_up",
"comment_count": 0,
"contributions": [],
"is_title_image_full_screen": false,
"upvoted_followees": [],
"commercial_info": {
"is_commercial": false,
"plugin": {}
},
"suggest_edit": {
"status": false,
"reason": "",
"tip": "",
"url": "",
"title": ""
},
"reason": "",
"annotation_action": [],
"can_tip": false,
"tipjarors_count": 0,
"is_labeled": false,
"has_publishing_draft": false,
"is_favorited": false,
"favlists_count": 10,
"is_normal": true,
"status": 0,
"activity_topping_info": {
"state": "untopped"
},
"share_text": "AI Agent代理技术栈的创新实践-2024最新洞察!从0到1构建自己的AI Agent智能代理,最强选型,看这一篇就够了! - 来自知乎专栏,作者: 同桌的AI小纸条 https://zhuanl...",
"can_comment": {
"status": true,
"reason": ""
},
"linkbox": {
"url": "",
"category": "",
"pic": "",
"title": ""
},
"mcn_fp_show": -1,
"is_visible": true,
"is_liked": false,
"liked_count": 0,
"has_column": false,
"republishers": [],
"is_new_link_card": true,
"emoji_reaction": {
"like_count": 0,
"like_has_set": false
},
"ab_param": {
"qa_hidden_voteup": "",
"rs_interest1": "",
"zp_zhi_style": ""
},
"attached_info": "kgIlCgkyNTA2MzgyNzgSCjgwNzc1Mzc5MjAYByIKSU1BR0VfVEVYVA==",
"share_guide": {
"has_positive_bubble": false,
"has_time_bubble": false,
"hit_share_guide_cluster": false
},
"settings": {
"table_of_contents": {
"enabled": false
}
},
"can_reference": false,
"reaction_instruction": {},
"reaction": {
"statistics": {
"up_vote_count": 2,
"down_vote_count": 1,
"like_count": 0,
"comment_count": 0,
"share_count": 0,
"play_count": 0,
"interest_play_count": 0,
"favorites": 10,
"pv_count": 0,
"bullet_count": 0,
"applaud_count": 0,
"question_follower_count": 0,
"question_answer_count": 0,
"plaincontent_vote_up_count": 0,
"plaincontent_like_count": 0,
"img_like_count": {
"v2-25bde0e4dfbf1470ad19f51c9aa59ed6": 0,
"v2-31dcb653609d807c3ae341f11d97d1ca": 0,
"v2-3ca7f2a916c59efdaf546dcc255786c6": 0,
"v2-6b60e24f51eef9bf868133e2fbdacac7": 0,
"v2-70903e2d185eaf08e915dcd555846bbd": 0,
"v2-7c97b2f7d9db876dd71b36e6132fc7fe": 0,
"v2-9ae2261199636605c7c56f84f6114658": 0,
"v2-bb9caa17701836750519a67d4bc99fc9": 0,
"v2-d422e0921a7b49af9c5f3e6d27e9da71": 0,
"v2-d876f610d390771ff57197acb136c401": 0,
"v2-fb9f9012d38926bcf4868783470de68b": 0,
"v2-fbb4213bed16bc32a09bd11984db72d9": 0
},
"subscribe_count": 0,
"republishers": []
},
"relation": {
"is_author": false,
"vote": "Neutral",
"liked": false,
"img_liked": {
"v2-25bde0e4dfbf1470ad19f51c9aa59ed6": false,
"v2-31dcb653609d807c3ae341f11d97d1ca": false,
"v2-3ca7f2a916c59efdaf546dcc255786c6": false,
"v2-6b60e24f51eef9bf868133e2fbdacac7": false,
"v2-70903e2d185eaf08e915dcd555846bbd": false,
"v2-7c97b2f7d9db876dd71b36e6132fc7fe": false,
"v2-9ae2261199636605c7c56f84f6114658": false,
"v2-bb9caa17701836750519a67d4bc99fc9": false,
"v2-d422e0921a7b49af9c5f3e6d27e9da71": false,
"v2-d876f610d390771ff57197acb136c401": false,
"v2-fb9f9012d38926bcf4868783470de68b": false,
"v2-fbb4213bed16bc32a09bd11984db72d9": false
},
"faved": false,
"following": false,
"subcribed": false,
"is_navigator_vote": false,
"current_user_is_navigator": false,
"vote_next_step": ""
},
"image_reactions": {
"v2-25bde0e4dfbf1470ad19f51c9aa59ed6": {
"like_count": 0,
"is_liked": false
},
"v2-31dcb653609d807c3ae341f11d97d1ca": {
"like_count": 0,
"is_liked": false
},
"v2-3ca7f2a916c59efdaf546dcc255786c6": {
"like_count": 0,
"is_liked": false
},
"v2-6b60e24f51eef9bf868133e2fbdacac7": {
"like_count": 0,
"is_liked": false
},
"v2-70903e2d185eaf08e915dcd555846bbd": {
"like_count": 0,
"is_liked": false
},
"v2-7c97b2f7d9db876dd71b36e6132fc7fe": {
"like_count": 0,
"is_liked": false
},
"v2-9ae2261199636605c7c56f84f6114658": {
"like_count": 0,
"is_liked": false
},
"v2-bb9caa17701836750519a67d4bc99fc9": {
"like_count": 0,
"is_liked": false
},
"v2-d422e0921a7b49af9c5f3e6d27e9da71": {
"like_count": 0,
"is_liked": false
},
"v2-d876f610d390771ff57197acb136c401": {
"like_count": 0,
"is_liked": false
},
"v2-fb9f9012d38926bcf4868783470de68b": {
"like_count": 0,
"is_liked": false
},
"v2-fbb4213bed16bc32a09bd11984db72d9": {
"like_count": 0,
"is_liked": false
}
}
},
"interaction_bar_plugins": [
{
"type": "comment",
"comment": {
"enable": true,
"placeholder": "发条带图评论"
}
}
],
"bar_plugins_flip_time": 3000,
"podcast_audio_enter": {
"text": "听内容",
"text_color": "MapBrand",
"text_size": 13,
"action_url": "zhihu://podcast/audio_player/0?contentId=8077537920&contentType=article"
},
"allow_segment_interaction": 1,
"is_navigator": false,
"navigator_vote": false,
"vote_next_step": "vote"
}
}💡 提示:为简化展示,列表类数据样例仅保留 1-2 条记录,实际返回条数以接口响应为准。
