How To Retrieve Medium Stories For A User From The API?

Easiest method for scrapping Medium Articles written by any user, using Unofficial Medium API

Image by the author

Medium API (Unofficial Version), helps you to efficiently gather data from Medium's website, using just a few endpoints. I'll show you how you can fetch any user's Medium stories with 3 simple steps.

Here, for demonstration purposes, I'll be fetching Zulie Rane's articles, but you can do the same for any other author, or for yourself.

If you get stuck somewhere, please check out this easy-to-follow documentation -

Register to RapidAPI to get YOUR_APIKEY (It won't take long, trust me!)

So let's get started!


Note: To avoid repetition, I omitted the header parameter in the curl requests. Please add your API Key in the header while using curl. Example -

# curl -H "x-rapidapi-key: YOUR_KEY" "https://medium2.p.rapidapi.com/user/id_for/nishu-jain"

Note: If you're a Python Developer, then I've got a special tutorial for you. Please follow the link below:


Step-1: Get the User ID of your desired Author

For getting the user_id, you'll need username. I know the username of Zulie Rane is "zulie", so I can get her unique user_id and use it to fetch all the articles written by her.

Endpoint -

GET /user/id_for/{username}

Image by the author
user_id = "14d5c41e0264"

Step-2: Get Articles written by the User

Endpoint -

GET /user/{user_id}/articles

This endpoint returns a list of article_ids which we'll use to fetch information related to each article.

Image by the author

Zulie had written 600+ articles, as of 25th November 2021!


Step-3: Get Article's Info and its Content

I'm not going to fetch all the stories (since there are so so many), but I'll demonstrate it with one of her articles. You can put the article_ids list into a loop to fetch all the articles.

Endpoints -

GET /article/{article_id}

Image by the author

As you can see in the above image, you'll get article related information, such as title, subtitle, claps, voters, tags, topics, author (user_id), published date, etc...

If you also want to extract the textual content of the article, use the following endpoint -

GET /article/{article_id}/content

Image by the author

Ta-da! You've successfully extracted a number of Medium Articles, in high quality, that can be used to store in a database, perform analysis, gather insights, and make smart business decisions.

Hope you liked it!


Special (more Advanced) Tutorial for Python Developers 🐍

If you're a python programmer, them you're in luck.

I've published a python package, called medium-api, to ease up the whole process.

You can install it using the following command -

pip install medium-api

Follow this tutorial to get Medium posts written by users, posts published under a publication, and latest and trending posts based on tags.


Links To Other Resources 🔗 -


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