How To Convert Medium Articles In Markdown Format

Medium Articles → Markdown → HTML

Image by the Author

There are several reasons why you might want to convert a Medium article from its original format to Markdown and then to HTML. In this article, I'll explain to you how you can do it using Python programming language with a few simple steps.

Why might you wanna do it?

Some of the benefits of using Markdown include:

Overall, converting a Medium article to Markdown can provide many benefits, such as making it easier to edit and format the article and enabling you to integrate it with other tools and platforms.

Whether or not this is the right approach for you will depend on your specific needs and goals.

Now let's jump to the code!


Python Code to convert Medium Article into Markdown and HTML


Code Explanation -

The code you provided is a Python script that uses the medium_api library to access the Unofficial Medium API and convert an article from Markdown to HTML.

You can install medium-api using the following command:

pip install medium-api

Here is a brief explanation of what the code does:

Overall, this code demonstrates how to use the medium_api library to access the Unofficial Medium API and convert an article from Markdown to HTML. It is not a complete application but rather a sample of how the API can be used in a Python script.


Resources 🚀

Thanks for reading, and have a nice day!


PS: We post tutorials, videos, code snippets, and insights related to Medium and our API. So be sure to follow us on


Related Articles -