Web research5 min readBy Purrkey teamUpdated

How to pull Substack posts by publication URL

Pull recent Substack posts or one article by URL with text, Markdown, engagement, and optional comments

On this page

You have three Substack publication URLs and need up to 40 recent posts from each to compare paywall mix and engagement before choosing two publications to monitor weekly. Call anyapi.substack.posts once per publication URL with limit 40, then read the returned records into a shortlist table. No run has been executed for this guide; the table below is a design

The deliverable is one row per post with title, publish timestamp, paywall flag, engagement counts, author, post type, content status, publication name and Markdown body. The shortlist decision sits beside those rows: compare the paywall mix and median engagement for each publication, then pick two

Example input and worksheet design

Example publication URLs, invented for this guide

Replace these with the real publication URLs from your address bar. The agent fills a table with these columns. Values here are placeholders showing the shape

titlecreatedUtcisPaidreactionCountcommentCountrestackCountauthorNamepostTypecontentStatuspublication.namemarkdown
(post title)(epoch seconds)true or false(integer)(integer)(integer)(author name)newsletter, podcast or threadfull, preview_only, metadata_only or failed(publication name)(article body as Markdown)

One row per post returned. Keep the source URL in a separate column in your own sheet if you need to trace a row back to the publication

The input to send

url is required. Paste a Substack publication home URL from the address bar, or pass one post URL ending /p/slug to fetch just that article. A publication URL returns recent posts; a single post URL returns that one post

For a publication URL, limit sets how many recent posts to return, from 1 to 100. The default is 25. Optional filters include contentType, startDate, endDate, minReactions, minComments, minWordCount, includeContent, includeComments and maxComments. Set includeContent to false for metadata only when you do not need the body

Agents call it through POST /v1/runs with toolId anyapi.substack.posts. The date filters are the step to watch. startDate and endDate apply within the most recent limit posts scanned, so raise limit to reach older ranges. limit maxes out at 100, and a single post URL ignores it

Reading the output fields

The response has found and data.items. When found is false, reason says why there is no result; the contract lists not_found as the reason value. A false found is a successful call, not an error, and costUsd is what it actually cost

Each item carries the fields that drive the shortlist. createdUtc is a UTC epoch timestamp in seconds; multiply by 1000 for a JavaScript Date in milliseconds. isPaid is the paywall flag, so count paid and unpaid rows per publication to get the paywall mix. reactionCount, commentCount and restackCount are the engagement counts for the post

contentStatus tells you whether the body is usable. It is full for the whole article, preview_only for the public excerpt of a paywalled post, metadata_only when no body was requested or available, or failed when extraction failed. Read it before trusting text, html or markdown. markdown is present when includeContent is true and contentStatus is full or preview_only

publication.name groups rows by publication. authorName and postType help you spot a podcast or thread that should not sit in the same comparison as a newsletter. Drop rows with contentStatus of metadata_only or failed from any Markdown analysis, but keep them for paywall and engagement counts

The agent prompt

Agent prompt
Set up https://purrkey.app/SKILL.md, then use Purrkey to pull recent
Substack posts from the three publication URLs below. Check the current
inputs and price of anyapi.substack.posts before running anything. Call
the tool once per publication URL with limit 40 and includeContent true.
Keep includeComments false unless I ask for comment threads. Return a
table with title, createdUtc, isPaid, reactionCount, commentCount,
restackCount, authorName, postType, contentStatus, publication.name and
markdown. Show createdUtc as epoch seconds. If found is false, add a row
with the URL and the reason. Do not guess missing fields.

Example URLs:
https://www.examplepublication.substack.com
https://www.example-harbor-notes.substack.com
https://www.example-field-notes.substack.com

Replace the example URLs with your own before running. The prompt keeps one call per publication URL, so the planned quantity is three calls

Estimated tool cost

Prices from the Purrkey catalog, read November 13, 2026. The unit is max_call: Maximum per call. Successful runs settle at the actual AnyAPI charge. The totals below are ceilings. Model fees for the agent are not counted

StepFormulaUnit pricePlanned quantityTotal
Single post URLcalls x max price$0.0444 per call1$0.0444
Three publication URLs, limit 25 eachcalls x max price$0.0444 per call3$0.1332

The limit-40 plan in this guide makes one call per publication URL, so three calls, and its total under the max_call unit is $0.1332. If you add a single post URL as a separate check, that call adds at most $0.0444

Pull the posts

Open the Substack posts tool and run the prompt against your three publication URLs

Get started by giving this to your agent

  • Claude Code
  • Codex
  • Gemini CLI
  • Cursor
  • GitHub Copilot
Set up https://purrkey.app/SKILL.md, then use Purrkey to show me what I can do with Substack.
Explore Substack tools and pricing

FAQ

How do I pull Substack posts by publication URL?

Paste the publication home URL into url and set limit for the number of recent posts. The tool returns post records with title, dates, paywall status, engagement, author details and content when requested.

What does anyapi.substack.posts take as input?

It requires url, which can be a publication home URL or a single post URL ending /p/slug. Optional fields include limit, contentType, startDate, endDate, minReactions, minComments, minWordCount, includeContent, includeComments and maxComments.

What do I check before trusting the markdown field?

Read contentStatus first. It is full, preview_only, metadata_only or failed; markdown is present when includeContent is true and contentStatus is full or preview_only.

How are dates returned?

createdUtc is a UTC epoch timestamp in seconds. Multiply by 1000 for a JavaScript Date in milliseconds.

How much does it cost to pull 40 posts from three publication URLs?

The catalog lists anyapi.substack.posts at up to $0.0444 per call under the max_call unit. Three publication URLs mean three calls, so the ceiling is $0.1332; model fees are not counted.

Why do date filters miss older posts?

startDate and endDate apply within the most recent limit posts scanned. Raise limit to reach older ranges; limit maxes out at 100.

What happens for a single post URL?

A single post URL ending /p/slug returns that one post and ignores limit. The cost ceiling for one call is $0.0444.

Next step

Try this with Substack

The tool directory lists every endpoint with its current price. Inspect the inputs there, then let your agent run a small batch before scaling up.

See Substack tools

Share this article