Sand AISand AI MAGI-2MAGI-2 現已登上 SandBase:支援原生音訊的 1080p 影片立即試用

Zhihu Keyword Search

API 文件
https://api.sandbase.ai/v1/api/zhihu/search

Search Zhihu by keyword with optional result-type, sort, time-interval, topic-display, and offset controls. Use it to find relevant answers, articles, or videos.

價格
$0.028571美元/次呼叫
方法
POST
回應
JSON
參數
1 個必填 · 5 個選填

Playground

輸入
Search keywords.
Start offset, begins with 0.
Whether to show all topics.
Result type filter.
Sorting criteria.
Publish time interval filter.
輸出就緒

您的輸出會顯示在這裡

完成輸入後,點擊執行。

API README

Zhihu Keyword Search API

Returns Zhihu search results for a keyword. Each result in data can be a major or topic card with nested discussion items such as questions and answers. The only required input is keyword.

Use cases

  • Find popular Zhihu discussions about a topic such as 人工智能 for content research.
  • Collect question titles and answer text on a subject to study what people ask about it.
  • Track how a topic is discussed over time by filtering with timeInterval and sorting by created_time.
  • Pull answer counts and comment counts to rank which questions draw the most engagement.

Request

curl -X POST "https://api.sandbase.ai/v1/api/zhihu/search" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"keyword": "人工智能"}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
keywordstringYesSearch keywords.
offsetintegerNoStart offset, begins with 0.
showAllTopicsstringNoWhether to show all topics.
sortstringNoSorting criteria.
timeIntervalstringNoPublish time interval filter.
verticalstringNoResult type filter.

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "ab_params": "dm_a1_suppress=0;dm_hot_pin=1;d_new_search_h2=0;sb_slot_time=2;sb_sku_rel=1;dm_a…",
  "data": [
    {
      "highlight": {},
      "hit_labels": null,
      "id": "0ea2cc3a-3048-402e-a710-5ab9e5fae076",
      "index": 0,
      "object": {
        "attached_info_bytes": "Os0BEiBjOGEzZWNhYjIzNmE4Mjc2ZGJmZGE0MmVmMTczODFiNxh6Sgzkurrlt6Xmmbrog71QAFgBYAFq…",
        "major_info": {
          "avg_salary": 0,
          "classification": "工学",
          "degree": [
            "工学学士"
          ],
          "discussions": {
            "contents": [
              {
                "has_more": false,
                "id": "experience",
                "items": [
                  {
                    "highlight": {
                      "description": "985及以上可以去,这是一个赢者通吃很看能力的专业。985以下慎重,一堆线性代数都教不清楚的学校,开设了一堆名叫“<em>人工智能</em>”的专业罢了。",
                      "title": "<em>人工智能</em>专业前景怎么样?"
                    },
                    "hit_labels": null,
                    "object": {
                      "answer_count": 43,
                      "answer_type": "normal",
                      "attached_info_bytes": "OpkCCgtwbGFjZWhvbGRlchIgYzhhM2VjYWIyMzZhODI3NmRiZmRhNDJlZjE3MzgxYjcYBCIJNzY0MzUz…",
                      "author": {
                        "authority_info": null,
                        "avatar_url": "https://pica.zhimg.com/50/v2-687e9d0a8ef814155e9c326283d50b68_l.jpg?source=4e949…",
                        "badge": [],
                        "badge_v2": {
                          "detail_badges": [],
                          "icon": "",
                          "merged_badges": [],
                          "night_icon": "",
                          "title": ""
                        },
                        "badge_v2_string": "{\"title\":\"\",\"merged_badges\":[],\"detail_badges\":null,\"icon\":\"\",\"night_icon\":\"\"}",
                        "follower_count": 5,
                        "gender": 1,
                        "headline": "万物有灵。"
                      },
                      "biz_encoded_params": "sw%3D%E4%BA%BA%E5%B7%A5%E6%99%BA%E8%83%BD",
                      "comment_count": 4,
                      "content": "<p data-pid=\"12yf8I3e\">985及以上可以去,这是一个赢者通吃很看能力的专业。985以下慎重,一堆线性代数都教不清楚的学校,开设了一堆名叫“…",
                      "created_time": 1767749630
                    },
                    "type": "search_result"
                  }
                ],
                "name": "就读体验"
              }
            ],
            "default_tab_id": "experience"
          },
          "genre": [
            "本科"
          ],
          "id": "0ea2cc3a-3048-402e-a710-5ab9e5fae076",
          "name": "<em>人工智能</em>",
          "top_area": ""
        },
        "type": "major"
      },
      "type": "gaokao"
    }
  ],
  "domain_info": {
    "first_category": "科技"
  },
  "filter_items": null,
  "hit_labels": null,
  "is_brand_word": false,
  "is_koc_words": false,
  "item_in_view": [
    {
      "index": 5,
      "token": "f789e8e4…",
      "type": "user_survey"
    }
  ],
  "paging": {
    "is_end": false,
    "next": "https://api.zhihu.com/search_v3?advert_count=0&correction=1&filter_fields=&gk_ve…"
  },
  "pendant": null,
  "related_search_result": [],
  "search_action_info": {
    "attached_info_bytes": "OrABEiBjOGEzZWNhYjIzNmE4Mjc2ZGJmZGE0MmVmMTczODFiN0oM5Lq65bel5pm66IO9UABYAWABagzk…",
    "isfeed": false,
    "lc_idx": 20,
    "search_hash_id": "c8a3ecab236a8276dbfda42ef17381b7"
  }
}

Response fields

FieldMeaning
data[].idUnique ID of the search result entry.
data[].indexPosition of the entry in the result list, starting at 0.
data[].object.major_info.classification / data[].object.major_info.degree[]Subject category and degree name of a university major card, for example 工学 and 工学学士.
data[].object.major_info.discussions.contents[].nameName of a discussion group inside a major card, such as 就读体验 or 就业前景. The id key in the same object holds a short label like experience, future or hot.
data[].object.major_info.discussions.contents[].items[].highlight.titleQuestion title with the matched keyword wrapped in <em> tags.
data[].object.major_info.discussions.contents[].items[].highlight.descriptionText snippet from the answer or question with matched keywords wrapped in <em> tags.
data[].object.major_info.discussions.contents[].items[].object.answer_count / data[].object.major_info.discussions.contents[].items[].object.comment_countNumber of answers and number of comments on the item.
data[].object.major_info.discussions.contents[].items[].object.contentAnswer body as an HTML string. Some responses cut it short.
data[].object.major_info.discussions.contents[].items[].object.created_timeCreation time as a Unix timestamp in seconds.
data[].object.major_info.discussions.contents[].items[].object.author.follower_count / data[].object.major_info.discussions.contents[].items[].object.author.headlineFollower count and profile headline of the author.

Notes

  • Use offset to page through results. It starts at 0.
  • Set vertical to answer, article or zvideo to limit the result type. Set sort to upvoted_count or created_time to change the order.
  • Results can differ in shape, so check type and the keys inside object before you read fields. The sample response shows a major card with grouped discussions.
  • To read a full answer, call Zhihu Answer Details. To search only articles, use Zhihu Article Search.

Pricing

$0.028571 per successful call. Failed calls are not charged.

探索更多

相關 APIs

所有 APIs
API價格回應
Zhihu每次呼叫 $0.028571JSON
Zhihu每次呼叫 $0.014286JSON
Zhihu每次呼叫 $0.014286JSON
Zhihu每次呼叫 $0.014286JSON
Zhihu每次呼叫 $0.014286JSON
Zhihu每次呼叫 $0.014286JSON

指南:Best Zhihu API in 2026: Pricing Compared

問題

常見問題

我要如何使用 Zhihu Keyword Search API?

使用 POST 請求將您的 SandBase API 金鑰放在 Authorization 標頭(Bearer)中,並以 JSON 主體傳入參數,即可呼叫 https://api.sandbase.ai/v1/api/zhihu/search。您也可以直接在本頁的 Playground 試用,不必撰寫程式碼。

Zhihu Keyword Search API 的費用是多少?

每次 $0.028571,並從您的 SandBase 餘額中扣款。您只會為實際發出的呼叫付費;沒有訂閱方案。

Zhihu Keyword Search API 接受哪些參數?

必要:keyword (string)。 選填:offset (integer), showAllTopics(FALSE, TRUE 之一), vertical(answer, article, zvideo 之一), sort(upvoted_count, created_time 之一) 和 timeInterval(a_day, a_week, a_month, three_months, half_a_year, a_year 之一)。 本頁的 Parameters 表格與 Playground 會列出每個欄位。

Zhihu Keyword Search API 會回傳什麼?

在同一個 HTTP 請求中回傳的 JSON 回應(同步)。 本頁的 README 包含範例回應。

我需要 Zhihu 開發者帳號或 API 金鑰嗎?

不需要。Zhihu Keyword Search 是透過 SandBase 運作,因此一組 SandBase API 金鑰即可使用此端點以及目錄中的其他所有 API 和模型。您不需要另外申請 Zhihu API 存取權。