keywordstringจำเป็น
Search keyword for WeChat Official Account articles.
https://api.sandbase.ai/v1/api/wechat-search/search-articleSearch WeChat Official Account articles by keyword with publish-time and sort filters plus page, offset, and continuation-state pagination.
เอาต์พุตของคุณจะแสดงที่นี่
กรอกอินพุตให้ครบ แล้วคลิก Run
This API returns WeChat Official Account articles that match a keyword. Each result has a snippet with the keyword highlighted, a publish timestamp, and a link to the article. The only required input is keyword.
LATEST sort.SEVEN_DAYS and the HOT sort.desc.curl -X POST "https://api.sandbase.ai/v1/api/wechat-search/search-article" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"keyword": "人工智能"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
keyword | string | Yes | Search keyword for WeChat Official Account articles. |
currentPage | integer | No | Current page number starting from 1 for WeChat web search pagination. |
offset | integer | No | Search result offset returned by the previous response. Use 0 for the first page. |
publishTimeType | string | No | Publish time filter for WeChat Official Account article web search. |
sortType | string | No | Sort order for WeChat Official Account article web search results. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"category": [
{
"selected": 1,
"type": 0,
"word": "全部"
}
],
"continueFlag": 1,
"cookies": "{\"box_of…",
"data": [
{
"boxID": "0x2-0-15529639845716571706",
"boxPos": 1,
"boxPosMerge": 1,
"count": 1,
"items": [
{
"date": 1793685626,
"desc": "他说,<em class=\"highlight\">人工智能</em>已经开始改变人们的工作方式。ChatGPT等工具帮助人们提高效率,也有越来越多的人开始将<e…",
"docID": "15529639845716571706",
"docType": 0,
"doc_url": "http://mp.weixin.qq.com/s?__biz=MzA5MjA5MTEwNg==&mid=2656751197&idx=7&sn=ed85b9f…",
"itemShowType": 0,
"mpScene": 7,
"reportId": "15529639845716571706:mp:887366"
}
],
"real_type": 2,
"resultType": 0,
"subType": 0,
"totalCount": 242,
"type": 2,
"useNativeRender": false
}
],
"direction": 2,
"enableQuestionClosely": false,
"experiment": [
{
"key": "mmsearch_live_double_auto_play_exp",
"value": "1"
}
],
"isAutoPlayVideo": 1,
"isDivide": 1,
"isHomePage": 1,
"lang": "zh_CN",
"offset": 18
}
| Field | Meaning |
|---|---|
data[].items[].doc_url | Link to the article on mp.weixin.qq.com. |
data[].items[].desc | Text snippet from the article. Matches of the keyword are wrapped in <em class="highlight"> tags. |
data[].items[].date | Article publish time as a Unix timestamp in seconds. |
data[].items[].docID / data[].items[].reportId | Identifiers for the article. reportId combines the docID with a suffix. |
data[].totalCount | Total number of matching results reported for the search. It is the same value in every box. |
data[].boxPos | Position of the result box in the result list, starting at 1. |
offset | Offset to send as offset in the next request to get the following page. |
pageNumber | Page number the response refers to. |
continueFlag | Flag set to 1 in this response. |
cookies | JSON string holding continuation state for the search, including box_offset. |
searchID | Identifier for this search request. |
publishTimeType to ALL, ONE_DAY, SEVEN_DAYS or HALF_YEAR. Set sortType to LATEST or HOT to change the result order. If you omit it, the default sort applies.offset value from the previous response together with a higher currentPage. Use offset 0 for the first page.data is a result box and holds its articles in items. In this response each box holds one article.$0.114286 per successful call. Failed calls are not charged.
เริ่มสร้าง
เอ็นด์พอยต์ของ Platform API ที่มีการยืนยันตัวตนและการติดตามการใช้งานแบบรวมศูนย์
curl -X POST "https://api.sandbase.ai/v1/api/wechat-search/search-article" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"offset": 0,
"keyword": "人工智能",
"sortType": "COMPREHENSIVE",
"currentPage": 1,
"publishTimeType": "ALL"
}'ตั้งค่า SandBase API key ของคุณในสภาพแวดล้อมฝั่งเซิร์ฟเวอร์ คำขอจะใช้การยืนยันตัวตนแบบ Bearer
export SANDBASE_API_KEY="YOUR_API_KEY"เก็บ key ไว้บนเซิร์ฟเวอร์ อย่าเปิดเผยในโค้ดฝั่งเบราว์เซอร์
keywordstringจำเป็นSearch keyword for WeChat Official Account articles.
publishTimeTypestringPublish time filter for WeChat Official Account article web search.
ค่าเริ่มต้น: "ALL"
ค่าที่เป็นไปได้: ALL, ONE_DAY, SEVEN_DAYS, HALF_YEAR
sortTypestringSort order for WeChat Official Account article web search results.
ค่าเริ่มต้น: "COMPREHENSIVE"
ค่าที่เป็นไปได้: COMPREHENSIVE, LATEST, HOT
currentPageintegerCurrent page number starting from 1 for WeChat web search pagination.
ค่าเริ่มต้น: 1
offsetintegerSearch result offset returned by the previous response. Use 0 for the first page.
ค่าเริ่มต้น: 0
บันทึกตัวอย่างการตอบกลับสำหรับ API นี้; จะไม่มีการส่งคำขอจริงเมื่อเปิดดู
ยังไม่มีการเผยแพร่การตอบกลับที่บันทึกไว้ ให้รัน API ใน Playground เพื่อดูการตอบกลับ
สำรวจเพิ่มเติม
| API | ราคา | การตอบกลับ |
|---|---|---|
WeChat Article SearchAPI นี้ WeChat Search | $0.114286 ต่อการเรียก | JSON |
WeChat Search | $0.057143 ต่อการเรียก | JSON |
WeChat Search | $0.114286 ต่อการเรียก | JSON |
WeChat Search | $0.01 ต่อการเรียก | JSON |
WeChat Search | $0.01 ต่อการเรียก | JSON |
คำถาม
ส่งคำขอ POST ไปที่ https://api.sandbase.ai/v1/api/wechat-search/search-article โดยใส่ SandBase API key ของคุณใน Authorization header (Bearer) และส่งพารามิเตอร์เป็น JSON body คุณยังสามารถลองใช้ได้ใน Playground บนหน้านี้โดยไม่ต้องเขียนโค้ด
$0.114286 ต่อครั้ง คิดจากยอดคงเหลือ SandBase ของคุณ คุณจะถูกเรียกเก็บเฉพาะคำขอที่คุณส่งเท่านั้น ไม่มีค่าสมาชิกรายเดือน
ที่ต้องระบุ: keyword (string). ตัวเลือก: publishTimeType (หนึ่งใน ALL, ONE_DAY, SEVEN_DAYS, HALF_YEAR), sortType (หนึ่งใน COMPREHENSIVE, LATEST, HOT), currentPage (integer) และ offset (integer). ตาราง Parameters และ Playground ในหน้านี้แสดงทุกฟิลด์
การตอบกลับ JSON ที่ส่งกลับในคำขอ HTTP เดียวกัน (แบบซิงโครนัส) README บนหน้านี้มีตัวอย่างการตอบกลับ
ไม่จำเป็น WeChat Article Search ทำงานผ่าน SandBase ดังนั้น SandBase API key เดียวครอบคลุม endpoint นี้และทุก API กับโมเดลอื่นในแค็ตตาล็อก คุณไม่ต้องสมัครขอสิทธิ์เข้าถึง WeChat Search API แยกต่างหาก