Skip to content

How to get Substack posts and full text with an API

Updated · 2 steps

Fetchproof returns any Substack publication's latest public posts and the full text of any public post as JSON, so you can track newsletters, build a reading digest or index posts for search, without scraping each site yourself.

01

List a publication's latest posts

Pass the publication's hostname, or a name that lives at name.substack.com. Each post has its id, title, url and published_at.

GET /v1/substack/posts 1 credit per call

cURL

curl --request GET 'https://api.fetchproof.com/v1/substack/posts?publication=astralcodexten.substack.com' \
  --header 'x-api-key: YOUR_API_KEY'

JavaScript

const response = await fetch("https://api.fetchproof.com/v1/substack/posts?publication=astralcodexten.substack.com", {
  method: 'GET',
  headers: {
    'x-api-key': process.env.FETCHPROOF_API_KEY,
  },
});
const data = await response.json();
console.log(data);

Python

import os
import requests

response = requests.get(
    "https://api.fetchproof.com/v1/substack/posts?publication=astralcodexten.substack.com",
    headers={"x-api-key": os.environ["FETCHPROOF_API_KEY"]},
)
print(response.json())

Go

package main

import (
  "fmt"
  "io"
  "net/http"
  "os"
)

func main() {
  req, _ := http.NewRequest("GET", "https://api.fetchproof.com/v1/substack/posts?publication=astralcodexten.substack.com", nil)
  req.Header.Set("x-api-key", os.Getenv("FETCHPROOF_API_KEY"))
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)
  fmt.Println(string(body))
}

PHP

<?php
$ch = curl_init("https://api.fetchproof.com/v1/substack/posts?publication=astralcodexten.substack.com");
curl_setopt_array($ch, [
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    'x-api-key: ' . getenv('FETCHPROOF_API_KEY'),
  ],
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Excerpt of published sample response Full response →
{
  "success": true,
  "credits_remaining": 100,
  "credits_charged": 1,
  "publication": "astralcodexten.substack.com",
  "posts": [
    {
      "id": "224567415",
      "title": "Vote In The 2026 Book Review Contest",
      "url": "https://www.astralcodexten.com/p/vote-in-the-2026-book-review-contest",
      "published_at": "2026-11-14T00:23:27.919Z"
    }
  ]
}
02

Get one post's full text

Pass the publication and the post's slug, the last part of its URL after /p/. The response has the title, the body as html, and the same body as plain text for search indexing or summaries.

GET /v1/substack/post 1 credit per call

cURL

curl --request GET 'https://api.fetchproof.com/v1/substack/post?publication=astralcodexten.substack.com&slug=vote-in-the-2026-book-review-contest' \
  --header 'x-api-key: YOUR_API_KEY'

JavaScript

const response = await fetch("https://api.fetchproof.com/v1/substack/post?publication=astralcodexten.substack.com&slug=vote-in-the-2026-book-review-contest", {
  method: 'GET',
  headers: {
    'x-api-key': process.env.FETCHPROOF_API_KEY,
  },
});
const data = await response.json();
console.log(data);

Python

import os
import requests

response = requests.get(
    "https://api.fetchproof.com/v1/substack/post?publication=astralcodexten.substack.com&slug=vote-in-the-2026-book-review-contest",
    headers={"x-api-key": os.environ["FETCHPROOF_API_KEY"]},
)
print(response.json())

Go

package main

import (
  "fmt"
  "io"
  "net/http"
  "os"
)

func main() {
  req, _ := http.NewRequest("GET", "https://api.fetchproof.com/v1/substack/post?publication=astralcodexten.substack.com&slug=vote-in-the-2026-book-review-contest", nil)
  req.Header.Set("x-api-key", os.Getenv("FETCHPROOF_API_KEY"))
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)
  fmt.Println(string(body))
}

PHP

<?php
$ch = curl_init("https://api.fetchproof.com/v1/substack/post?publication=astralcodexten.substack.com&slug=vote-in-the-2026-book-review-contest");
curl_setopt_array($ch, [
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    'x-api-key: ' . getenv('FETCHPROOF_API_KEY'),
  ],
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Excerpt of published sample response Full response →
{
  "success": true,
  "credits_remaining": 100,
  "credits_charged": 1,
  "slug": "vote-in-the-2026-book-review-contest",
  "title": "Vote In The 2026 Book Review Contest",
  "html": "<p>If you’ve read the finalists of this year’s non-book review contest, <strong><a href=\"h…",
  "text": "If you’ve read the finalists of this year’s non-book review contest, vote for your favorit…"
}

What it costs

Each call costs 1 credit. A publication with no posts on the page costs 0, and cache_max_age serves a recent cached copy for 0 credits.

Limits

Only public posts are returned. The posts list is the publication's latest posts, not its full archive.

Try it with 100 free credits

Sign up with an email address, no card. Credits never expire. Errors cost 0 credits, and each endpoint page lists exactly what it charges.