How to reverse engineer the Substack (or any!) web API
Building an unauthorized Substack client with Claude.
I've been writing on Substack for over a year and a half now, and I really enjoy the platform. But something that's bugged me from almost day one has been the lack of an official API. I’ve got a bunch of automations and integrations I’d like to build, not least of which is my live subscriber counter:
Fortunately, I'm a software developer, which means I can rationalize my way into spending time on useless hobbies reverse engineer the Substack API to build my own Python client!
After trying a handful of different AI-based approaches, I found one that generalizes to nearly any browser-based API - meaning that as long as you can use it in Chrome, you can build your local wrapper.
So, let's walk through the steps of my unofficial Substack Python client using Claude 3.5 Sonnet.
Here's the rough strategy: