Public APIs
Substack API Wrapper favicon

Substack API Wrapper

News

Substack's newsletter platform now has an API wrapper, for easy access to latest posts.

Substack API Wrapper's website screenshot

About Substack API Wrapper

Substack API is an unofficial Python client library for interacting with Substack newsletters and content. It provides interfaces to retrieve newsletter posts, podcasts, and recommendations, get user profile information and subscriptions, fetch post content and metadata, search for posts within a newsletter, browse categories, and access publication subscriber chats and threads. The library also supports accessing paywalled content using user-provided authentication cookies from a logged-in Substack session.

The library is installable via pip or uv and includes a command-line interface for retrieving posts, searching, fetching post metadata, looking up user subscriptions, and browsing categories, with JSON output by default. It also includes automatic handling of Substack account handle changes, following redirects when a user has renamed their account, with an option to disable this behavior or manually resolve handle redirects.

This is intended for Python developers who want programmatic access to Substack content, including their own paywalled or subscribed newsletters, through either the Python API or the CLI.

Key features

  • Retrieve newsletter posts, podcasts, and recommendations
  • Fetch post metadata and HTML content
  • Search for posts within a newsletter
  • Access paywalled content using user-provided session cookies
  • Look up user profiles and subscriptions
  • Includes a command-line interface for JSON output

Frequently asked questions

What is this library for?

It is an unofficial Python client for interacting with Substack newsletters, posts, users, and chats via Substack's unofficial API.

How do I install it?

Install with pip install substack-api or uv add substack-api.

Can I access paywalled content?

Yes, by providing your own exported session cookies from a logged-in Substack account via the SubstackAuth class.

Does it offer a command-line interface?

Yes, it includes a CLI that outputs JSON by default and supports commands for newsletters, posts, users, and categories.

What license is it released under?

It is released under the MIT license.

Advertise here

Featured products

  • SerpApi - Search API favicon
  • Screenshot Scout favicon
  • TalorData favicon
  • CoreClaw favicon

Show your product to thousands of developers

ยท 100k monthly pageviews
ยท 7k newsletter subscribers

Advertise your product