Substack
Overview
Newsletter and long-form content platform. Content platform archetype.
Workflows
Find and read a post
searchPosts(query) → slug, publication.subdomain
getPost(subdomain=publication.subdomain, slug) → full article with body_html
Browse a publication's posts
getArchive(subdomain) → posts with id, slug
getPost(subdomain, slug) → full article with id, title, body_html
getPostComments(subdomain, postId=id) → discussion with body, name, children
Search within a publication
getArchive(subdomain, search="keyword") → filtered posts with slug
getPost(subdomain, slug) → full article
Operations
| Operation |
Intent |
Key Input |
Key Output |
Notes |
| searchPosts |
find posts by keyword |
query |
title, slug, publication.subdomain, post_date |
entry point; cross-publication |
| getArchive |
list/search posts in a publication |
subdomain ← searchPosts (or known) |
id, title, slug, post_date, audience |
paginated (offset, limit) |
| getPost |
read full article |
subdomain, slug ← searchPosts / getArchive |
title, body_html, word_count, reaction_count |
slug from search or archive |
| getPostComments |
read discussion |
subdomain, postId ← getArchive / getPost |
body, name, date, reaction_count, children |
nested replies via children |
Quick Start
# Search for posts about AI
openweb substack exec searchPosts '{"query":"artificial intelligence"}'
# List recent posts from a publication
openweb substack exec getArchive '{"subdomain":"astralcodexten","sort":"new","limit":5}'
# Read a specific post
openweb substack exec getPost '{"subdomain":"astralcodexten","slug":"open-thread-427"}'
# Get comments on a post
openweb substack exec getPostComments '{"subdomain":"astralcodexten","postId":158504113}'
1---2name: substack3description: Substack4---5# Substack67## Overview8Newsletter and long-form content platform. Content platform archetype.910## Workflows1112### Find and read a post131. `searchPosts(query)` → `slug`, `publication.subdomain`142. `getPost(subdomain=publication.subdomain, slug)` → full article with `body_html`1516### Browse a publication's posts171. `getArchive(subdomain)` → posts with `id`, `slug`182. `getPost(subdomain, slug)` → full article with `id`, `title`, `body_html`193. `getPostComments(subdomain, postId=id)` → discussion with `body`, `name`, `children`2021### Search within a publication221. `getArchive(subdomain, search="keyword")` → filtered posts with `slug`232. `getPost(subdomain, slug)` → full article2425## Operations2627| Operation | Intent | Key Input | Key Output | Notes |28|-----------|--------|-----------|------------|-------|29| searchPosts | find posts by keyword | query | title, slug, publication.subdomain, post_date | entry point; cross-publication |30| getArchive | list/search posts in a publication | subdomain ← searchPosts (or known) | id, title, slug, post_date, audience | paginated (offset, limit) |31| getPost | read full article | subdomain, slug ← searchPosts / getArchive | title, body_html, word_count, reaction_count | slug from search or archive |32| getPostComments | read discussion | subdomain, postId ← getArchive / getPost | body, name, date, reaction_count, children | nested replies via children |3334## Quick Start3536```bash37# Search for posts about AI38openweb substack exec searchPosts '{"query":"artificial intelligence"}'3940# List recent posts from a publication41openweb substack exec getArchive '{"subdomain":"astralcodexten","sort":"new","limit":5}'4243# Read a specific post44openweb substack exec getPost '{"subdomain":"astralcodexten","slug":"open-thread-427"}'4546# Get comments on a post47openweb substack exec getPostComments '{"subdomain":"astralcodexten","postId":158504113}'48```