Skip to main content
The MetadataEntity defines the structure for specifying how to extract metadata from web pages using the Tedi Browser network component.

Definition

Below is the definition of the MetadataEntity interface:
MetadataEntity
interface MetadataEntity {
  urls: string[];
  fields?: 'title' | 'description' | 'favicon' | 'url' | 'sitename' | 'images' | 'domain';
}
PropertyTypeDescription
urlsstring[]An array of URLs from which to extract metadata.
fields'title' | 'description' | 'favicon' | 'url' | 'sitename' | 'images' | 'domain'An optional field specifying which metadata fields to extract. If not specified, all available metadata fields will be extracted.

Examples

Extract specific metadata fields:
{
  "urls": [
    "https://www.evergreen.media",
    "https://www.tirol.gv.at"
  ],
  "fields": ["title", "description", "favicon"]
}
Extract all available metadata fields:
{
  "urls": [
    "https://www.evergreen.media",
    "https://www.tirol.gv.at"
  ],
  "fields": ["title", "description", "favicon", "url", "sitename", "images", "domain"]
}

Conclusion

The MetadataEntity provides a flexible way to extract specific or all metadata fields from web pages, enabling users to tailor their data extraction needs effectively.