Skip to content

a692570/substack-opml-export

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

substack-opml-export

Export your Substack subscriptions as an OPML file so you can follow them in any RSS reader.


Why this exists

Substack has a great reader, but your subscriptions should not be locked to one platform. OPML is the universal format RSS readers use to import subscription lists. This tool generates one for you from your Substack account in about 30 seconds.

The older SOPML bookmarklet stopped working when Substack changed their reader URL. This repo uses the correct endpoint as of April 2026.


How to export (browser console method)

You do not need to install anything. The script runs directly in your browser.

Step 1. Go to substack.com and log in to your account.

Step 2. Open the browser developer console:

  • Chrome / Edge: Press Cmd + Option + J on Mac, or F12 on Windows. Click the Console tab.
  • Firefox: Press Cmd + Option + K on Mac, or F12 on Windows. Click the Console tab.
  • Safari: Enable Developer Tools first (Safari menu > Preferences > Advanced > check "Show features for web developers"), then press Cmd + Option + C.

Step 3. Copy the entire contents of bookmarklet.js from this repo.

Step 4. Paste it into the console and press Enter.

Step 5. A file named substack-subscriptions.opml downloads to your computer automatically.

Note on copy() in the console: The copy() command (which copies text to your clipboard from the console) only works in Chrome DevTools. In Firefox and Edge it is not available. You do not need copy() here — the script downloads the file directly.


How to export (bookmarklet method)

If you prefer not to open the console every time:

  1. Open index.html in your browser.
  2. Make sure your bookmarks bar is visible (Cmd + Shift + B on Mac).
  3. Drag the orange Export Substack OPML button to your bookmarks bar.
  4. Go to substack.com while logged in.
  5. Click the bookmarklet in your bookmarks bar. The OPML file downloads.

The bookmarklet is a self-contained JavaScript snippet — it does not send your data anywhere. Everything runs locally in your browser tab.


Importing the OPML file into your RSS reader

Once you have the .opml file, import it into your RSS reader of choice:

RSS Reader Import instructions
Feedly Left sidebar > Organize > Import OPML
NetNewsWire (Mac/iOS) File > Import Subscriptions
Reeder Settings > Accounts, then import
Inoreader Preferences > Subscriptions > Import
Miniflux Settings > Import
FreshRSS Subscription > Import
NewsBlur Account > Import

Most readers accept OPML under a menu named "Import", "Import Subscriptions", or "Add feeds from OPML".


What is OPML?

OPML (Outline Processor Markup Language) is an XML format that stores a list of RSS feed URLs. It was designed specifically as an export/import format for feed readers, so virtually every RSS reader supports it. Your Substack subscriptions each have an RSS feed at /feed — this tool collects all of them into a single OPML file.


How it works

Substack exposes /api/v1/subscriptions to logged-in users. The response includes each publication's name, subdomain, and custom_domain. The RSS feed URL is:

  • If the publication uses a custom domain: https://{custom_domain}/feed
  • Otherwise: https://{subdomain}.substack.com/feed

The script fetches this endpoint (from your already-logged-in browser session — no passwords or API keys required), builds the OPML XML, and triggers a file download.


Troubleshooting

"Failed to fetch" or empty results Make sure you are running the script from a tab that is already on substack.com and that you are logged in.

No file downloaded Some browsers block automatic downloads. Check for a download permission prompt in the address bar.

Script worked but my reader shows "0 feeds imported" Open the .opml file in a text editor and verify it contains <outline> elements. If the file is empty, your account may have no active subscriptions, or Substack may have changed their API.


Contributing

If the API endpoint changes and this stops working, open an issue or pull request with the updated approach.


License

MIT

About

Export your Substack subscriptions as OPML for any RSS reader

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors