ข้อมูลโซเชียล (เบต้า)

GET /v1/social/{platform}/{capability} คืนข้อมูลสาธารณะจาก Douyin, Xiaohongshu, TikTok, YouTube และแพลตฟอร์มโซเชียลอื่น ๆ โดยใช้คีย์ API และยอดเงินเดียวกับการเรียกโมเดล แต่ละแพลตฟอร์มและแต่ละความสามารถคิดราคาต่อการเรียกที่สำเร็จหนึ่งครั้ง และ data คือการตอบกลับดั้งเดิมของแพลตฟอร์ม — ฟิลด์ไม่ได้ถูกปรับให้เป็นรูปแบบเดียวกันระหว่างแพลตฟอร์ม

GET /v1/social/{platform}/{capability}
curl --get "https://api.chinaapi.ai/v1/social/bilibili/search" \
  -H "Authorization: Bearer $CHINAAPI_KEY" \
  --data-urlencode 'keyword=Python'

# HTTP 200
# {"object": "social.result", "platform": "tiktok", "capability": "search", "data": {...}}
เบต้า: เฉพาะบัญชีที่ชำระเงินแล้ว เติมเงินครั้งแรกให้เสร็จก่อนเรียกใช้ เครดิตทดลองใช้กับเอนด์พอยต์เหล่านี้ไม่ได้ บัญชีที่ไม่เคยเติมเงินจะได้รับ HTTP 403 model_requires_topup เวอร์ชันเบต้าไม่มี SLA และแพลตฟอร์ม เอนด์พอยต์ และราคาอาจเปลี่ยนแปลงได้

การยืนยันตัวตนและการคิดเงิน

ส่งคีย์ ChinaAPI ของคุณเป็น bearer token ไปที่ https://api.chinaapi.ai เหมือนการเรียกโมเดลทั่วไป การเรียกหนึ่งครั้งจะถูกคิดเงินครั้งเดียวตามราคาที่ระบุไว้ของเอนด์พอยต์นั้น และเฉพาะเมื่อคืน HTTP 200 พร้อมข้อมูลเท่านั้น ผลลัพธ์ว่าง พารามิเตอร์ที่ถูกปฏิเสธ หรือต้นทางล้มเหลว จะไม่มีค่าใช้จ่าย การดึงแต่ละหน้าคือการเรียกแยกกัน บันทึกการใช้งานจะแสดงแต่ละการเรียกภายใต้ชื่อที่แสดงคู่กับเอนด์พอยต์ เช่น social-douyin-search

การตอบกลับและข้อผิดพลาด

การตอบกลับที่สำเร็จจะห่อข้อมูลของแพลตฟอร์มไว้ในซองข้อมูลขนาดเล็ก ทุกอย่างภายใน data — ชื่อฟิลด์ เคอร์เซอร์แบ่งหน้า และ ID — เป็นของแพลตฟอร์มเอง ให้ส่งเคอร์เซอร์กลับไปตามที่ได้รับมาทุกประการ

{
  "object": "social.result",
  "platform": "douyin",
  "capability": "search",
  "data": { "...": "the platform's own fields" }
}
  • 400 — พารามิเตอร์ไม่รู้จัก ซ้ำ ยาวเกินไป ผิดชนิด หรือขาดหายไป รวมถึงกรณีที่ไม่ได้ระบุสมาชิกใดเลยของกลุ่ม "อย่างน้อยหนึ่งรายการจาก" ฟิลด์ code ของข้อผิดพลาดจะบอกว่าเป็นกรณีใด เช่น unknown_parameter หรือ missing_parameter
  • 403 model_requires_topup — บัญชียังไม่ได้เติมเงินครั้งแรก
  • 404 — ไม่มีคู่แพลตฟอร์มและความสามารถนี้ หรือแพลตฟอร์มไม่พบข้อมูลใดสำหรับพารามิเตอร์เหล่านี้ (social_data_no_result)
  • 429 social_data_capacity_reached — ความจุรายวันของเบต้าถูกใช้หมดแล้วและจะรีเซ็ตเวลา 00:00 UTC หรือแพลตฟอร์มกำลังยุ่ง ซึ่งลองใหม่อีกไม่กี่วินาทีก็จะผ่าน อย่าลองซ้ำถี่ ๆ ในลูป
  • 502 social_data_no_result — แหล่งข้อมูลไม่ตอบกลับ หรือตอบกลับโดยไม่มีข้อมูล
  • 503 social_data_unavailable — เอนด์พอยต์นี้ถูกหยุดชั่วคราวอยู่ในขณะนี้ แคตตาล็อกสดจะแสดงสถานะเป็น paused

การตอบกลับเหล่านี้ไม่มีรายการใดถูกคิดเงิน

LinkedIn asynchronous tasks

The post-async, user-async and company-async capabilities use POST, query parameters and an empty body. Supply an Idempotency-Key (8–128 characters) unique to your intended operation. Reusing the same key and parameters returns the original submission without another charge; changing parameters under that key returns HTTP 409. A lost response is retried with the same key.

curl --get -X POST "https://api.chinaapi.ai/v1/social/linkedin/company-async" \
  -H "Authorization: Bearer $CHINAAPI_KEY" \
  -H "Idempotency-Key: company-research-20261029-001" \
  --data-urlencode 'url=https://www.linkedin.com/company/microsoft/'

# HTTP 202 returns a ChinaAPI task id and Location.
curl "https://api.chinaapi.ai/v1/social-tasks/TASK_ID" \
  -H "Authorization: Bearer $CHINAAPI_KEY"

Creation reserves the catalog price. A task with usable records keeps that charge; failure, empty results or timeout refund the reservation. Status and result reads are free, require the same account, and do not create another task. Poll no faster than every five seconds. Results are available for 30 days; do not submit another paid task just to read the same result. submission_pending means the submission outcome is uncertain: keep the same key and contact support if it persists.

These asynchronous capabilities are available through REST. The data MCP fetch tool lists synchronous capabilities only.

Xiaohongshu creator hot topics

GET /v1/social/xiaohongshu/creator-hot-topics returns the creator center’s hot inspiration feed. This is a separate capability, not a platform-wide trending ranking; the old trending endpoint remains unavailable. The live catalog lists its per-call price.

Leave cursor empty on the first request. Pass the response’s data.data.cursor unchanged to fetch the next page; items are in data.data.items. Stop when data.data.end_flag is true, a cursor repeats, or a page has no new items. Each successful nonempty page is billed separately. Empty results and business errors are not charged.

Telegram public channels

Telegram user returns a public channel profile, post returns one channel post, and user-posts returns channel posts. These endpoints do not retrieve personal account profiles or private chats. Pass channel=durov; a post also needs its post_id. Comments remain unavailable.

For user-posts, limit is 1–100 (upstream default 20). Fetch older posts with the preceding response's data.pagination.before_cursor as before; fetch newer posts with data.pagination.after_cursor as after. Choose one direction per request. Read posts from data.messages, deduplicate by post ID, and stop on an empty page, repeated cursor, no new IDs or your page/spending limit. has_more_before=false ends backward collection. Each nonempty successful page is billed separately; unavailable previews and empty results are not charged. Media links can expire.

Search implementation changes

TikTok search uses the App V3 implementation with keyword, offset, count, sort_type and publish_time. Start at offset 0; the former Web search_id is not supported. Returned data retains App V3 fields. Threads search returns top results and supports no pagination; results can vary by query and retrieval time. These path changes keep the previous per-call prices.

Pagination and bounded collection

Douyin comments and comment replies use the App V3 cursor contract. Start with cursor=0 and count=20; only count 20 is supported. Comment replies require both item_id (video ID) and comment_id (parent comment ID). Pass the returned cursor unchanged within the same capability. Old Web cursors cannot be reused.

Pages can overlap even when the cursor advances. Deduplicate by cid, stop when has_more is false, when a cursor repeats, or when no new IDs arrive; set a maximum page count and a spending limit. Each successful page is separately billed, including overlapping items. An empty page returns an uncharged no-result error and should end collection.

Threads comments and top search currently support the first page only. Sending a nonempty end_cursor is rejected before billing. Do not interpret a first-page response as a complete comment history. For every platform, use only the pagination parameters advertised in the live catalog.

การใช้งานที่ยอมรับได้

ปฏิบัติตามข้อกำหนดของแต่ละแพลตฟอร์มและกฎการคุ้มครองข้อมูลที่ใช้กับคุณ ห้ามใช้ API นี้สร้างโปรไฟล์ของบุคคล การเข้าสู่ระบบ การดึงข้อมูลติดต่อ การปั่นยอดการมีส่วนร่วม และการเข้าถึงเนื้อหาส่วนตัวหรือเนื้อหาแบบเสียเงิน อยู่นอกขอบเขตของเบต้านี้

แพลตฟอร์มและราคา

USD ต่อการเรียกที่สำเร็จหนึ่งครั้ง แต่ละราคาลิงก์ไปยังเอนด์พอยต์ด้านล่าง และขีดหมายความว่าแพลตฟอร์มนั้นไม่มีความสามารถดังกล่าว แคตตาล็อกสด — GET https://dash.chinaapi.ai/api/social/catalog ไม่ต้องใช้คีย์ — คือแหล่งอ้างอิงหลักว่าตอนนี้มีอะไรขายอยู่ รวมถึงเอนด์พอยต์ที่หยุดชั่วคราว

เอนด์พอยต์

ใส่พารามิเตอร์ใน query string ด้วยชื่อของแพลตฟอร์มเอง ตัวอย่างมาจากแคตตาล็อก ให้แทนที่ตัวระบุด้วยเนื้อหาที่คุณต้องการดึง