Data APIs · Substack
Substack data API for AI agents
morigraph has one Substack data API, Substack Posts, that Claude, ChatGPT, Cursor, Codex or your own code can call. 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. You need no Substack developer account or API key, only one morigraph connection. A call costs 5.78 credits, about $578 for 1,000 calls, paid from one balance.
- APIs
- 1
- Price
- 5.78 credits a call
- Call it from
- MCP, command line and HTTP API
- Needs
- One morigraph connection. No Substack account or API key
Three ways to call it
Every data API is run by one tool, data_api, with the API's id and its arguments. The example is Substack Posts.
In your assistant (MCP). Connect once, then ask in plain words
claude mcp add --transport http --scope user morigraph https://morigraph.com/mcp
Use morigraph's Substack Posts data API with {"limit":3,"url":"https://www.astralcodexten.com"} and summarise what comes back.From a terminal or script (CLI)
npx @morigraph/cli@latest login
morigraph call data_api --json-args '{"api":"substack.posts","input":{"limit":3,"url":"https://www.astralcodexten.com"}}'From your own code (HTTP API)
curl https://api.morigraph.com/v1/tools/data_api \
-H "Authorization: Bearer $MORIGRAPH_API_KEY" \
-H "Content-Type: application/json" \
-d '{"api":"substack.posts","input":{"limit":3,"url":"https://www.astralcodexten.com"}}'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.
| Argument | Type | Required | What it is |
|---|---|---|---|
contentType | all | newsletter | podcast | thread | no | Restrict to a single post type, or 'all' (e.g. newsletter). Default "all". |
endDate | string | no | 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. |
includeComments | boolean | no | Include public comment threads and their direct replies on each post (e.g. true). Default false. |
includeContent | boolean | no | Include the full article body as text, HTML and Markdown. Set false for metadata only, which is faster (e.g. false). Default true. |
limit | integer | no | 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. |
maxComments | integer | no | Maximum comments collected per post when 'includeComments' is true (0-500, default 20). Costs nothing extra (e.g. 50). |
minComments | integer | no | Only return posts with at least this many comments (e.g. 10). |
minReactions | integer | no | Only return posts with at least this many reactions (e.g. 100). |
minWordCount | integer | no | Only return posts with at least this many words, which filters out short notes and announcements (e.g. 1000). |
onlyFree | boolean | no | Return only free (non-paywalled) posts (e.g. true). Default false. |
startDate | string | no | 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. |
url | string | yes | 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-rev… |
Returns authorBio authorHandle authorImage authorName authorUrl commentCount comments contentStatus createdUtc description hasVoiceover html image isPaid language markdown podcastUrl postId postType publication reactionCount replyCount restackCount slug subtitle text title updatedUtc url wordcount
The call
data_api({"api":"substack.posts","input":{"limit":3,"url":"https://www.astralcodexten.com"}})Good to know
- The price shown is the usual one. A call can cost more when the first source fails and another serves it; the most it can cost is shown beside each API, and
max_creditssets your own limit. - These APIs return public data. What you may do with it depends on the platform's terms and the privacy law where you operate, and that responsibility is yours.
- A failed call is not charged.
When to choose something else
Choose a provider that specialises in Substack data when you need it at high volume, on a schedule, or as bulk exports: you will get volume pricing and more control. Choose the platform's official API when you need data from your own account. These APIs are for an agent that needs an answer now, alongside other tools on the same balance.
Questions
Do I need a Substack API key or developer account?
No. morigraph supplies the access. You connect morigraph once to your assistant, or use one morigraph API key from your own code, and call the API on this page.
What does Substack data cost through morigraph?
5.78 credits a call, where a credit is about 10 cents. That is from about $578 for 1,000 calls. You pay per call from one balance, with no separate subscription.
Can Claude, ChatGPT or Cursor get Substack data?
Yes. Add morigraph as an MCP server, sign in once, then ask in plain words. Your assistant finds the right API with one search and runs it with one call.
Prices and availability read from the production service on . A credit is about 10 cents of tool use; see pricing. Your assistant can quote the exact cost before a paid call.