# 知乎 盐选搜索 API (zhihu.salt_search)

- Canonical page: https://everyinfra.com/zhihu-api/salt_search
- Endpoint: POST /api/v1/social with {"platform": "zhihu", "action": "salt_search", "params": {...}}
- Price: $0.000806 per call ($0.81 per 1,000 requests); failed and empty results are not charged
- Returns: list, one page of 20 per call (limit is ignored; pass the top-level next_page_token from the response as page_token for the next page)
- Pagination: pass next_page_token back as page_token for the next page, other params unchanged; one call per page, tokens last 24 hours
- Mode: sync; add "mode": "async" for slow tasks

知乎盐选搜索按 `keyword` 检索盐选付费内容，比如悬疑故事或职场专题，每条带标题、开头一段 `text`、所属付费专栏或故事集的名称 `column_title`、封面、发布时间、点赞和评论数；`type` 标明内容类型，比如 paid_column_chapter 表示付费专栏里的一篇。它回答「盐选里有哪些关于这个主题的内容、哪些反响好」，适合内容团队做选题和版权调研，或者影视、出版方寻找故事题材。每页固定 20 条，`limit` 照收但不起作用。

只返回标题和开头，不含付费正文；翻页用 `next_page_token`。发布时间、点赞数和评论数是这一页才有的字段，学术论文搜索那一页不返回这几项。

## Health

- Live health (24h percent, hourly and daily trends): https://api.everyinfra.com/api/v1/social/availability?platform=zhihu&action=salt_search

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| keyword | not declared | yes | not declared | 按关键词搜知乎盐选（付费）内容，例如 悬疑、职场；返回内容的标题、开头一段和所属专栏，不含付费正文。 |
| page_token | not declared | no | not declared | 翻页令牌。第一页不传；之后把上一页响应里的 next_page_token 原样传回取下一页。每页 20 条，每页算一次调用。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | 该记录在原平台上的唯一标识。仅在同一平台内唯一，跨平台可能重复。 |
| type | 内容类型（answer 回答 / article 文章 / video 视频；hot_list 上是 question 问题；user_pins 是 pin 想法；column_search 是 column 专栏；salt_search 是盐选商品类型，如 paid_column_chapter 付费专栏的一篇；scholar_search 是 paper 论文）。 |
| url | 该记录在原平台上的可访问链接。 |
| title | 标题。平台无标题概念时（如纯文本帖）为 null。 |
| text | 正文内容，已去除 HTML 标签，全文返回、不截断（个别平台的列表结果本身只有摘要，以该平台的字段说明为准）。 |
| column_title | 这篇盐选内容所属的付费专栏或故事集名称（salt_search）。 |
| cover_image_url | 封面图。 |
| posted_at | 发布时间，ISO 8601 格式、UTC 时区（如 2026-08-07T12:34:56+00:00）。平台只给非标准字符串时原样透传，解析前建议做容错。null 表示平台未公开。 |
| like_count | 点赞数。null 表示该平台或该接口不公开此数据，不等于 0。 |
| comment_count | 评论数。null 表示不公开，不等于 0。 |
| platform | 数据来源平台标识，与请求里的 platform 一致（如 xiaohongshu、tiktok）。 |

## Example

```bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "zhihu",
  "action": "salt_search",
  "params": {
    "keyword": "python"
  }
}'
```

```python
import os
import requests

response = requests.post(
    "https://api.everyinfra.com/api/v1/social",
    headers={"Authorization": f"Bearer {os.environ['EVERYINFRA_API_KEY']}"},
    json={
        "platform": "zhihu",
        "action": "salt_search",
        "params": {
            "keyword": "python",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

No real sample for these example parameters yet: structure only, every value is a placeholder (…).

```text
{
  "id": "req_…",
  "platform": "zhihu",
  "action": "salt_search",
  "results": [
    {
      "id": …,
      "type": …,
      "url": …,
      "title": …,
      "text": …,
      "column_title": …,
      "cover_image_url": …,
      "posted_at": …,
      "like_count": …,
      "comment_count": …,
      "platform": …
    }
  ],
  "next_page_token": …,
  "pagination": { … },
  "count": …,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## FAQ

### 能拿到盐选内容的全文吗？

不能。这里返回标题、开头一段和所属专栏，付费正文不在结果里。按 `type` 先筛出 paid_column_chapter 这类付费专栏里的单篇，再看开头是否对口；`cover_image_url` 是封面，列选题清单时可以一起存下来。可以用开头和 `like_count`、`comment_count` 判断内容方向和受欢迎程度，再决定是否购买阅读。

### `column_title` 有什么用？

它是这篇内容所属的付费专栏或故事集名称。同一个故事集常拆成很多篇，按 `column_title` 归并，就能看出一部作品有多少篇被搜到、整体反响如何。归并后把各篇的 `like_count` 加起来，就能比较不同专栏的整体声量。同一部作品各篇的 `column_title` 相同、`title` 各不相同，两者别混用。按 `posted_at` 排开同一专栏的各篇，能看出它更新了多久。`keyword` 搜的是盐选内容，不是专栏。

### 搜索结果怎么判断热度？

每条带 `like_count` 和 `comment_count`。在同一个关键词的结果里按点赞排序，可以找出这个题材里读者最认可的作品；再看 `posted_at`，能分清老牌作品和新近上线的内容。`posted_at` 是 UTC 时区的 ISO 8601 时间，平台只给非标准字符串时原样透传，排序前要做容错；`like_count`、`comment_count` 为 null 表示接口不公开，不等于 0。`url` 是这篇内容的链接，榜单里一起存下来，回头好核对。

## Also

- Capability catalog (no key): https://api.everyinfra.com/api/v1/social/catalog?platform=zhihu
- OpenAPI: https://everyinfra.com/openapi.json · Agents guide: https://everyinfra.com/agents.md
