POST

API health

24h health
Normal
  • Healthy / normal
  • Available
  • Limited
  • Mostly down
Normal

Last 24 hours

Last 30 days

List posts from a Substack publication. Each post has title, subtitle, author, likes, comments, word count, reading time and paid status. Narrow by format with content_type or by date with since and until. Paywalled text stays locked, and one batch may not cover the whole archive.

Send POST https://api.everyinfra.com/api/v1/social with platform set to substack and action set to publication_posts. Price $1.39 per 1,000 requests ($0.001389 per call). Failed calls and empty results are not charged. Synchronous. For slow jobs add "mode": "async" to the body, take the job_id and poll.

AI prompt

#
Please help me write a data collection script with the EveryInfra Substack Publication posts endpoint (substack/publication_posts).

How the endpoint works:
- Request: POST https://api.everyinfra.com/api/v1/social with the header Authorization: Bearer <API key>. Read the key from the EVERYINFRA_API_KEY environment variable and never hard-code it.
- In the request body, set platform to substack and action to publication_posts, and put the parameters inside params.
- Required parameters:
  - url: Specifies the target Substack resource link. Use publication homepages for publication and publication_posts, or direct /p/ post links for post and comments.
- Optional parameters:
  - content_type: Filters publication posts by content format using all_types, newsletter_posts_only, podcast_episodes_only, or threads_only. (allowed: all_types / newsletter_posts_only / podcast_episodes_only / threads_only)
  - since: 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: 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: 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. (default: 10)
- Returns a list of records. Main fields of each record: id, url, title, subtitle, text, author_name, author_username, publication_name, publication_handle, publication_url, like_count, comment_count; 23 fields in total, full list at https://api.everyinfra.com/api/v1/social/catalog?platform=substack.
- Example request body:
{
  "platform": "substack",
  "action": "publication_posts",
  "params": {
    "url": "https://astralcodexten.substack.com"
  }
}
- Price: $1.39 per 1,000 requests; failed and empty results are not charged.
- For dozens or hundreds of targets, add "mode": "async" to the body: you get a job_id at once and poll GET https://api.everyinfra.com/api/v1/jobs/{job_id} for the result.
- On 422, fix the request using the suggested parameter names and allowed values in the error; on 429 or 503, wait for Retry-After and try again.

Before writing code, ask me which targets I need, how many, which fields, and what output format I want; then confirm the plan and the rough cost with me.

Request parameters

#
NameInTypeRequiredDefaultDescription
AuthorizationheaderstringYes-Bearer followed by your API key. Create it in the console; never put it in a URL or a code repository.
platformbodystringYessubstackPlatform identifier, fixed value.
actionbodystringYespublication_postsCapability identifier, fixed value.
urlbody.paramsstringYes-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_typebody.paramsstring (enum)No-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.Allowed valuesall_typesnewsletter_posts_onlypodcast_episodes_onlythreads_only
sincebody.paramsdateNo-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.
untilbody.paramsdateNo-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.
limitbody.paramsinteger (1–30)No10The 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.

Code samples

#
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"
  }
}'

OpenAPI definition (JSON)Samples read the key from the EVERYINFRA_API_KEY environment variable; copied code never contains your key.

Response example

#
Captured September 26, 2026 at 08:56 (UTC) by calling this API with the parameters in the code sample above. results and count are that call's real response with personal information (names, handles, avatars, profile links, contact details) removed; the list keeps the first 2. id, billing and quota differ on every call, so only their shape is shown.
json
{  "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": { … }}

Response fields

#

Business data is in results. The table lists the fields a record can contain; values the platform does not show are never made up.

FieldMeaning
idThe record's unique ID on the platform. Unique only within one platform; IDs can repeat across platforms.
urlLink to the record on the platform.
titleTitle. null when the platform has no titles (for example text-only posts).
subtitleKeeps the platform's own meaning
textBody 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_nameAuthor's display name.
author_usernameAuthor's username (@handle), usually usable in URLs.
publication_nameKeeps the platform's own meaning
publication_handleKeeps the platform's own meaning
publication_urlKeeps the platform's own meaning
like_countLikes. null means the platform or this capability does not disclose it; it is not 0.
comment_countComments. null means not disclosed, not 0.
repost_countReposts (as distinct from quote posts). null means not disclosed.
word_countKeeps the platform's own meaning
reading_time_minutesKeeps the platform's own meaning
post_typeKeeps the platform's own meaning
audienceKeeps the platform's own meaning
is_paidKeeps the platform's own meaning
podcast_urlKeeps the platform's own meaning
image_urlImage link. Capabilities with several images may return an image_urls array.
posted_atPublish 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_atKeeps the platform's own meaning
tagsArray of tags. An empty array, not null, when there are none.
platformSource platform identifier, the same as platform in the request (for example xiaohongshu, tiktok).

Errors and billing

#
401
Missing or invalid key.
402
Insufficient balance. Top up first.
422
Invalid parameter name or value. Fix it using the suggestions in the error. No charge.
429
Per-minute request limit reached. Wait for Retry-After, then try again.
503
Could not complete. The held charge is returned to your balance. If the outcome is unknown, verify it before you retry.
200 empty
No data. No charge.

Errors

Official references

#

Used only to check objects and terms. They do not imply authorization or endorsement of EveryInfra by the platform.

  • Substack: Article, Audio, and Video Formats vs. Content Permissions ↗

    Substack categorizes text, audio, and video posts as distinct content formats and maintains a strict separation between public materials and private articles. The `content_type` parameter on this page uses its own allowed values, which do not add video types or guarantee that filtering and retrieval are verified across every execution path.

    Checked 2026-09-04

Google Analytics needs consent. Privacy