Medium hub

Medium Sitemap Index API

The sitemap files available for a kind, each with its path, date and last-modified time, one page at a time.

GET /v1/medium/sitemap

2 credits Failed requests are free

About this endpoint

GET /v1/medium/sitemap takes kind and returns data.files, data.count, data.latest and data.page from the sitemap index. Each file carries url, path, kind, date (when the file name has one) and lastModified. latest is the newest real file of that kind, or null when the index has none; future-dated junk rows stay in files[] but are never latest, and files[] keeps the index's own order, which is not sorted by date.

data.page carries limit, returned, total, hasMore and nextCursor. Set limit from 1 to 500; the default is 100, and a kind can hold thousands of files, so follow page.nextCursor until page.hasMore is false. A cursor past the last row returns an empty page with page.hasMore: false. kind=posts has one file per day through the most recent published day, and a day's file appears after that day ends; the entity kinds have their own files. Use the date on a file as the date argument of the post or entity route.

The index gives you the available days without guessing.

Medium Sitemap Index API FAQ

How do I find the latest day?

Read data.latest. It is the newest file of the requested kind, with its date, path and lastModified.

Why is the answer paged?

The index covers one file per day since 2000 and can list thousands of entries. limit defaults to 100 and accepts up to 500; follow page.nextCursor for the rest.

Does the index include removed records?

Yes. Use kind=removed-posts or kind=removed-users; the files then feed GET /v1/medium/discover/{kind} with the same kind.

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. Each paginated page is a separate billed request.