# Substack 关键词搜索 API (substack.search)

- Canonical page: [https://everyinfra.com/substack-api/search](https://everyinfra.com/substack-api/search?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "substack", "action": "search", "params": {...}}
- Price: $0.001389 per call ($1.39 per 1,000 requests); failed calls and empty results are not charged
- Returns: list, default 10, max 30 per call
- Mode: sync; add "mode": "async" for slow tasks

Substack 关键词搜索按 `keyword` 发现专栏，每行是一个专栏的资料：名称 `name`、短名 `handle`、链接 `url`、简介 `bio`、内容语言 `language`、订阅数 `subscriber_count` 和是否开通付费 `payments_enabled`。它回答「这个主题下有哪些 Newsletter」，适合找同赛道竞品、物色合作的作者，或者给一个领域建专栏清单。

搜的是专栏，不是文章正文的全文检索，所以 `keyword` 填刊物或作者的主题词，例如 climate。

## Health

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

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| keyword | not declared | yes | not declared | Substack newsletter / publication 发现词；搜索专栏，不是对所有文章正文做全文检索。 |
| limit | integer (1–30) | no | 10 | 这次调用最多返回的条数，整数，1–30；不传按默认值，实际返回可能少于这个数。超过上限会在扣费前返回 422。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | 该记录在原平台上的唯一标识。仅在同一平台内唯一，跨平台可能重复。 |
| handle | 用户短名。 |
| name | 名称。用于账号/商品/商家类能力，指该对象本身的名字。 |
| url | 该记录在原平台上的可访问链接。 |
| custom_domain | 自定义域名，配了说明作者有意长期经营。 |
| bio | 个人简介，账号自己填写的文本。可能含换行和 emoji。 |
| language | 内容语言代码（如 zh、en），由平台判定，可能不准。 |
| subscriber_count | 订阅数。Substack 只对部分账号公开，null 不等于 0。 |
| payments_enabled | 该出版物是否开通了付费订阅。 |
| avatar_url | 头像图片链接。部分平台给的是带尺寸参数的 CDN 链接，可能有时效。 |
| cover_url | 封面图。 |
| platform | 数据来源平台标识，与请求里的 platform 一致（如 xiaohongshu、tiktok）。 |
| author_name | 作者昵称（显示名）。 |
| author_username | 作者用户名（@handle），通常可用于拼 URL。 |
| top_posts | platform-native meaning |

## 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": "substack",
  "action": "search",
  "params": {
    "keyword": "climate"
  }
}'
```

```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": "substack",
        "action": "search",
        "params": {
            "keyword": "climate",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

Real response to the example request above, captured 2026-09-26T08:56:04Z. `results` and `count` are real with personal information (names, handles, avatars, profile links, contact details) removed; the list keeps the first 2 of 10. `id`, `billing` and `quota` differ on every call, so only their shape is shown.

```text
{
  "id": "req_…",
  "platform": "substack",
  "action": "search",
  "results": [
    {
      "id": "1577253",
      "handle": "•••",
      "name": "Climate Drift",
      "url": "https://climatedrift.substack.com",
      "custom_domain": "www.climatedrift.com",
      "bio": "Your cheat-sheet to climate: Breaking down real solutions, hard numbers, and career moves for operators, founders, and investors who want impact.",
      "language": "en",
      "payments_enabled": true,
      "avatar_url": "https://substackcdn.com/•••",
      "cover_url": "https://substack-post-media.s3.amazonaws.com/public/images/1e57b0db-25cb-435f-b067-4bd437423c48_1280x1280.png",
      "platform": "substack",
      "author_name": "•••",
      "author_username": "•••"
    },
    {
      "id": "2693993",
      "handle": "•••",
      "name": "Your Daily Dose of Climate Hope",
      "url": "https://climateactapp.substack.com",
      "bio": "Action is the antidote to despair. Subscribe now to get one easy action to take every weekday, along with stories about the trends, innovations, and people creating a better world! Enjoy our Weekly Quiz on Saturdays and Good News Roundup on Sundays!",
      "language": "en",
      "payments_enabled": true,
      "avatar_url": "https://substackcdn.com/•••",
      "cover_url": "https://substack-post-media.s3.amazonaws.com/public/images/e88a5e06-81ff-4c12-be5a-55ecc6cfb03f_1280x372.png",
      "platform": "substack",
      "author_name": "•••",
      "author_username": "•••"
    }
  ],
  "count": 10,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## FAQ

### 搜索会匹配文章正文里的词吗？

不会。它搜的是专栏（newsletter / publication），按刊物或作者的主题检索，不对所有文章正文做全文检索。想知道某个观点出现在哪篇文章里，这个接口帮不上；先用它定位专栏，再用出版物文章读这个专栏的文章。

### `language` 和 `subscriber_count` 能直接信吗？

不能全信。按 `language` 筛 zh 时会有误判，因为语言由平台判定，留下的专栏再用 `bio` 过一遍。按订阅数排序时，`subscriber_count` 为 null 的专栏只是没公开，别当成零订阅排到最后。

### 搜到的付费专栏能读文章全文吗？

不保证。`payments_enabled` 只说明专栏开通了付费订阅，搜索结果也不代表付费文章全文可读。这个接口回答的是「有哪些专栏」，读到的是专栏的资料，不是文章内容。

## Also

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