Member-only story
Wrapping the Medium RSS Feed API with Python

An Introduction— The Medium RSS Feed
If you didn’t already know, Medium has an RSS feed that provides data (in XML format) for your publications, which is useful if you want to have a list of Medium articles on your personal portfolio website.
This is the URL: https://medium.com/feed/@your-username-here
Replace your-username-here with your own username, and you should get your RSS Feed URL. For instance, my username is zl-liu, so my RSS Feed URL is https://medium.com/feed/@zl-liu .
To test if your RSS feed URL is valid, visit it using your browser, and you should see a bunch of data in XML format, like this:

What data the Medium RSS Feed API provides
- Publication titles
- Thumbnail images for each publication
- A link to your publication on Medium
- Publication dates for each publication
- A short snippet of your publication you can display on your website
- Etc
An example — My publications on my Personal Portfolio Site

Can we get the response in JSON format?
Don’t think so, unless Medium updates the existing API. Hence this short tutorial for anyone who faced this same problem as me a couple of weeks ago.
The Solution
If you don’t want to deal with XML, I’ve written a function that calls your Medium RSS Feed API, processes the XML data, and converts it into a list of dictionaries, which you can easily convert into JSON.
A sample output (in JSON) served through Python FastAPI: