
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
medium-info-api
Advanced tools
It is a TypeScript library that provides you with all the information about any medium article (title, pageContent, main image url, author name, author image url etc.) just by providing link of the article.
A lightweight utility to extract all the useful information from Medium articles, including:
This package is designed to be modular: fast information is fetched immediately.
npm install medium-info-api
or
yarn add medium-info-api
```ts
import express from "express";
import cors from "cors";
import { getArticleInfo } from "medium-info-api";
const app = express();
app.use(cors());
app.get("/medium", async (req, res) => {
const url = req.query.url as string;
if (!url) {
return res.status(400).json({ error: "Missing url parameter" });
}
try {
const result = await getArticleInfo(url);
return res.json({
success: true,
data: result,
});
} catch (err) {
return res.status(500).json({
success: false,
message: "Failed to fetch article",
error: err
});
}
});
Endpoint: /medium?url=<article_url> Purpose: Fetch all article info
{
"success": true,
"data": {
"title": "How to Think Clearly",
"authorName": "John Doe",
"pageContent": "6 min read",
"firstLine": "Sample first line",
"publishedDate": "Sep 20, 2025",
"clapCount": "1.2k",
"commentsCount": "72",
"heroImage": "https://miro.medium.com/v2/resize:fit:1200/1*71nGDtlRxS8JNC0YVwLEBw.jpeg",
"authorAvatar":"https://miro.medium.com/v2/resize:fill:64:64/1*azHxRVLkd-GHvXxlvgdChw.jpeg"
},
}
medium-info-api scrapes publicly available data from Medium articles and author pages, without using any heavy browser automation tools, it simply uses axios and cheerio.
HTML Fetching with Axios Medium pages are downloaded using axios, which is significantly faster and lighter than browser-based scrapers.
Reliable HTML parsing with Cheerio Cheerio works to extract information using stable Medium DOM patterns, fallback selectors, and multiple verification layers ensuring accuracy even if Medium slightly changes its layout.
Fallback Logics Fallback logics are provided whereever required e.g. in authorAvatar, the page checks all the possibilities. If Medium changes formatting, it gracefully falls back to a safe default avatar.
Full Severless Compatible Since it only uses axios and cheerio, the applications built on top of this are easily deployable on Vercel, Netlify, AWS Lambda, Supabase Edge, Cloudflare Workers etc.
Lightweight and Effecient The average execution time is around 5-40 ms making it suitable for API Routes, Next.js PPR, Incremental Static Regeneration (ISR), Edge functions, On-demand requests etc.
Pull requests are welcome! If you find issues, feel free to open one.
FAQs
It is a TypeScript library that provides you with all the information about any medium article (title, pageContent, main image url, author name, author image url etc.) just by providing link of the article.
We found that medium-info-api demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.