Skip to content

Response and metadata

A parse returns a DefuddleResponse.

Property Type Description
Title string Title of the page.
Description string Description or summary.
Domain string Domain name of the site.
Favicon string URL of the site’s favicon.
Image string URL of the main image.
Language string Language of the page in BCP 47 format, such as en or en-US.
Published string Publication date.
Author string Author.
Site string Name of the site.
Content string The extracted content: HTML, or Markdown when the Markdown option is set.
ContentMarkdown string? Markdown content, when SeparateMarkdown is set.
WordCount int Number of words in the extracted content.
ParseTime long Time taken to parse, in milliseconds.
SchemaOrgData JsonNode? Raw schema.org data of the page.
MetaTags IReadOnlyList<MetaTagItem>? Meta tags, each with Name, Property, and Content.
ExtractorType string? The site extractor that produced the content, if one did.
Variables IReadOnlyDictionary<string, string>? Values from a site extractor that have no property of their own, such as transcript.
Debug DebugInfo? Debug information, when Debug is set.
Profile IReadOnlyDictionary<string, double>? Time spent in each step, when the Profile option is set.

var result = DefuddleParser.ParseHtml(html);
foreach (var tag in result.MetaTags ?? [])
{
Console.WriteLine($"{tag.Name ?? tag.Property}: {tag.Content}");
}
Console.WriteLine(result.SchemaOrgData?.ToJsonString());

snippet source | anchor

var result = await DefuddleParser.ParseHtmlAsync(
html,
new DefuddleOptions { Url = "https://www.youtube.com/watch?v=dQw4w9WgXcQ" }
);
Console.WriteLine(result.ExtractorType);
if (result.Variables?.TryGetValue("transcript", out var transcript) == true)
{
Console.WriteLine(transcript);
}

snippet source | anchor

var result = DefuddleParser.ParseHtml(html, new DefuddleOptions { Profile = true });
if (result.Profile is { } profile)
{
foreach (var step in profile)
{
Console.WriteLine($"{step.Key}: {step.Value} ms");
}
}

snippet source | anchor

MIT · Copyright 2025 Steph Ango (@kepano) · unofficial community port of defuddle