
Security News
ECMAScript 2025 Finalized with Iterator Helpers, Set Methods, RegExp.escape, and More
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
metadata-fetch
Advanced tools
This package is used to fetch the metadata of given url or site with help of cheerio.
metadata-fetch is a lightweight JavaScript library that fetches and extracts/scrape essential metadata (Open Graph, Twitter Cards, favicons, canonical URLs, and SEO tags) from any webpage URL — perfect for generating rich link previews and auditing SEO data with ease.
npm install metadata-fetch
import { getMetadata } from "metadata-fetch";
const url = "https://example.com";
const getData = async () => {
const response = await getMetadata(url);
console.log(response);
};
getData();
Fetches metadata from a given URL and returns a structured object.
{
"data": {
"id": "f9e65b3e-136a-41a1-b3c5-6f80dc66a48a",
"title": "Metadata Fetcher & Scraper Tool | Preview Open Graph & SEO Tags",
"description": "Fetch and visualize website metadata including Open Graph, Twitter Cards, favicons, canonical URLs, and more.",
"keywords": "metadata fetcher,metadata scraper,open graph viewer,twitter card preview,SEO metadata tool,website metadata,link preview generator,social media preview",
"author": null,
"favicon": "/favicon.ico",
"canonical": "https://metadata-fetcher.vercel.app/",
"themeColor": null,
"charset": "utf-8",
"url": "https://metadata-fetcher.vercel.app",
"image": "https://metadata-fetcher.vercel.app/api/og",
"facebook": {
"title": "Metadata Fetcher & Scraper Tool",
"description": "Easily extract and preview Open Graph, Twitter Card, favicon, and canonical metadata from any webpage.",
"image": "https://metadata-fetcher.vercel.app/api/og",
"url": "https://metadata-fetcher.vercel.app",
"type": "website",
"siteName": "Metadata Fetcher"
},
"twitter": {
"title": "Metadata Fetcher & Scraper Tool",
"description": "Instantly fetch and visualize Open Graph, Twitter Card, and SEO tags from any webpage.",
"image": "https://metadata-fetcher.vercel.app/api/og",
"card": "summary_large_image",
"site": "@Abhii5496",
"creator": "@Abhii5496"
}
}
}
If something goes wrong (invalid URL, fetch failure, etc.), the function returns a structured error:
{
"error": "Invalid URL or fetch error"
}
Try it online at: https://metadata-fetcher.vercel.app
MIT
FAQs
This package is used to fetch the metadata of given url or site with help of cheerio.
We found that metadata-fetch 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
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.