
Security News
Django Joins curl in Pushing Back on AI Slop Security Reports
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
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/scrapes 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.
og:title
, og:image
, etc.)twitter:title
, twitter:image
, etc.)og:title
, og:image
, etc.)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.
{
"success": true,
"data": {
"id": "c6307698-b1ae-497a-b3ce-132ea94ed3b1",
"title": "Tailwind CSS Search Input - Flowbite",
"description": "Use the search input component as a text field to allow users to enter search queries and receive relevant page results available in multiple styles and sizes",
"keywords": null,
"author": "Themesberg",
"favicon": "/docs/android-icon-192x192.png",
"canonical": "https://flowbite.com/docs/forms/search-input/",
"themeColor": "#ffffff",
"charset": "utf-8",
"url": "https://flowbite.com/docs/forms/search-input/",
"image": "https://flowbite.com/docs/images/og-image.png",
"facebook": {
"title": "Tailwind CSS Search Input - Flowbite",
"description": "Use the search input component as a text field to allow users to enter search queries and receive relevant page results available in multiple styles and sizes",
"image": "https://flowbite.com/docs/images/og-image.png",
"url": "https://flowbite.com/docs/forms/search-input/",
"type": "article",
"siteName": null
},
"twitter": {
"title": "Tailwind CSS Search Input - Flowbite",
"description": "Use the search input component as a text field to allow users to enter search queries and receive relevant page results available in multiple styles and sizes",
"image": "https://flowbite.com/docs/images/og-image.png",
"card": "summary",
"site": "@",
"creator": "@"
}
}
}
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.
The npm package metadata-fetch receives a total of 16 weekly downloads. As such, metadata-fetch popularity was classified as not popular.
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
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
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.