# 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. ## How 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: ```sh 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): ```sh 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): ```sh 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 `substack.posts` · 5.78 credits a call (about $578 for 1,000) 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). | | `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). | | `includeContent` | boolean | no | Include the full article body as text, HTML and Markdown. Set false for metadata only, which is faster (e.g. false). | | `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). | | `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` ``` data_api({"api":"substack.posts","input":{"limit":3,"url":"https://www.astralcodexten.com"}}) ``` ## 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. --- Canonical page: https://morigraph.com/tools/data/substack/ Prices read from the catalogue on 2026-11-27. These APIs return public data; how you may use it depends on the platform's terms and applicable law. All data APIs: https://morigraph.com/tools/data.md · Connect: https://morigraph.com/connect.md · Site overview: https://morigraph.com/llms.txt