---
title: "Substack API: Get Publication Posts as JSON | Perceptlayer"
description: "Substack documents RSS feeds and an export, not a public API. Four endpoints return a publication, its posts list, one post and comments at 1 credit a call."
url: https://perceptlayer.com/blog/substack-api-publication-posts
---

[Blog](https://perceptlayer.com/blog) / [API guides](https://perceptlayer.com/blog/category/api-guides)

# Substack API: Get Publication Posts as JSON

24 Oct 2026 Perceptlayer 6 min read

Substack doesn't document a public API. What it documents is an RSS feed for every publication, at `yourpublication.substack.com/feed`, and an export that lets a writer download their own posts and subscriber list. For public posts as JSON, four endpoints cover the gap: `publication`, `posts` (sorted by `new` or `top`, paged with `offset` and `limit`), `post` by slug, and `comments`. Each costs 1 credit per successful call. This guide shows when the RSS feed is enough, how to pull a newsletter's archive with the endpoints, and what that costs.

## Key takeaways

-   Substack's documented ways out are the RSS feed at `/feed` and the writer's own export from Settings; there's no documented public API.
-   `GET /v1/substack/posts` takes a `publication` plus optional `sort` ( `new` or `top`), `offset` and `limit`; `GET /v1/substack/post` takes `publication` and a post `slug`.
-   An archive pull is one `posts` call per page plus one `post` call per article: 200 articles is about 200 credits, plus the listing pages.
-   All four endpoints are restricted: accept the restricted-endpoint terms first, use public posts only, and never collect subscriber data.

## Does Substack have an official API?

No public one. Substack's help centre documents two ways to get content out. Every publication has an RSS feed at its address followed by `/feed`, such as `yourname.substack.com/feed` ( [Substack support: RSS feed](https://support.substack.com/hc/en-us/articles/360038239391-Is-there-an-RSS-feed-for-my-publication), 2026). And a writer can export their own publication from Settings, which produces a zip with their posts, subscriber list and stats ( [Substack support: export](https://support.substack.com/hc/en-us/articles/360037466012-How-do-I-export-my-posts), 2026).

Developers sometimes call Substack's internal web endpoints directly, the ones its own site uses. Those aren't documented, can change without notice, and are governed by Substack's terms, so we don't recommend building on them.

Use what Substack documents first. If you want new posts from a few newsletters, the RSS feed is free, official and enough. If you're the writer and want your own archive or subscribers, use the export: it's the only legitimate route to subscriber data.

## When is the RSS feed enough, and when isn't it?

The RSS feed is enough when you need recent posts from a known publication in a feed reader, a Slack channel or a simple script. It's a standard format every language can parse, and it's free. It falls short in three cases: a feed may hold only a publication's recent posts rather than its full archive, it's ordered by date only, and it has no comment data.

| Need | RSS feed | Export | Endpoints |
| --- | --- | --- | --- |
| New posts from a publication | Yes | Your own only | Yes, `posts` with `sort=new` |
| Full archive of a publication | May hold only recent posts | Your own only | Yes, page `posts` with `offset` |
| Most popular posts | No | No | Yes, `posts` with `sort=top` |
| One post by URL | In the feed if recent | Your own only | Yes, `post` by `slug` |
| Comments on a post | No | No | Yes, `comments` (restricted) |
| Subscriber list | No | Your own only | No, never |
| Cost | Free | Free | 1 credit per successful call |

If your need sits in the first column, stop here and use the feed. The rest of this guide is for the archive, popularity and many-publications cases.

## How do you get a publication's posts as JSON?

Call `posts` with the publication's name, a sort order and a page. The `publication` parameter is the publication's name (up to 64 characters); the catalogue's example uses `slowboring`. This is that example request:

```bash
curl "https://api.perceptlayer.com/v1/substack/posts?publication=slowboring&sort=new&offset=0&limit=2" \
  -H "X-API-Key: $API_KEY"
```

| Endpoint | Required | Optional | Returns |
| --- | --- | --- | --- |
| `GET /v1/substack/publication` | `publication` |  | The publication's details |
| `GET /v1/substack/posts` | `publication` | `sort` ( `new`, `top`), `offset`, `limit` | A page of the publication's posts |
| `GET /v1/substack/post` | `publication`, `slug` (up to 300 characters) |  | One post |
| `GET /v1/substack/comments` | `publication`, `post_id` (up to 32 characters) |  | A post's comments |

A post's `slug` is the last part of its URL: for `yourname.substack.com/p/some-post-title` it's `some-post-title`. We didn't run these requests for this post, and we haven't recorded a response from the Substack endpoints yet, so we can't show the fields. Run `posts` in the playground on the [Substack API page](https://perceptlayer.com/apis/substack) to see what each item carries, including the slug and ID you pass to `post` and `comments`, and how large a `limit` the endpoint accepts. Send the key in the `X-API-Key` header; the [authentication docs](https://docs.perceptlayer.com/authentication) cover the rest.

## How do you pull a newsletter's archive?

Page through `posts` with `sort=new`, raising `offset` by `limit` each time until a page comes back empty, then fetch each post you need with `post`. A minimal Python version:

```python
import os
import time

import requests

API = "https://api.perceptlayer.com/v1/substack"
HEADERS = {"X-API-Key": os.environ["API_KEY"]}

def get(path, **params):
    resp = requests.get(f"{API}/{path}", params=params, headers=HEADERS, timeout=90)
    if resp.status_code == 429:
        time.sleep(int(resp.headers.get("Retry-After", "5")))
        return get(path, **params)
    resp.raise_for_status()
    return resp.json()

def list_pages(publication, limit=20):
    offset = 0
    while True:
        page = get("posts", publication=publication, sort="new", offset=offset, limit=limit)
        if not page:
            break
        yield page
        offset += limit

for page in list_pages("slowboring"):
    print(page)  # inspect the shape once, then pick out slugs and fields
    break
```

We didn't run this against the live API; we ran it with a mocked HTTP client that answered a 429 and then one page, which it retried and printed. It stops at the first page and prints it on purpose: without a recorded response we don't know whether `posts` returns a list or an object with a list inside, so check the shape once and adjust the stop condition and the slug field before you run the full loop. Store each post's slug as you go, so a re-run only fetches new posts.

### What does an archive pull cost?

Each successful call costs 1 credit, and failed calls cost nothing. A 200-post archive at 20 posts a page is 10 listing calls, plus 200 `post` calls if you need each full post: 210 credits. Checking 50 newsletters weekly for new posts is 50 × 4 = 200 credits a month. Both are more than the 100 free credits every account gets once, after verifying an email address, which cover a 50-post archive (3 listing calls plus 50 `post` calls) or the first two weekly checks of 50 newsletters; ongoing use needs a pack. See [pricing](https://perceptlayer.com/pricing) for packs. Every successful response reports `X-Credits-Used` and `X-Credits-Remaining`, and the [credits docs](https://docs.perceptlayer.com/credits) explain balances.

## What are the terms for these endpoints?

All four Substack endpoints are restricted endpoints. They work after you accept the [restricted-endpoint terms](https://perceptlayer.com/legal/restricted-endpoints) in your dashboard; before that, a call returns `restricted_endpoint` (403). Use them for public posts. Paid posts behind a paywall are the writer's paid content, not public data. Comments carry commenters' names, so use them only in aggregate, such as counts or topics, and never to profile or contact people. There's no subscriber endpoint, and nothing here should be used to build lists of readers.

Respect the writer, too: quote briefly and link back, as you would with any publication. Data is collected from publicly available sources and returned as found at the time of the call.

To start, accept the terms, then run `publication` and `posts` for a newsletter you read in the playground on the [Substack API page](https://perceptlayer.com/apis/substack). For turning posts into model input, see [Website to Markdown: Clean Page Text for LLMs](https://perceptlayer.com/blog/website-to-markdown-for-llms); other sources are under [Social media](https://perceptlayer.com/verticals/social). [Get a free API key](https://perceptlayer.com/signup) to run the archive script.

## APIs in this post

-   [Substack **1 credit per call** · 4 endpoints](https://perceptlayer.com/apis/substack)

## Frequently asked questions

### Is there an official Substack API?

Substack doesn't document a public API. It documents an RSS feed for each publication at `/feed` and an export of a writer's own posts, subscribers and stats from Settings. Its site uses internal endpoints, but they're undocumented and can change without notice. The endpoints here return public posts as JSON at 1 credit per call.

### How do I get all posts from a Substack newsletter?

Call `GET /v1/substack/posts` with the `publication`, `sort=new`, an `offset` and a `limit`, and raise `offset` by `limit` until a page comes back empty. Each page costs 1 credit. Then fetch full posts with `GET /v1/substack/post` by `slug`, 1 credit each. If you only need recent posts, the free RSS feed may be enough.

### Can I get a Substack newsletter's subscribers?

Only your own, through Substack's export in your publication's Settings. Subscriber lists of other newsletters are private, and no endpoint here returns them. Collecting readers' details without a lawful basis would break privacy law and the restricted-endpoint terms.

### Can I read paywalled Substack posts through the API?

No. The endpoints return public content as found; paid posts are the writer's paid content. If you subscribe to a newsletter, read it on Substack or in your email. For your own paid posts, use Substack's export, which includes your full archive.

### What happens if a Substack call fails?

You get an HTTP status and a JSON body with a `code`, a `message` and a `request_id`, and you aren't charged. `restricted_endpoint` (403) means the terms haven't been accepted; `not_found` (404) usually means a wrong `publication` or `slug`; `rate_limited` (429) carries `Retry-After`. The [errors docs](https://docs.perceptlayer.com/errors) list every code.

substack newsletters substack api rss content data

## More from the blog

1.  [API guides](https://perceptlayer.com/blog/category/api-guides) 26 Nov 2026 Perceptlayer 7 min read
    
    ## [Depop API: Resale Listings as JSON](https://perceptlayer.com/blog/depop-api-json)
    
    Search Depop listings as JSON with brand, condition, sizes and price.amount per item; the recorded jacket search had a total\_count of 6,815,522. 1 credit.
    
2.  [API guides](https://perceptlayer.com/blog/category/api-guides) 26 Nov 2026 Perceptlayer 7 min read
    
    ## [Similarweb API: Website Traffic Data as JSON](https://perceptlayer.com/blog/similarweb-api-json)
    
    Get Similarweb traffic estimates as JSON: visits, bounce\_rate, traffic\_sources, top\_countries and top\_keywords for a domain, at 1 credit a call.
    
3.  [API guides](https://perceptlayer.com/blog/category/api-guides) 26 Nov 2026 Perceptlayer 7 min read
    
    ## [StockTwits API: Symbol Streams as JSON](https://perceptlayer.com/blog/stocktwits-api-json)
    
    Three StockTwits endpoints as JSON: a symbol's message stream with sentiment and cursor, symbol search and trending symbols, each 1 credit a call.
