user_url_tokenstringจำเป็น
User ID
https://api.sandbase.ai/v1/api/zhihu/web/user-pinsReturns a list of pins or moments posted by a specific Zhihu user. Supports pagination controls using offset and limit parameters.
เอาต์พุตของคุณจะแสดงที่นี่
กรอกอินพุตให้ครบ แล้วคลิก Run
Returns a page of pins (short posts or moments) published by one Zhihu user. The only required input is the user's user_url_token, and limit and offset control paging.
offset.curl -X POST "https://api.sandbase.ai/v1/api/zhihu/web/user-pins" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"user_url_token": "excited-vczh"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
user_url_token | string | Yes | User ID |
limit | string | No | Number of pins per page |
offset | string | No | Offset |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"data": [],
"paging": {
"is_end": true,
"is_start": true,
"next": "https://www.zhihu.com/api/v4/v2/pins/excited-vczh/moments?includes=data%5B%2A%5D…",
"previous": "https://www.zhihu.com/api/v4/v2/pins/excited-vczh/moments?includes=data%5B%2A%5D…",
"totals": 0
}
}
| Field | Meaning |
|---|---|
data | List of pins on the current page. It is an empty list when the user has no pins, as in the example response. |
paging.totals | Total number of pins the response reports for this user. It is 0 in the example. |
paging.is_end / paging.is_start | Booleans that show whether this page is the last page or the first page of the list. |
paging.next | URL for the next page. It carries the limit and offset values for that page. |
paging.previous | URL for the previous page. It carries the limit and offset values for that page. |
user_url_token is the slug in a Zhihu profile URL, for example excited-vczh in zhihu.com/people/excited-vczh.next and previous links in paging show a default page size of 20 and step the offset by that amount.paging.is_end is true.$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
เริ่มสร้าง
เอ็นด์พอยต์ของ Platform API ที่มีการยืนยันตัวตนและการติดตามการใช้งานแบบรวมศูนย์
curl -X POST "https://api.sandbase.ai/v1/api/zhihu/web/user-pins" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"user_url_token": "excited-vczh"
}'ตั้งค่า SandBase API key ของคุณในสภาพแวดล้อมฝั่งเซิร์ฟเวอร์ คำขอจะใช้การยืนยันตัวตนแบบ Bearer
export SANDBASE_API_KEY="YOUR_API_KEY"เก็บ key ไว้บนเซิร์ฟเวอร์ อย่าเปิดเผยในโค้ดฝั่งเบราว์เซอร์
user_url_tokenstringจำเป็นUser ID
limitstringNumber of pins per page
offsetstringOffset
บันทึกตัวอย่างการตอบกลับสำหรับ API นี้; จะไม่มีการส่งคำขอจริงเมื่อเปิดดู
ยังไม่มีการเผยแพร่การตอบกลับที่บันทึกไว้ ให้รัน API ใน Playground เพื่อดูการตอบกลับ
สำรวจเพิ่มเติม
| API | ราคา | การตอบกลับ |
|---|---|---|
Zhihu User PinsAPI นี้ Zhihu | $0.001 ต่อการเรียก | JSON |
Zhihu | $0.005 ต่อการเรียก | JSON |
Zhihu | $0.001 ต่อการเรียก | JSON |
Zhihu | $0.001 ต่อการเรียก | JSON |
Zhihu | $0.001 ต่อการเรียก | JSON |
Zhihu | $0.001 ต่อการเรียก | JSON |
คำถาม
ส่งคำขอ POST ไปที่ https://api.sandbase.ai/v1/api/zhihu/web/user-pins โดยใส่ SandBase API key ของคุณใน Authorization header (Bearer) และส่งพารามิเตอร์เป็น JSON body คุณยังสามารถลองใช้ได้ใน Playground บนหน้านี้โดยไม่ต้องเขียนโค้ด
$0.001 ต่อครั้ง คิดจากยอดคงเหลือ SandBase ของคุณ คุณจะถูกเรียกเก็บเฉพาะคำขอที่คุณส่งเท่านั้น ไม่มีค่าสมาชิกรายเดือน
ที่ต้องระบุ: user_url_token (string). ตัวเลือก: limit (string) และ offset (string). ตาราง Parameters และ Playground ในหน้านี้แสดงทุกฟิลด์
การตอบกลับ JSON ที่ส่งกลับในคำขอ HTTP เดียวกัน (แบบซิงโครนัส) README บนหน้านี้มีตัวอย่างการตอบกลับ
ไม่จำเป็น Zhihu User Pins ทำงานผ่าน SandBase ดังนั้น SandBase API key เดียวครอบคลุม endpoint นี้และทุก API กับโมเดลอื่นในแค็ตตาล็อก คุณไม่ต้องสมัครขอสิทธิ์เข้าถึง Zhihu API แยกต่างหาก