Download OpenAPI specification:Download
Our Unofficial Medium API helps you to quickly extract data from Medium's Website (https://medium.com).
You can gather data related to users, publications, articles (including its textual content), latest posts & top writers within a topic/niche, etc…
{- "name": "Unofficial Medium API",
- "developer": "Nishu Jain",
- "email": "nishu@mediumapi.com",
}
Returns the unique user_id
for the given username
.
Note: You can find the username
from the user's/author's profile page URL.
username required | string Example: nishu-jain It's a unique string chosen by every single Medium user. |
{- "id": "1985b61817c3"
}
Returns user-related information such as their
Note: If you don't know the user_id
, you can get it from the Get User ID endpoint (/user/id_for/{username}
).
user_id required | string Example: 1985b61817c3 It's a unique hash id assigned to every single Medium user. |
{- "id": "1985b61817c3",
- "username": "nishu-jain",
- "fullname": "Nishu Jain",
- "bio": "Obsessed with Tech Biz Arts & Words; Does NOT dumb down the writing; Skilled Wordsmith; Delivers the best",
- "top_writer_in": [
- "programming"
], - "followers_count": 450,
- "following_count": 4,
- "publication_following_count": 2,
- "twitter_username": "one_anachronism",
- "is_writer_program_enrolled": true,
- "is_suspended": false,
- "has_list": true,
- "is_book_author": false,
- "allow_notes": true,
- "medium_member_at": "2020-06-24 16:05:46",
}
Returns a list of article_ids
written by a specified user, with a maximum of 500 article_ids
per request.
If the user has published over 500 articles, use the next
query string parameter in subsequent API calls to retrieve additional articles.
user_id required | string Example: 6e2475a6e38a Unique hash id assigned to every single Medium user. |
next | string Example: next=1625519209064 Use this parameter to get more results on the next page. |
{- "id": "6e2475a6e38a",
- "associated_articles": [
- [
- "81adea1a7973",
- "f62685b42923",
- "5105fc08e749",
- "6c2d076d2e82",
- "6fe20446d139"
]
], - "count": 5,
- "next": "1625519709163"
}
Returns a list of article_ids
of the top 10 articles on the user's profile, for a given user_id
.
user_id required | string Example: 1985b61817c3 Unique hash id assigned to every single Medium user. |
{- "id": "1985b61817c3",
- "top_articles": [
- [
- "562c5821b5f0",
- "95f4919cc39c",
- "077229e514a3",
- "c9a4be35cb93",
- "05a740c035cc",
- "23a287916d3f",
- "9263875a3649",
- "6c34414177bd",
- "9867ba29a923",
- "65a63626c04e"
]
]
}
Returns the list of user_ids
of the user's followers.
Note: When you get the response from the API, it will include an attribute called next
. You can use this next attribute as query string parameter (after
) when you make your next API request. This way, you can get the followers that come after the one you're currently looking at.
user_id required | string Example: 1985b61817c3 Unique hash id assigned to every single Medium user. |
count | int Example: count=10 To limit the number of results. (count <= 25) |
after | string Example: after=14274b746ca3 To get the results after a particular follower's user id. |
{- "id": "1985b61817c3",
- "followers": [
- [
- "14609d40b731",
- "148ae689f366",
- "14daabbff886",
- "150aaf6fae67",
- "1556eaf34b46",
- "157ac0b7fce4",
- "15f72b3c21f1",
- "160c3e933453",
- "162e5e73459a",
- "16759d70a68f"
]
], - "count": 10,
- "next": "16759d70a68f",
- "total_followers": 721
}
Returns a list of users (user_ids
) that the given user is following.
Use the count
query parameter (optional) to limit the number of results. (count <= 1500)
Note: This list does not contain the publication_ids
of the publications that the user is following. To get those, please use Get User Publication Following endpoint (/user/{user_id}/publication_following
).
user_id required | string Example: 14d5c41e0264 Unique hash id assigned to every single Medium user. |
count | int Example: count=10 To limit the number of results. (count < 1500) |
{- "id": "14d5c41e0264",
- "following": [
- [
- "3340d9dd0981",
- "51e7eb466f57",
- "c0db304eefe1",
- "db7a1a122aa",
- "799bdc99a0fd",
- "3d91a45f0e94",
- "41f99c370629",
- "cfa71f272740",
- "4a142a63b9a0",
- "78561519e424"
]
]
}
Returns a list of publications (publication_ids
) that the given user is following.
user_id required | string Example: 1985b61817c3 Unique hash id assigned to every single Medium user. |
{- "id": "1985b61817c3",
- "publication_following": [
- [
- "aa36b7f642de",
- "b7e45b22fec3"
]
], - "count": 2
}
Returns a list of tags that the given user follows.
user_id required | string Example: 1985b61817c3 Unique hash id assigned to every single Medium user. |
{- "id": "1985b61817c3",
- "tags_followed": [
- [
- "software-engineering",
- "startup",
- "machine-learning",
- "data-science",
- "blockchain"
]
], - "count": 5
}
Returns an array of list_ids
created by the user.
Note: You can check whether the user has created lists or not beforehand. Check the has_list
attribute in the "Article Info" endpoint.
user_id required | string Example: 5142451174a3 Unique hash id assigned to every single Medium user. |
{- "id": "5142451174a3",
- "lists": [
- [
- "321cfd9966ec",
- "ba3904884898",
- "b8a117567230",
- "9516ed2145ae",
- "24356f9a9c6e",
- "e8b1c393bcff",
- "95b41261bee0",
- "4ecdbfd97d05"
]
], - "count": 8
}
Returns 2 lists of publication_ids
where the given user is either an admin (creator/editor) or a contributing writer.
user_id required | string Example: 14d5c41e0264 Unique hash id assigned to every single Medium user. |
{- "id": "14d5c41e0264",
- "publications": {
- "admin_in": [
- [
- "bff2346ccdf1",
- "df81adaf6236",
- "9830e436a84",
- "aec755e28853",
- "ac4c2146e2f",
- "a7d8d7c02da",
- "ab314b84960a"
]
], - "writer_in": [
- [
- "6cb21729512d",
- "78d064101951",
- "7adf33e44ae3",
- "3f6ecf56618",
- "193b68bd4fba",
- "d3eff52d6f1c",
- "998e693d29cd",
- "40187e704f1c",
- "48e972f5c24e",
- "65d07f93c269"
]
]
}
}
Returns a list of all the books published by the user. It includes book's title, description, co-authors, published date, cover image and URL.
Note: If you don't know the user_id
, you can get it from the Get User ID endpoint (/user/id_for/{username}
).
user_id required | string Example: 6e2475a6e38a It's a unique hash id assigned to every single Medium user. |
{- "id": "6e2475a6e38a",
- "books": [
- [
- {
- "name": "What did Tashi do?",
- "description": "A cybercrime thriller depicting the impact of leaked personal information on a woman's life.",
- "authors": [
- "Anangsha Alammyan"
], - "published_on": "2019-11-16",
}, - {
- "name": "Stolen Reflections: Some Stories Are Told in Verse",
- "description": "The love story of a modern young woman told through poems.",
- "authors": [
- "Anangsha Alammyan"
], - "published_on": "2018-04-26",
}
]
], - "count": 2
}
Returns the unique publication_id
for the given publication_slug
.
Note: You can find the publication_slug
from the publication's homepage URL.
publication_slug required | string Example: codex It's a lowercased hyphen-separated unique string alloted to each Medium Publication. |
{- "publication_id": "29038077e4c6",
- "publication_slug": "codex"
}
Returns the publication related information such as Publication name, Tagline, Description, Tags, Followers Count, Twitter username, Instagram username, Facebook Page name, etc …
Note: If you don't know the publication_id
, you can get it from any article published by it. Use endpoint "/article/{article_id}" to retrieve the publication_id
.
publication_id required | string Example: 98111c9905da It's a unique hash id assigned to every Medium Publication. |
{- "id": "98111c9905da",
- "name": "Towards AI",
- "tagline": "The World's Leading AI and Technology Publication",
- "description": "Towards AI is the world's leading AI and technology publication. Publishing unbiased AI and technology-related articles. Read by thought-leaders and decision-makers around the world.",
- "tags": [
- "ARTIFICIAL INTELLIGENCE"
], - "followers": 25260,
- "instagram_username": "towards_ai",
- "facebook_pagename": "towardsAl",
- "url": "pub.towardsai.net",
- "slug": "towards-artificial-intelligence",
- "twitter_username": "towards_AI",
- "creator": "8a819983d566",
- "editors": [
- "aea8a19ea239"
]
}
Returns the list of articles_ids
, of the latest 25 articles, posted in that publication.
publication_id required | string Example: 98111c9905da It's a unique hash id assigned to every Medium Publication. |
from | string Example: from=2023-01-31T13:10:00 To get the articles before specified date and time. |
{- "publication_articles": [
- [
- "638fb16c5092",
- "8100fa230c7d",
- "dafe61eabe34",
- "b22a38900f39",
- "5c2e28922659",
- "78d8ecab19c4",
- "52f352912025",
- "9bed21ed3432",
- "e4ccce6ab64b",
- "8009cad3c111",
- "bc63d4ada624",
- "af749790e33b",
- "c3fabbd0e00b",
- "d23a4c3ec0cd",
- "b830a1f9c9d5",
- "8c58a7c93ca",
- "581d31dd625f",
- "b13dd00dc212",
- "763c88143560",
- "73b72c3b977a",
- "993a4acf3d97",
- "cfbff2388d04",
- "f853beb264f6",
- "50b605599b1b",
- "2c7327bf1928"
]
], - "publication_id": "98111c9905da",
- "from": "2022-08-13 03:08:16",
- "to": "2022-08-05 12:02:25"
}
Returns article-related information such as
article_id required | string Example: 67fa62fc1971 It's a unique hash id assigned to every Medium Article. |
{- "id": "67fa62fc1971",
- "title": "Why it's Super Hard to be an ML Researcher or Developer?",
- "subtitle": "A Realization that Literally Changed my Life",
- "author": "1985b61817c3",
- "publication_id": "98111c9905da",
- "responses_count": 6,
- "word_count": 1146,
- "reading_time": 4.874528301886793,
- "topics": [
- "machine-learning"
], - "tags": [
- "data-science"
], - "claps": 603,
- "voters": 141,
- "is_series": false,
- "is_shortform": false,
- "is_locked": true,
- "lang": "en",
- "published_at": "2020-10-28 21:01:06",
- "last_modified_at": "2023-06-20 06:37:11",
- "unique_slug": "why-its-super-hard-to-be-an-ml-researcher-or-developer-67fa62fc1971",
- "top_highlight": "Give me six hours to chop down a tree and I will spend the first four sharpening the axe - Abraham Lincoln\""
}
Returns the content of an article for the given article_id
.
article_id required | string Example: 562c5821b5f0 It's a unique hash id assigned to every Medium Article. |
{- "id": "562c5821b5f0",
- "content": "Article title\nArticle Subtitle\nArticle Content ....\n"
}
Returns the markdown of a Medium Article/Story, for the given article_id
article_id required | string Example: 67fa62fc1971 It's a unique hash id assigned to every Medium Article. |
{- "id": "67fa62fc1971",
- "markdown": "# Article title\n## Article Subtitle\nArticle **Content** with lot of _markups_ ....\n![Images Alt](Image URL)\n"
}
Returns the plain HTML of a Medium Article, for the given article_id
.
Note: This plain HTML output can be stylized as per your own custom branding. For the sample CSS, visit: https://mediumapi.com/styles/dark.css
article_id required | string Example: ff6369938b63 It's a unique hash id assigned to every Medium Article. |
fullpage | bool Example: fullpage=false If 'true', returns full HTML page with head, body, title and meta tags. Else, returns HTML inside body only. |
style_file | string Example: style_file=https://mediumapi.com/styles/dark.css Name or link to a CSS file to be included in the HTML. It works when |
{- "id": "ff6369938b63",
- "html": "<div class=\"blog\">\n <h1 id=\"abcd\">Article Title<h1>\n <p>This is a <b>paragraph</b></p>\n <img src=\"https://example.com/img.png\" alt=\"Image caption\" />\n</div>\n"
}
Returns a list of URLs for the assets present in the Medium Article.
These assets may include images, embedded YouTube videos, Github Gists, Hyperlinks (anchors), Links to other Medium Articles, etc…
article_id required | string Example: b7d838c84f72 It's a unique hash id assigned to every Medium Article. |
{- "assets": {
- "youtube": [
- {
- "title": "Mathematics of Music - 1",
- "description": "Mathematics of Music - \"Twinkle Twinkle Little Star\" Synthesized using Python (Numpy and Scipy) Full article at my profile: https://medium.com/@nishu_jain"
}
], - "other_embeds": {
- "example.com": [
]
}
}
}
Returns a list of responses (response_ids
, same as article_ids
) for a given article (article_id
)
Note: To see the content of the response, use the Get Article's Content endpoint (/article/{article_id}/content
)
article_id required | string Example: 67fa62fc1971 It's a unique hash id assigned to every Medium Article. |
{- "id": "67fa62fc1971",
- "responses": [
- [
- "a9bbc22aa1e6",
- "3308e927204a",
- "b1fcf9f36d87",
- "295b0938fd49",
- "cc14e813995a",
- "649b48584efb"
]
], - "count": 6
}
Returns a list of user_ids
of the people who clapped on the article (a.k.a voters
).
article_id required | string Example: 67fa62fc1971 It's a unique hash id assigned to every Medium Article. |
{- "id": "67fa62fc1971",
- "voters": [
- [
- "def64349b55f",
- "dfd0edd2cde5",
- "263f0e59ea39",
- "fdaa0a92e5b9",
- "6b775dd37806",
- "c84d0210fb0b"
]
], - "count": 6
}
Returns a list of 10 articles (article_ids
) as recommended by the Medium, for the given article.
article_id required | string Example: 67fa62fc1971 It's a unique hash id assigned to every Medium Article. |
{- "id": "67fa62fc1971",
- "recommended_articles": [
- [
- "dd44714e619a",
- "cd14232a781c",
- "87a8f8c10d92",
- "f5f7bd88a144",
- "973775246425",
- "7dd26fb5282c",
- "cad364e668db",
- "ff3010db542f",
- "e10d7d5b83a6",
- "99b5311986c7"
]
]
}
Returns a list of recommended articles (article_ids
) for the given tag
. This feed is similar to Topfeeds Trending Articles.
Using the page
query string parameter, you can get the list page by page. The page number can be between 1 and 20. Each page will have up to 25 Article IDs.
So at maximum, you can fetch 500 article_ids
in 20 API calls.
tag required | string Example: data-science It's a unique string, usually hyphen-separated, representing a class of content. |
page | integer Example: page=1 A number between 1 and 20. |
{- "recommended_feed": [
- [
- "d99f4a35ff4",
- "53affbd9c728",
- "d1ffb9d9f042",
- "28aefb495657",
- "d8b3b04538cf",
- "02dd62cd4bda",
- "2919236a6082",
- "593a332dd08d",
- "29e23f371ddd",
- "27add4c8536d",
- "d31587158f34",
- "4ca1c6ce3eb9",
- "6ca2d70f7a62",
- "6fc97b93dc9a",
- "d63c736cccef",
- "a682d1adf4e8",
- "a37d66716d57",
- "d449463078b2",
- "b2a545f39ad5",
- "dcab44048ebb",
- "c41407efe59b",
- "ef0358634c1b",
- "bddb73ef62ff",
- "4de1464a9930",
- "e8b71b1c169b"
]
], - "count": 25,
- "tag": "data-science",
- "page": 1
}
Returns a list of article_ids
(length: 25) for the given tag
and mode
.
tag required | string Example: data-science It's a unique string, usually hyphen-separated, representing a class of content. |
mode required | string Example: new Mode:
|
{- "topfeeds": [
- [
- "bf49caa30c3b",
- "ff6d1d1f9570",
- "a02226fe86af",
- "baa85c10ac58",
- "8179180bc349",
- "fa27f64443ce",
- "c73786e6aa76",
- "ebfb35d80d31",
- "0b678210431d",
- "1da5001ed444",
- "3002a9f32abf",
- "14478e4e548b",
- "c25f1b3f5682",
- "8853184eb60c",
- "d59f2ea14ce4",
- "de7469608483",
- "2cbb5b268b76",
- "313d225bbf3f",
- "6b6902e66043",
- "8054b797de64",
- "05d01f5e3ed0",
- "c8285b6d45ba",
- "0ac7c96965b6",
- "721dfecb9c00"
]
], - "count": 25,
- "tag": "data-science",
- "mode": "NEW"
}
Returns a list of top writers (user_ids
) within a particular topic/niche (topic_slug
).
e.g.
Note: You can use optional count
query parameter to limit the number of results. The maximum number of top writers within a topic/niche will be 250.
topic_slug required | string Example: artificial-intelligence It's a unique string, usually hyphen-separated, representing a topic/niche, as classified by Medium. |
count | int Example: count=10 Limits the number of |
{- "top_writers": [
- [
- "37a2cbe8bd15",
- "9b351e8113e9",
- "8c8e5b7182ef",
- "b0fbe613be9d",
- "e43895122f94",
- "14176fcb5743",
- "fb7a5e85e951",
- "76398be9016",
- "fb44e21903f3",
- "c4a298b66f16"
]
]
}
Returns a list of latest posts (article_ids
) for a topic/niche (as classified by the Medium platform). Example of a topic/niche can be:
These are known as topic_slugs
. At any given moment, this endpoint will return a list of 25 articles (article_ids
).
topic_slug required | string Example: blockchain It's a unique string, usually hyphen-separated, representing a topic/niche, as classified by Medium. |
{- "latestposts": [
- [
- "743b229b9b80",
- "48a08afafdcc",
- "284009a2e941",
- "9351fd40340e",
- "8a48250702f7",
- "78ed78f16362",
- "434687e795c6",
- "a51cbcffc4e2",
- "e125f9d62f2",
- "ca84ac87a0bf",
- "4e2161787934",
- "d277be4453f4",
- "bfa982ef9a7f",
- "64bc45d49931",
- "8b7d1c46d849",
- "b63e8f8a6798",
- "cd389ec40e17",
- "7ed4c9ac8512",
- "a4713fa815c",
- "afd1ad23fa5e",
- "4cec3f13895a",
- "24a6562a875c",
- "275060016663",
- "e3d799eaf913",
- "7e0c28d4f682"
]
]
}
Returns tag-related information.
tag required | string Example: self-improvement It's a unique string, usually hyphen-separated, representing a class of content. |
{- "tag": "self-improvement",
- "name": "Self Improvement",
- "followers": 1581563,
- "articles_count": 234250,
- "authors_count": 87802,
- "latest_articles_count": 483,
- "latest_authors_count": 296,
- "children": [
- [
- "mental-health",
- "productivity",
- "mindfulness"
]
]
}
Returns a list of archived articles (max length = 20) for the given tag. You can filter the results by adding optional parameters like year
and month
. Use the next
parameter to get more results.
tag required | string Example: self-improvement It's a unique string, usually hyphen-separated, representing a class of content. |
year | string Example: year=2023 Year of the archived articles (YYYY) |
month | string Example: month=06 Month of the archived articles (MM) |
next | string Example: next=NTgwMzk0ZmI4NDcyOjoxNjg4MTYyNzY3ODE2 Use this parameter to get more results on the next page. |
{- "archived_articles": [
- [
- "3426b97f21f2",
- "d9edfd767132",
- "b89a2c54883",
- "b3366eb3bab6",
- "5e21f7f5ffd8"
]
], - "count": 5,
- "tag": "self-improvement",
- "year": "2023",
- "month": "jun",
- "next": "MzJiOWVmZWNjYzRlOjoxNjg4MTUzNjQzMzY4"
}
Returns a list of recommended users (who to follow) for the given tag.
Max length = 250.
tag required | string Example: self-improvement It's a unique string, usually hyphen-separated, representing a class of content. |
{- "recommended_users": [
- [
- "f87623ec7b55",
- "c2faf6a91b8f",
- "63d62054c6e9",
- "fd01d12eff0d",
- "81fd74a2e3ff"
]
], - "count": 5,
- "tag": "self-improvement"
}
Returns an array of recommended Medium Lists for the given tag.
Max Length = 250.
tag required | string Example: self-improvement It's a unique string, usually hyphen-separated, representing a class of content. |
{- "recommended_lists": [
- [
- "f09f1aaf38cd",
- "3c62b6cb0526",
- "467b590560f8",
- "e830014a1893",
- "e1cbaa5fcda6"
]
], - "count": 5,
- "tag": "self-improvement"
}
Returns the list-related information such as id, name, author, description, thumbnail image url, creation datetime, last article inserted datetime, number of articles in the list, claps, voters, and comments/responses.
list_id required | string Example: 38f9e0f9bea6 It's a unique hash id assigned to every Medium List. |
{- "id": "38f9e0f9bea6",
- "name": "Medium API",
- "description": "Collections of all the articles and resources related to Medium API",
- "author": "1985b61817c3",
- "count": 18,
- "responses_count": 1,
- "claps": 48,
- "voters": 1,
- "created_at": "2023-03-12 06:46:46",
- "last_item_inserted_at": "2023-03-12 06:53:02",
}
Returns an array of articles_ids
present in the given Medium List.
list_id required | string Example: 3d8f744f5370 It's a unique hash id assigned to every Medium List. |
{- "id": "3d8f744f5370",
- "list_articles": [
- [
- "e7240190382c",
- "d595c8c221da",
- "56fe247feb16",
- "5ac9f5f82ffd",
- "dd2cf884546b",
- "8ff906d16c03",
- "2e28ed05036f",
- "44edefd43f09",
- "0e6c2f374410",
- "fcc740792175"
]
], - "count": 10
}
Returns an array of response_ids
of the comments (same as article_ids
) on the given Medium List.
list_id required | string Example: 3d8f744f5370 It's a unique hash id assigned to every Medium List. |
{- "id": "3d8f744f5370",
- "responses": [
- [
- "f31a257b42e8",
- "a62b717bca13"
]
], - "count": 2
}
Returns a list of user_ids
for the given search query results. (Max Length = 1000)
query required | string Example: query=data engineer Search query |
{- "users": [
- [
- "1cdedc00c37b",
- "1bfba30bdef4",
- "de7c5a1b117c",
- "cd447042040e",
- "9e9176bf9645",
- "ecdc94046915",
- "589e227843c0",
- "bcee825b3d9c",
- "602d3a172ce8",
- "3489e9c7ed41"
]
], - "search_query": "data engineer"
}
Returns the list of publication_ids
for the given search query results. (Max Length = 1000)
query required | string Example: query=mental health Search query |
{- "publications": [
- [
- "b224b324ef5",
- "de4b53c10bc7",
- "efea2976ffad",
- "2dedf1e9c066",
- "7debdac7d2c2",
- "d1c54e7b78e2",
- "14b51ced1b92",
- "4479ee3a8306",
- "6b598c326afa",
- "f1cb0af385f"
]
], - "search_query": "mental health"
}
Returns the list of articles_ids
for the given search query results. (Max Length = 1000)
query required | string Example: query=startup Search query |
{- "articles": [
- [
- "fd455b524980",
- "e5b1c2d9631d",
- "b0d85289fdf5",
- "53d65a66fc45",
- "52d0d399982a",
- "5238a11278c4",
- "46a669a558f4",
- "0ac319330c7c",
- "8eb84ef2648f",
- "7b33f15631c1"
]
], - "search_query": "startup"
}
Returns an array of list_ids
for the given search query results. (Max Length = 1000)
query required | string Example: query=artificial intelligence Search query |
{- "lists": [
- [
- "7d7c0a478325",
- "b11cb0d296b1",
- "a6fda516e19d",
- "7f8919c5a990",
- "1fa7000e1b8c",
- "5fca0efc3fd6",
- "382d702f48e8",
- "d6aeeb599bfb",
- "39db5ba09043",
- "0d0b755a5b2d"
]
], - "search_query": "artificial intelligence"
}