# Substack 出版物文章 API (substack.publication_posts)

- Canonical page: [https://everyinfra.com/substack-api/publication_posts](https://everyinfra.com/substack-api/publication_posts?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "substack", "action": "publication_posts", "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 出版物文章按专栏主页 `url` 列出这个专栏发布的文章，支持自定义域名，每篇带标题、副标题、作者、点赞评论转发数、字数、阅读时长、内容类型、是否付费和发布时间。它回答「这个专栏写了什么、更新多勤、哪些文章受欢迎」，适合研究竞品 Newsletter 的选题和节奏、评估作者是否值得合作，或者建一个领域的文章索引。

用 `content_type` 只看文章、播客或讨论串，用 `since` 和 `until` 圈定发布日期范围，格式 YYYY-MM-DD。`publication_name` 和 `publication_url` 标出文章所属的出版物；`tags` 在文章没打标签时是空数组，不是 null，统计标签前不用另做判空。

## Health

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

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| url | not declared | yes | not declared | Substack 专栏主页 URL；用于列出该专栏文章，可直接使用完整自定义域 URL。 |
| content_type | enum: all_types / newsletter_posts_only / podcast_episodes_only / threads_only | no | not declared | 专栏文章类型过滤：all_types 不限、newsletter_posts_only 文章、podcast_episodes_only 播客、threads_only 讨论串。 |
| since | not declared | no | not declared | 专栏文章日期窗口起点，格式 YYYY-MM-DD；只列出该日期之后发布的文章。 |
| until | not declared | no | not declared | 专栏文章日期窗口终点，格式 YYYY-MM-DD；只列出该日期之前发布的文章。 |
| limit | integer (1–30) | no | 10 | 这次调用最多返回的条数，整数，1–30；不传按默认值，实际返回可能少于这个数。超过上限会在扣费前返回 422。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | 该记录在原平台上的唯一标识。仅在同一平台内唯一，跨平台可能重复。 |
| url | 该记录在原平台上的可访问链接。 |
| title | 标题。平台无标题概念时（如纯文本帖）为 null。 |
| subtitle | 副标题。 |
| text | 正文内容，已去除 HTML 标签，全文返回、不截断（个别平台的列表结果本身只有摘要，以该平台的字段说明为准）。 |
| author_name | 作者昵称（显示名）。 |
| author_username | 作者用户名（@handle），通常可用于拼 URL。 |
| publication_name | 出版物（Newsletter）名称。 |
| publication_handle | 出版物短名。 |
| publication_url | 出版物链接。 |
| like_count | 点赞数。null 表示该平台或该接口不公开此数据，不等于 0。 |
| comment_count | 评论数。null 表示不公开，不等于 0。 |
| repost_count | 转发数（区别于引用转发）。null 表示不公开。 |
| word_count | 正文字数。 |
| reading_time_minutes | 预计阅读时长，分钟。 |
| post_type | 内容类型（newsletter/podcast/thread 等）。 |
| audience | 受众范围（everyone/paid 等）。 |
| is_paid | 是否为付费内容。 |
| podcast_url | 播客音频链接。 |
| image_url | 图片链接。多图能力可能返回 image_urls 数组。 |
| posted_at | 发布时间，ISO 8601 格式、UTC 时区（如 2026-08-07T12:34:56+00:00）。平台只给非标准字符串时原样透传，解析前建议做容错。null 表示平台未公开。 |
| updated_at | 更新时间。 |
| tags | 标签数组。无标签时为空数组，不是 null。 |
| 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": "substack",
  "action": "publication_posts",
  "params": {
    "url": "https://astralcodexten.substack.com"
  }
}'
```

```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": "publication_posts",
        "params": {
            "url": "https://astralcodexten.substack.com",
        },
    },
    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": "publication_posts",
  "results": [
    {
      "id": 210681369,
      "url": "https://www.astralcodexten.com/p/your-book-review-lee-kuan-yews-memoirs",
      "title": "Your Book Review: Lee Kuan Yew's Memoirs",
      "subtitle": "Finalist #10 in the Book Review Contest",
      "text": "Finalist #10 in the Book Review Contest",
      "author_name": "•••",
      "author_username": "•••",
      "publication_name": "Astral Codex Ten",
      "publication_url": "https://www.astralcodexten.com",
      "like_count": 139,
      "comment_count": 31,
      "repost_count": 2,
      "word_count": 5683,
      "post_type": "newsletter",
      "audience": "everyone",
      "is_paid": false,
      "image_url": "https://substack-post-media.s3.amazonaws.com/public/images/3d745943-c11a-4ff0-9c6a-aaf91333ac9f_2546x2560.jpeg",
      "posted_at": "2026-09-25T22:26:10.306000+00:00",
      "updated_at": "2026-09-25T22:30:06.391000+00:00",
      "platform": "substack"
    },
    {
      "id": 215593613,
      "url": "https://www.astralcodexten.com/p/fall-meetups-2026-call-for-meetup",
      "title": "Fall Meetups 2026 - Call For Meetup Organizers",
      "subtitle": "...",
      "text": "...",
      "author_name": "•••",
      "author_username": "•••",
      "publication_name": "Astral Codex Ten",
      "publication_url": "https://www.astralcodexten.com",
      "like_count": 46,
      "comment_count": 18,
      "repost_count": 0,
      "word_count": 2086,
      "post_type": "newsletter",
      "audience": "everyone",
      "is_paid": false,
      "image_url": "https://substack-post-media.s3.amazonaws.com/public/images/53c58a6c-168a-4394-8fd1-2c4335f9eb12_1000x667.jpeg",
      "posted_at": "2026-09-25T06:06:18.720000+00:00",
      "updated_at": "2026-09-25T06:11:54.223000+00:00",
      "platform": "substack"
    }
  ],
  "count": 10,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## FAQ

### 怎么只看某段时间发的文章？

同时传 `since` 和 `until`，格式都是 YYYY-MM-DD，只返回这个日期区间内发布的文章。只传 `since` 就是从那天到现在；做月度复盘时，每月读一次正好。区间内的文章超过单次上限 30 条时，一次取不完，把区间缩短再取。`updated_at` 是文章的更新时间，不要和发布时间混在一起。

### 怎么看一个专栏的付费策略？

统计返回文章里 `is_paid` 为 true 的比例，再看 `audience` 的取值分布，就知道这个专栏有多少内容只给付费订阅者。对照付费和免费文章的 `like_count`，还能看出哪类内容更受欢迎。`audience` 的取值如 everyone、paid；`like_count` 为 null 表示没有公开，不等于 0，算均值前先剔除。单次最多 30 条，统计比例前先确认取到的是不是这个专栏的全部文章。

### 只想看播客单集怎么办？

`content_type` 传 `podcast_episodes_only`，只返回播客；每集的 `podcast_url` 是音频链接。要读某一集的完整信息，把它的 `url` 交给单条内容。`content_type` 一共四个取值：`all_types` 不限，`newsletter_posts_only` 只要文章，`podcast_episodes_only` 只要播客，`threads_only` 只要讨论串；不筛选时，每篇的 `post_type` 也标明了它的类型。

## 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
