Gathering detailed insights and metrics for open-graph-scraper-lite
Gathering detailed insights and metrics for open-graph-scraper-lite
Gathering detailed insights and metrics for open-graph-scraper-lite
Gathering detailed insights and metrics for open-graph-scraper-lite
npm install open-graph-scraper-lite
Typescript
Module System
Min. Node Version
Node Version
NPM Version
76.3
Supply Chain
93.2
Quality
76
Maintenance
100
Vulnerability
100
License
TypeScript (100%)
Total Downloads
78,376
Last Day
66
Last Week
2,473
Last Month
5,881
Last Year
60,001
MIT License
32 Stars
28 Commits
8 Forks
1 Watchers
1 Branches
2 Contributors
Updated on May 19, 2025
Minified
Minified + Gzipped
Latest Version
2.1.0
Package Id
open-graph-scraper-lite@2.1.0
Unpacked Size
124.86 kB
Size
15.16 kB
File Count
29
NPM Version
9.8.1
Node Version
18.18.0
Published on
Jul 15, 2024
Cumulative downloads
Total Downloads
A simple javascript module for scraping Open Graph and Twitter Card info from given HTML. For Node.js usage, we recommend open-graph-scraper
by the same people and can do HTTP requests.
1npm install open-graph-scraper-lite --save
1const ogs = require('open-graph-scraper'); 2const options = { 3 html: `<html><head> 4 <link rel="icon" type="image/png" href="https://bar.com/foo.png" /> 5 <meta charset="utf-8" /> 6 <meta property="og:description" name="og:description" content="html description example" /> 7 <meta property="og:image" name="og:image" content="https://www.foo.com/bar.jpg" /> 8 <meta property="og:title" name="og:title" content="foobar" /> 9 <meta property="og:type" name="og:type" content="website" /> 10 </head></html>` 11}; 12ogs(options) 13 .then((data) => { 14 const { result } = data; 15 console.log('result:', result); 16 })
1result: { 2 ogDescription: 'html description example', 3 ogTitle: 'foobar', 4 ogType: 'website', 5 ogImage: [ { url: 'https://www.foo.com/bar.jpg', type: 'jpg' } ], 6 favicon: 'https://bar.com/foo.png', 7 charset: 'utf-8', 8 success: true 9}
Name | Info | Default Value | Required |
---|---|---|---|
html | You can pass in an HTML string to run ogs on it. (use without options.url) | x | |
onlyGetOpenGraphInfo | Only fetch open graph info and don't fall back on anything else. | false | |
customMetaTags | Here you can define custom meta tags you want to scrape. | [] |
1const ogs = require('open-graph-scraper'); 2const options = { 3 html: `<html><head> 4 <link rel="icon" type="image/png" href="https://bar.com/foo.png" /> 5 <meta charset="utf-8" /> 6 <meta property="og:description" name="og:description" content="html description example" /> 7 <meta property="og:image" name="og:image" content="https://www.foo.com/bar.jpg" /> 8 <meta property="og:title" name="og:title" content="foobar" /> 9 <meta property="og:type" name="og:type" content="website" /> 10 <meta name="hostname" content="github.com"> 11 </head></html>`, 12 customMetaTags: [{ 13 multiple: false, // is there more than one of these tags on a page (normally this is false) 14 property: 'hostname', // meta tag name/property attribute 15 fieldName: 'hostnameMetaTag', // name of the result variable 16 }], 17}; 18ogs(options) 19 .then((data) => { 20 const { result } = data; 21 console.log('hostnameMetaTag:', result.customMetaTags.hostnameMetaTag); // hostnameMetaTag: github.com 22 })
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
5 existing vulnerabilities detected
Details
Reason
Found 1/11 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-06-23
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreLast Day
-2.9%
66
Compared to previous day
Last Week
95%
2,473
Compared to previous week
Last Month
30.6%
5,881
Compared to previous month
Last Year
910.5%
60,001
Compared to previous year