article_idstringwajib
Article ID
https://api.sandbase.ai/v1/api/zhihu/web/column-comment-configReturns comment settings and options for a Zhihu column article based on the provided article identifier.
[
{
"data": {
"attached_info": "",
"can_reply": false,
"can_segment_reply": false,
"dialog": null,
"disable_emoticon": false,
"disable_picture": false,
"is_anonymous": false,
"permission": {
"emoji": {
"have": true,
"is_vip_privilege": false,
"toast": "会员或 Lv.4 以上可解锁"
},
"picture": {
"have": true,
"is_vip_privilege": true,
"toast": "会员或 Lv.7 以上可解锁"
},
"voice": {
"have": false,
"is_vip_privilege": false,
"toast": ""
}
},
"picture_max_count": 1,
"place_holder": "评论区已关闭",
"place_holder_strategy": "normal",
"setting": [
{
"disable": false,
"disable_alert": "",
"id": "publish_sync_pin",
"selected": false,
"title": "同步到想法"
}
]
}
}
]Pilih contoh untuk memuat input dan hasilnya ke playground.
Returns the comment box settings for a Zhihu column article. It shows whether replies are allowed, which emoji and picture options are available, and which extra toggles appear. It needs the numeric article_id of the article.
curl -X POST "https://api.sandbase.ai/v1/api/zhihu/web/column-comment-config" \
-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.
{
"attached_info": "",
"can_reply": false,
"can_segment_reply": false,
"comment_identities": [],
"dialog": null,
"disable_emoticon": false,
"disable_picture": false,
"is_anonymous": false,
"permission": {
"emoji": {
"have": true,
"is_vip_privilege": false,
"toast": "会员或 Lv.4 以上可解锁"
},
"picture": {
"have": true,
"is_vip_privilege": true,
"toast": "会员或 Lv.7 以上可解锁"
},
"voice": {
"have": false,
"is_vip_privilege": false,
"toast": ""
}
},
"picture_max_count": 1,
"place_holder": "评论区已关闭",
"place_holder_strategy": "normal"
}
| Field | Meaning |
|---|---|
place_holder | Text shown in the comment input box. In this response it is 评论区已关闭, which means the comment area is closed. |
can_reply / can_segment_reply | Flags that show whether replies to the article, and replies to a segment of it, are allowed. Both are false in this response. |
disable_emoticon / disable_picture | Flags that show whether emoji or pictures are turned off for comments on this article. |
is_anonymous | Flag that shows whether the comment is posted anonymously. |
permission.emoji.have / permission.picture.have / permission.voice.have | Whether each input type is available in the comment box. Voice is false in this response. |
permission.picture.is_vip_privilege | Flag that shows whether picture comments are a member privilege. It is true in this response. |
permission.emoji.toast / permission.picture.toast | Message shown to users who cannot use the feature yet. It names the membership or level needed to use it. |
picture_max_count | Maximum number of pictures allowed in one comment. The value is 1 in this response. |
setting[].id / setting[].title | Identifier and display label of an extra option in the comment box. The sample shows publish_sync_pin with the title 同步到想法. |
setting[].disable / setting[].selected | Whether the option is switched off for the user and whether it is selected. |
article_id is the numeric ID of a column article, such as 669214677. Get it from Zhihu Column Articles or Zhihu Column Article Detail.comment_identities can be empty and dialog can be null.place_holder, toast and title comes back in Chinese.$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
Mulai membangun
Endpoint API platform dengan autentikasi dan pelacakan penggunaan terpadu.
curl -X POST "https://api.sandbase.ai/v1/api/zhihu/web/column-comment-config" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"article_id": "669214677"
}'Atur SandBase API key Anda di environment server Anda. Permintaan menggunakan autentikasi Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Simpan key Anda di server. Jangan tampilkan di kode browser.
article_idstringwajibArticle ID
Contoh respons yang disimpan untuk API ini; tidak ada permintaan langsung yang dibuat saat melihatnya.
[
{
"data": {
"attached_info": "",
"can_reply": false,
"can_segment_reply": false,
"dialog": null,
"disable_emoticon": false,
"disable_picture": false,
"is_anonymous": false,
"permission": {
"emoji": {
"have": true,
"is_vip_privilege": false,
"toast": "会员或 Lv.4 以上可解锁"
},
"picture": {
"have": true,
"is_vip_privilege": true,
"toast": "会员或 Lv.7 以上可解锁"
},
"voice": {
"have": false,
"is_vip_privilege": false,
"toast": ""
}
},
"picture_max_count": 1,
"place_holder": "评论区已关闭",
"place_holder_strategy": "normal",
"setting": [
{
"disable": false,
"disable_alert": "",
"id": "publish_sync_pin",
"selected": false,
"title": "同步到想法"
}
]
}
}
]Jelajahi lebih lanjut
| API | Harga | Respons |
|---|---|---|
Zhihu | $0.001 per panggilan | JSON |
Zhihu | $0.005 per panggilan | JSON |
Zhihu | $0.001 per panggilan | JSON |
Zhihu | $0.001 per panggilan | JSON |
Zhihu | $0.001 per panggilan | JSON |
Zhihu | $0.001 per panggilan | JSON |
Pertanyaan
Kirim permintaan POST ke https://api.sandbase.ai/v1/api/zhihu/web/column-comment-config dengan kunci API SandBase Anda di header Authorization (Bearer) dan parameter sebagai body JSON. Anda juga dapat mencobanya di Playground di halaman ini tanpa menulis kode.
$0.001 per panggilan, ditagihkan dari saldo SandBase Anda. Anda hanya dikenai biaya untuk panggilan yang Anda lakukan; tidak ada langganan.
Wajib: article_id (string). Tabel Parameters dan Playground di halaman ini mencantumkan setiap field.
Respons JSON yang dikembalikan dalam permintaan HTTP yang sama (sinkron). README di halaman ini menyertakan contoh respons.
Tidak. Zhihu Column Comment Configuration berjalan melalui SandBase, jadi satu kunci API SandBase mencakup endpoint ini dan setiap API serta model lain di katalog. Anda tidak perlu mendaftar akses API Zhihu secara terpisah.