Medium API helps you to quickly extract data from Medium's Website (https://medium.com).
Bring your own key. This API needs your own Medium API key - get one from the provider, add it once below, and the proxy injects it on every call. Your OmniStream plan covers the unified SDK, key storage, and proxy - the provider's own rate limits still apply to your key.
This is a community listing. If you own this API, you can request ownership.
npm install omnistream-sdkimport { OmniClient } from "omnistream-sdk";
const omni = new OmniClient({ token: process.env.OMNI_KEY! });
// One key reaches every API on the marketplace.
const data = await omni.call("medium/getapi");One install, one key - the same client calls every API on the marketplace.
Get Welcome
Get Article Info
Get Article's Content
Get Article Fans
Get Article's Markdown
Get Related Articles
/**
* MediumAPI - generated by OmniStream from Medium API's OpenAPI spec.
* One typed method per endpoint. A single Omni key reaches the API.
*/
const DEFAULT_BASE = "https://grid.skinvaults.online/v1/proxy/medium";
export class MediumAPIError extends Error {
status: number;
code?: string;
constructor(status: number, code: string | undefined, message?: string) {
super(message || `MediumAPI error ${status}`);
this.name = "MediumAPIError";
this.status = status;
this.code = code;
}
}
export interface MediumAPIOptions {
baseUrl?: string;
fetch?: typeof fetch;
timeoutMs?: number;
}
export class MediumAPI {
/** @param token Your OmniStream key (one key for every API). */
constructor(private token: string, private opts: MediumAPIOptions = {}) {
if (!token) throw new Error("MediumAPI: token is required");
}
rateLimit: { remainingMinute?: number; remainingDay?: number } | null = null;
private async _request(method: string, path: string, { params, body }: { params?: Record<string, unknown>; body?: unknown } = {}): Promise<any> {
const f = this.opts.fetch ?? globalThis.fetch;
const url = new URL((this.opts.baseUrl ?? DEFAULT_BASE).replace(/\/+$/, "") + path);
if (params) for (const [k, v] of Object.entries(params)) if (v != null) url.searchParams.set(k, String(v));
const headers: Record<string, string> = { "x-omni-key": this.token };
if (body !== undefined) headers["content-type"] = "application/json";
const res = await f(url, { method, headers, body: body !== undefined ? JSON.stringify(body) : undefined });
this.rateLimit = {
remainingMinute: Number(res.headers.get("x-ratelimit-remaining-minute")) || undefined,
remainingDay: Number(res.headers.get("x-ratelimit-remaining-day")) || undefined,
};
const data = await res.json().catch(() => ({}));
if (!res.ok) throw new MediumAPIError(res.status, data?.error?.code, data?.error?.message);
return data.data ?? data;
}
/** Get Welcome */
getapi(): Promise<any> {
return this._request("GET", "/", {});
}
/** Get Article Info */
getarticleArticleId(params: { "article_id": string }): Promise<any> {
return this._request("GET", "/article/{article_id}", { params });
}
/** Get Article's Content */
getarticleArticleIdContent(params: { "article_id": string }): Promise<any> {
return this._request("GET", "/article/{article_id}/content", { params });
}
/** Get Article Fans */
getarticleArticleIdFans(params: { "article_id": string }): Promise<any> {
return this._request("GET", "/article/{article_id}/fans", { params });
}
/** Get Article's Markdown */
getarticleArticleIdMarkdown(params: { "article_id": string }): Promise<any> {
return this._request("GET", "/article/{article_id}/markdown", { params });
}
/** Get Related Articles */
getarticleArticleIdRelated(params: { "article_id": string }): Promise<any> {
return this._request("GET", "/article/{article_id}/related", { params });
}
/** Get Article Responses */
getarticleArticleIdResponses(params: { "article_id": string }): Promise<any> {
return this._request("GET", "/article/{article_id}/responses", { params });
}
/** Get Latest Posts */
getlatestpostsTopicSlug(params: { "topic_slug": string }): Promise<any> {
return this._request("GET", "/latestposts/{topic_slug}", { params });
}
/** Get List Info */
getlistListId(params: { "list_id": string }): Promise<any> {
return this._request("GET", "/list/{list_id}", { params });
}
/** Get List Articles */
getlistListIdArticles(params: { "list_id": string }): Promise<any> {
return this._request("GET", "/list/{list_id}/articles", { params });
}
/** Get List Responses */
getlistListIdResponses(params: { "list_id": string }): Promise<any> {
return this._request("GET", "/list/{list_id}/responses", { params });
}
/** Get Publication ID */
getpublicationIdForPublicationSlug(params: { "publication_slug": string }): Promise<any> {
return this._request("GET", "/publication/id_for/{publication_slug}", { params });
}
/** Get Publication Info */
getpublicationPublicationId(params: { "publication_id": string }): Promise<any> {
return this._request("GET", "/publication/{publication_id}", { params });
}
/** Get Publication Articles */
getpublicationPublicationIdArticles(params: { "publication_id": string; "from"?: string }): Promise<any> {
return this._request("GET", "/publication/{publication_id}/articles", { params });
}
/** Get Publication Newsletter */
getpublicationPublicationIdNewsletter(params: { "publication_id": string }): Promise<any> {
return this._request("GET", "/publication/{publication_id}/newsletter", { params });
}
/** Get Related Tags */
getrelatedTagsTag(params: { "tag": string }): Promise<any> {
return this._request("GET", "/related_tags/{tag}", { params });
}
/** Search Articles */
getsearchArticlesQueryQuery(params: { "query": string }): Promise<any> {
return this._request("GET", "/search/articles?query={query}", { params });
}
/** Search Lists */
getsearchListsQueryQuery(params: { "query": string }): Promise<any> {
return this._request("GET", "/search/lists?query={query}", { params });
}
/** Search Publications */
getsearchPublicationsQueryQuery(params: { "query": string }): Promise<any> {
return this._request("GET", "/search/publications?query={query}", { params });
}
/** Search Tags */
getsearchTagsQueryQuery(params: { "query": string }): Promise<any> {
return this._request("GET", "/search/tags?query={query}", { params });
}
/** Search Users */
getsearchUsersQueryQuery(params: { "query": string }): Promise<any> {
return this._request("GET", "/search/users?query={query}", { params });
}
/** Get Top Writers */
gettopWriterTopicSlug(params: { "topic_slug": string; "count"?: number }): Promise<any> {
return this._request("GET", "/top_writer/{topic_slug}", { params });
}
/** Get Topfeeds */
gettopfeedsTagMode(params: { "tag": string; "mode": string; "after"?: number; "count"?: number }): Promise<any> {
return this._request("GET", "/topfeeds/{tag}/{mode}", { params });
}
/** Get User ID */
getuserIdForUsername(params: { "username": string }): Promise<any> {
return this._request("GET", "/user/id_for/{username}", { params });
}
/** Get User Info */
getuserUserId(params: { "user_id": string }): Promise<any> {
return this._request("GET", "/user/{user_id}", { params });
}
/** Get User's Articles */
getuserUserIdArticles(params: { "user_id": string }): Promise<any> {
return this._request("GET", "/user/{user_id}/articles", { params });
}
/** Get User Followers */
getuserUserIdFollowers(params: { "user_id": string; "count"?: number }): Promise<any> {
return this._request("GET", "/user/{user_id}/followers", { params });
}
/** Get User Following */
getuserUserIdFollowing(params: { "user_id": string; "count"?: number }): Promise<any> {
return this._request("GET", "/user/{user_id}/following", { params });
}
/** Get User's Interests */
getuserUserIdInterests(params: { "user_id": string }): Promise<any> {
return this._request("GET", "/user/{user_id}/interests", { params });
}
/** Get User's Lists */
getuserUserIdLists(params: { "user_id": string }): Promise<any> {
return this._request("GET", "/user/{user_id}/lists", { params });
}
/** Get User's Publications */
getuserUserIdPublications(params: { "user_id": string }): Promise<any> {
return this._request("GET", "/user/{user_id}/publications", { params });
}
/** Get User's Top Articles */
getuserUserIdTopArticles(params: { "user_id": string }): Promise<any> {
return this._request("GET", "/user/{user_id}/top_articles", { params });
}
}
export default MediumAPI;
No reviews yet. Be the first to rate this API.
Yes. Medium API uses apiKey authentication, so you bring your own key from the provider. You store it once on OmniStream and the proxy injects it into every call, so your code only ever sends your Omni key.
Medium API helps you to quickly extract data from Medium's Website (https://medium.com). It exposes 32 endpoints over GET, including GET /, GET /article/{article_id}, GET /article/{article_id}/content.
Install the OmniStream SDK for your language and call Medium API through it. The client is generated from this API's OpenAPI spec, so parameters and responses are fully typed, and the same client also calls every other API in the marketplace.
You can start on the free plan. OmniStream charges for the unified SDK, key storage and proxy rather than for Medium API itself, and Medium API's own rate limits still apply to your provider key.
DEV Community: Access Forem and DEV Community articles, users, comments, and other resources via a simple REST API.
Get Article Responses
Get Latest Posts
Get List Info
Get List Articles
Get List Responses
Get Publication ID
Get Publication Info
Get Publication Articles
Get Publication Newsletter
Get Related Tags
Search Articles
Search Lists
Search Publications
Search Tags
Search Users
Get Top Writers
Get Topfeeds
Get User ID
Get User Info
Get User's Articles
Get User Followers
Get User Following
Get User's Interests
Get User's Lists
Get User's Publications
Get User's Top Articles