Post Content API

Get the complete body of any Substack post. Returns content in both HTML and plaintext formats with automatic section detection. For paywalled posts, the response splits content into free_text and paid_text at the exact paywall boundary.

GET/v1/posts/:slug

Highlights

Full post body in HTML and plaintext
Automatic section/heading detection
Paywall boundary splitting (free_text / paid_text)
Image and embed extraction
Footnote and annotation parsing
Works with subscriber-only content (Pro plan)

Code Example

javascript
const res = await fetch(
  "https://stackhooks.com/v1/posts/the-ai-wars-begin",
  { headers: { Authorization: "Bearer sk_live_..." } }
);
const { data } = await res.json();
console.log(data.free_text.substring(0, 200));
if (data.paid_text) {
  console.log("Paid content available");
}

Response

json
{
  "data": {
    "slug": "the-ai-wars-begin",
    "title": "The AI wars begin",
    "html": "<div>...</div>",
    "free_text": "The first 500 words...",
    "paid_text": "Premium content...",
    "sections": ["Introduction", "Analysis", "Conclusion"],
    "word_count": 2340
  }
}

Start building today

Create a free account and start pulling structured Substack data in minutes.