English | 简体中文
List the posts of any Substack publication with likes, comments, restacks, word counts and authors as JSON.
Powered by Serpent API. Full reference: Substack Posts API docs.
- Get an API key at apiserpent.com. Every account starts with 10 free API calls.
- Call the endpoint with your key in the
X-API-Keyheader:
curl -G "https://apiserpent.com/api/substack/posts" \
--data-urlencode "publication=astralcodexten" \
--data-urlencode "sort=top" \
-H "X-API-Key: $SERPENT_API_KEY"GET https://apiserpent.com/api/substack/posts
| Parameter | Required | Description |
|---|---|---|
publication |
Yes | Substack name (astralcodexten), a substack.com address, or a custom domain |
sort |
No | new (default) or top |
cursor |
No | next_cursor from the previous response |
success, publication, sort, posts[] (up to 25), next_cursor. Each post has id, title, subtitle, url, published_at, audience, type, tags, word_count, likes, comments, restacks, cover_image, authors[], excerpt.
See the docs for the complete field list and sample responses.
| File | Language | Run |
|---|---|---|
example.py |
Python 3 (pip install requests) |
SERPENT_API_KEY=sk_live_... python example.py |
example.mjs |
Node.js 18+ (no dependencies) | SERPENT_API_KEY=sk_live_... node example.mjs |
- Newsletter research and benchmarking
- Content trend analysis
- Feeding posts into RAG or summarisation pipelines
- Serpent API docs - Google, Bing, Yahoo, DuckDuckGo and Brave search, plus AI rank tracking
- All SDKs and tools on GitHub
MIT