github.com/jg-l/metadata_fetch

A dart library for extracting metadata in web pages. Supports Open Graph, Meta, Twitter Cards, and Structured Data (Json-LD)

Open this visualization on its own page →

Contributors

6

Lines of Code

116

From

2020-02-19

To

2020-09-29

About jg-l/metadata_fetch

Metadata Fetch is a Dart library for extracting structured metadata from web pages. It supports multiple metadata formats including Open Graph, Meta tags, Twitter Cards, and JSON-LD structured data, making it useful for applications that need to parse and display information about web content.

The library provides flexible extraction methods for developers. Users can fetch metadata directly from a URL with a single function call, or manually parse HTML documents with fine-grained control over which metadata parsers to use. When manually parsing, the library intelligently prioritizes Open Graph data first, then falls back through Twitter Cards, JSON-LD, and standard HTML metadata in sequence. It also handles relative URLs by resolving them against a provided fallback URL when needed.

This package is particularly well-suited for Flutter applications and other Dart projects that need to extract rich previews or metadata summaries from web links. The library is published on Pub Dev and available for production use, with the developer planning future enhancements like customizable parser weights for more granular fallback control.

Share this video