dobroslavradosavljevic/ogie
Overview
This skill extracts OpenGraph, Twitter Cards, and a broad set of webpage metadata from URLs or raw HTML. It is a lightweight, production-ready TypeScript tool designed for reliable link previews, SEO audits, and metadata scraping. The extractor returns structured data for OpenGraph, Twitter, JSON-LD, Dublin Core, oEmbed, and other common metadata types. Built-in safeguards handle redirects, SSRF protection, and rate-limited bulk operations.
How this skill works
The extractor fetches a URL (or parses provided HTML) and parses meta tags, structured data (JSON-LD), and known discovery endpoints like oEmbed. It normalizes relative URLs, detects charset when configured, and assembles data into typed containers such as data.og, data.twitter, data.jsonLd, and more. Options control timeouts, redirects, user-agent, caching, and bulk concurrency to fit production needs. Errors are categorized so callers can distinguish fetch, parse, timeout, and validation issues.
When to use it
- Generate link preview cards for chat, social, or CMS interfaces.
- Build SEO auditing tools that check presence and quality of OG/Twitter metadata.
- Scrape metadata at scale using rate-limited bulk extraction.
- Parse metadata from HTML already fetched by another service (no network).
- Fetch oEmbed content or discover oEmbed endpoints for embedding external media.
Best practices
- Use extractFromHtml when you already have the HTML to avoid extra requests and improve performance.
- Enable a cache for repeated lookups to reduce latency and external load.
- Set a sensible userAgent and timeout to avoid being blocked by some sites.
- Limit concurrencyPerDomain and minDelayPerDomain in bulk jobs to respect origin servers.
- Enable fetchOEmbed only when you need embedded data to avoid extra network calls.
Example use cases
- Create a chat app link preview that shows title, description, image, site name, and favicon.
- Run an SEO audit script that flags missing og:title, og:description, or twitter:card.
- Batch-process thousands of URLs with extractBulk and track progress and success rate.
- Fetch metadata for a CMS to auto-fill article preview fields from a submitted URL.
- Discover and fetch oEmbed data for embedding third-party media like videos or galleries.
FAQ
Yes. Use extractFromHtml with a baseUrl for resolving relative links when needed.
How does the skill handle private or localhost URLs?
Private and localhost URLs are blocked by default for SSRF protection. You can enable allowPrivateUrls for local development.