Substack API Documentation
Developer documentation for Substack API endpoints used in this application.
Substack Search API
Search Publications
Endpoint URL
https://substack.com/api/v1/publication/search
Method
GETParameters
{
query: string, // Search term
skipExplanation: 'false',
sort: 'relevance',
page: number, // Page number (0-based)
limit: number // Results per page (max 100)
}Required Headers
{
'User-Agent': 'Mozilla/5.0',
'Accept': 'application/json',
'Origin': 'https://substack.com',
'Referer': 'https://substack.com/discover'
}Description
Search for Substack newsletters. Returns publication details including subscriber counts, engagement metrics, and metadata.
Example
GET https://substack.com/api/v1/publication/search?query=tech&page=0&limit=10
Post Statistics
Endpoint URL
https://{publication}.substack.com/api/v1/posts/{post_slug}Method
GETRequired Headers
{
'Accept': 'application/json',
'User-Agent': 'Mozilla/5.0'
}Description
Fetch engagement statistics for a specific post including likes, comments, and restacks.
Example
GET https://technews.substack.com/api/v1/posts/welcome-post
RSS Feeds
Publication Feed
Endpoint URL
https://{publication}.substack.com/{format}Method
GETDescription
Fetch publication's RSS feed containing recent posts.
Example
GET https://technews.substack.com/feed
Article Content
Article Content
Endpoint URL
https://{publication}.substack.com/p/{article-slug}Method
GETDescription
Fetch full article content. Returns HTML that contains the article's content and metadata.
Example
GET https://technews.substack.com/p/welcome-post
Usage Notes
Rate Limiting
Description
• Implement reasonable delays between requests • Handle API errors gracefully • Cache results when possible • Respect Substack's terms of service
Best Practices
Description
• Use proper user agent headers • Include error handling • Cache frequently accessed data • Implement pagination for large result sets • Handle redirects for RSS feeds • Process multiple posts in parallel using async requests