Substack Posts

https://api.sandbase.ai/v1/api/substack/posts

Pull posts from any Substack publication by its URL, or pass a single post URL (…/p/slug) to fetch just that one article. Returns title, subtitle, publish date, paywall status, word count, engagement (reactions, comments, restacks), author profile, publication details, the full article body as text, HTML and Markdown, and optional comment threads.

Price
$0.04USD / call
Method
POST
Response
JSON
Parameters
1 required · 11 optional
Production route

Try the model

Playground

Open playground
Input
Either a Substack publication URL / custom domain to fetch its recent posts (e.g. https://www.astralcodexten.com), OR a single post URL to fetch just that one article with full content (e.g. https://www.astralcodexten.com/p/your-book-review).
1100
Maximum number of recent posts to return when given a publication URL (1-100, default 25); ignored for a single post URL, which always returns that one post. You are billed per post returned, so a lower limit costs less. Range: 1 to 100.
Only return posts published on or before this date, format YYYY-MM-DD (e.g. 2024-12-31). Applied within the most recent 'limit' posts scanned.
Return only free (non-paywalled) posts (e.g. true).
Only return posts published on or after this date, format YYYY-MM-DD (e.g. 2024-01-01). Applied within the most recent 'limit' posts scanned, so raise 'limit' to reach older date ranges.
Restrict to a single post type, or 'all' (e.g. newsletter). Allowed values: all, newsletter, podcast, thread.
0500
Maximum comments collected per post when 'includeComments' is true (0-500, default 20). Costs nothing extra (e.g. 50). Range: 0 to 500.
Only return posts with at least this many comments (e.g. 10). Minimum: 0.
Only return posts with at least this many reactions (e.g. 100). Minimum: 0.
Only return posts with at least this many words, which filters out short notes and announcements (e.g. 1000). Minimum: 0.
Include the full article body as text, HTML and Markdown. Set false for metadata only, which is faster (e.g. false).
Include public comment threads and their direct replies on each post (e.g. true).
OutputReady

Your output will appear here

Complete the inputs, then click Run.

Model card

Specifications

Pricing

Base price
$0.04 / run

Request & response

Method
POST
Request body
application/json
Response
application/json
Execution
sync

Parameters

url
string · required
limit
integer · optional
endDate
string · optional
onlyFree
boolean · optional
startDate
string · optional
contentType
string (all, newsletter, podcast, thread) · optional
maxComments
integer · optional
minComments
integer · optional
minReactions
integer · optional
minWordCount
integer · optional
includeContent
boolean · optional
includeComments
boolean · optional

Access

Provider
Substack
API
Platform API
Base URL
https://api.sandbase.ai
Endpoint
/v1/api/substack/posts
Authentication
Bearer API key

API README

Substack Posts API

Pull posts from any Substack publication by its URL, or pass a single post URL (…/p/slug) to fetch just that one article. Returns title, subtitle, publish date, paywall status, word count, engagement (reactions, comments, restacks), author profile, publication details, the full article body as text, HTML and Markdown, and optional comment threads.

Request

curl -X POST "https://api.sandbase.ai/v1/run" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "substack/posts", "url": "https://www.astralcodexten.com", "limit": 3}'

The result is returned in outputs[0].data. Lookups that find nothing fail with a not-found error.

Parameters

NameTypeRequiredDescription
urlstringYesEither a Substack publication URL / custom domain to fetch its recent posts (e.g. https://www.astralcodexten.com), OR a single post URL to fetch just that one article with full content (e.g. https://www.astralcodexten.co
contentTypestringNoRestrict to a single post type, or 'all' (e.g. newsletter). One of: all, newsletter, podcast, thread. Default "all".
endDatestringNoOnly return posts published on or before this date, format YYYY-MM-DD (e.g. 2024-12-31). Applied within the most recent 'limit' posts scanned.
includeCommentsbooleanNoInclude public comment threads and their direct replies on each post (e.g. true). Default false.
includeContentbooleanNoInclude the full article body as text, HTML and Markdown. Set false for metadata only, which is faster (e.g. false). Default true.
limitintegerNoMaximum number of recent posts to return when given a publication URL (1-100, default 25); ignored for a single post URL, which always returns that one post. You are billed per post returned, so a lower limit costs less.
maxCommentsintegerNoMaximum comments collected per post when 'includeComments' is true (0-500, default 20). Costs nothing extra (e.g. 50).
minCommentsintegerNoOnly return posts with at least this many comments (e.g. 10).
minReactionsintegerNoOnly return posts with at least this many reactions (e.g. 100).
minWordCountintegerNoOnly return posts with at least this many words, which filters out short notes and announcements (e.g. 1000).
onlyFreebooleanNoReturn only free (non-paywalled) posts (e.g. true). Default false.
startDatestringNoOnly return posts published on or after this date, format YYYY-MM-DD (e.g. 2024-01-01). Applied within the most recent 'limit' posts scanned, so raise 'limit' to reach older date ranges.

Pricing

Billed at the actual cost of each call, usually $0.0444 per request. A call can cost more when the first data source fails and another one answers. Failed calls and lookups that find nothing are not charged.

Start building

Send your first request

Platform API endpoint with unified authentication and usage tracking.

Production API
Platform API endpoint
https://api.sandbase.ai/v1/api/substack/posts
Authorization header
Authorization: Bearer $SANDBASE_API_KEY
# The quoted heredoc keeps Unicode and shell metacharacters unchanged.
result=$(curl --fail-with-body --silent \
  -X POST "https://api.sandbase.ai/v1/api/substack/posts" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'SANDBASE_JSON'
{
  "url": "https://www.astralcodexten.com",
  "limit": 3,
  "onlyFree": false,
  "contentType": "all",
  "includeContent": true,
  "includeComments": false
}
SANDBASE_JSON
)
printf '%s\n' "$result"

Explore more

Related APIs

All APIs
APIPriceResponseReleased
SubstackFrom $0.04 per callJSONOct 31, 2026

Questions

FAQ

How do I use the Substack Posts API?

Send a POST request to https://api.sandbase.ai/v1/api/substack/posts with your SandBase API key in the Authorization header (Bearer) and the parameters as a JSON body. You can also try it in the Playground on this page without writing code.

How much does the Substack Posts API cost?

From $0.04 per call, billed from your SandBase balance. You are only charged for calls you make; there is no subscription.

What parameters does the Substack Posts API accept?

Required: url (string). Optional: limit (integer), endDate (string), onlyFree (boolean), startDate (string), contentType (one of all, newsletter, podcast, thread) and maxComments (integer) and 5 more. The Parameters table and the Playground on this page list every field.

What does the Substack Posts API return?

A JSON response returned in the same HTTP request (synchronous).

Do I need a Substack developer account or API key?

No. Substack Posts runs through SandBase, so one SandBase API key covers this endpoint and every other API and model in the catalog. You do not need to apply for Substack API access separately.