# Substack Publication posts API (substack.publication_posts)

- Canonical page: [https://everyinfra.com/en/substack-api/publication_posts](https://everyinfra.com/en/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

## 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 | Specifies the target Substack resource link. Use publication homepages for publication and publication_posts, or direct /p/ post links for post and comments. The publication action requires a URL containing a recognizable Substack handle (custom domains may not parse), whereas publication_posts accepts custom domain links directly. |
| content_type | enum: all_types / newsletter_posts_only / podcast_episodes_only / threads_only | no | not declared | Filters publication posts by content format using all_types, newsletter_posts_only, podcast_episodes_only, or threads_only. Field presence must be verified against specific post links, and setting this value does not unlock paywalled content. |
| since | not declared | no | not declared | Specifies the start date string for filtering posts or activity feeds within a date range. Its presence in shared profile or publication parameters does not enable account creation date filtering. |
| until | not declared | no | not declared | Specifies the end date string for filtering posts or activity feeds alongside since. This parameter does not represent subscription expiration dates or trigger complete historical archive exports. |
| limit | integer (1–30) | no | 10 | The most rows to return in this call, an integer from 1 to 30. The default applies when you leave it out, and a call can return fewer rows. Larger values return 422 before any charge. |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | The record's unique ID on the platform. Unique only within one platform; IDs can repeat across platforms. |
| url | Link to the record on the platform. |
| title | Title. null when the platform has no titles (for example text-only posts). |
| subtitle | platform-native meaning |
| text | Body text with HTML removed, returned in full and never cut short (on a few platforms the list results themselves carry only an excerpt; the platform's field notes say so). |
| author_name | Author's display name. |
| author_username | Author's username (@handle), usually usable in URLs. |
| publication_name | platform-native meaning |
| publication_handle | platform-native meaning |
| publication_url | platform-native meaning |
| like_count | Likes. null means the platform or this capability does not disclose it; it is not 0. |
| comment_count | Comments. null means not disclosed, not 0. |
| repost_count | Reposts (as distinct from quote posts). null means not disclosed. |
| word_count | platform-native meaning |
| reading_time_minutes | platform-native meaning |
| post_type | platform-native meaning |
| audience | platform-native meaning |
| is_paid | platform-native meaning |
| podcast_url | platform-native meaning |
| image_url | Image link. Capabilities with several images may return an image_urls array. |
| posted_at | Publish time in ISO 8601, UTC (for example 2026-08-07T12:34:56+00:00). Non-standard strings from the platform are passed through as is, so parse defensively. null means the platform does not disclose it. |
| updated_at | platform-native meaning |
| tags | Array of tags. An empty array, not null, when there are none. |
| platform | Source platform identifier, the same as platform in the request (for example 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": { … }
}
```

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