web-meta-scraper
A lightweight, plugin-based TypeScript library for extracting web page metadata.
Single Dependency
Only cheerio for HTML parsing. Uses native fetch() for HTTP requests. No bloat.
Plugin Architecture
Pick only what you need: Open Graph, Twitter Cards, JSON-LD, oEmbed, meta tags, or your own.
Smart Merging
Priority-based resolver merges metadata from all sources into a single clean object.
import { scrape } from 'web-meta-scraper';
const result = await scrape('https://example.com');
console.log(result.metadata);
// { title, description, image, url, type, siteName, ... }
console.log(result.sources);
// { "open-graph": { ... }, "meta-tags": { ... }, "twitter": { ... } }