Medium Tag Posts API
The ten newest posts under any tag, with the snippet and first image when one is available.
GET /v1/medium/tags/{tag}/posts1 credit Failed requests are free
About this endpoint
GET /v1/medium/tags/{tag}/posts takes a tag such as javascript and returns its newest posts as JSON. data.tag holds the feed header (slug, title, description, url, host, isCustomDomain) and data.posts holds up to ten posts, newest first. A post carries postId, title, url, authorName, tags, publishedAt, updatedAt, host, isCustomDomain and contentAvailable.
A tag's items often carry a snippet rather than the article body, so contentAvailable is false and contentHtml, contentText, wordCount and readingMinutes are null. Read snippet and imageUrl for those items. A tag with no stories is still lookupStatus: found with an empty posts array. An empty list does not mean the tag is missing.
This list has no cursor: page.depth is 10 and page.hasMore is null. Use the post sitemaps when you need a longer history.
Medium Tag Posts API FAQ
How do I name the tag?
Use the slug, for example javascript, php or a non-Latin tag. A leading # is removed and matching is case-insensitive, so #JavaScript and javascript name the same tag.
Why is the article body null?
A tag's items often carry only the snippet. Check contentAvailable; when it is false, read snippet, imageUrl and url. An author's list is better when you need full HTML.
What does a tag with no posts return?
lookupStatus: found with posts: [], a feed header and complete: true. Check postId rows rather than treating an empty list as a missing tag.
How many credits does it cost?
Pricing is documented on the operation in the API registry (shown on this page). Confirm on every response with meta.creditsCharged: that field is the billing source of truth.