ConvertFrom-HtmlJsonLd

August 3, 2026 ยท View on GitHub

SYNOPSIS

Extracts JSON-LD structured data from HTML.

SYNTAX

Node (Default)

ConvertFrom-HtmlJsonLd [-HtmlNode] <HtmlNode> [-Type <string[]>] [-AsObject] [<CommonParameters>]

Content

ConvertFrom-HtmlJsonLd -Content <string> [-Type <string[]>] [-AsObject] [<CommonParameters>]

File

ConvertFrom-HtmlJsonLd -Path <string> [-Type <string[]>] [-AsObject] [<CommonParameters>]

Url

ConvertFrom-HtmlJsonLd -Url <uri> [-Proxy <string>] [-ProxyCredential <pscredential>] [-Type <string[]>] [-AsObject] [<CommonParameters>]

DESCRIPTION

Extracts JSON-LD structured data from HTML.

EXAMPLES

EXAMPLE 1

ConvertFrom-HtmlJsonLd -Content $html

EXAMPLE 2

ConvertFrom-HtmlJsonLd -Url https://example.org/article

EXAMPLE 3

ConvertFrom-Html -Content $html | Select-HtmlNode -XPath '//script[@type="application/ld+json"]' | ConvertFrom-HtmlJsonLd

EXAMPLE 4

ConvertFrom-HtmlJsonLd -Content $html -Type Product

EXAMPLE 5

ConvertFrom-HtmlJsonLd -Content $html -Type Product -AsObject

PARAMETERS

-AsObject

Emits parsed JSON payloads instead of HtmlJsonLdItem metadata objects.

Type: SwitchParameter
Parameter Sets: Node, Content, File, Url
Aliases: None
Possible values:

Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Content

HTML content to inspect.

Type: String
Parameter Sets: Content
Aliases: None
Possible values:

Required: True
Position: named
Default value: None
Accept pipeline input: True (ByValue, ByPropertyName)
Accept wildcard characters: False

-HtmlNode

HtmlAgilityPack node to inspect.

Type: HtmlNode
Parameter Sets: Node
Aliases: Node, InputObject
Possible values:

Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Path

Path to an HTML file.

Type: String
Parameter Sets: File
Aliases: File
Possible values:

Required: True
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Proxy

Proxy server address used when downloading by URL.

Type: String
Parameter Sets: Url
Aliases: None
Possible values:

Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProxyCredential

Credentials used with the proxy server.

Type: PSCredential
Parameter Sets: Url
Aliases: None
Possible values:

Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Type

Filters results to one or more JSON-LD @type values.

Type: String[]
Parameter Sets: Node, Content, File, Url
Aliases: None
Possible values:

Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Url

URL of an HTML page to download and inspect.

Type: Uri
Parameter Sets: Url
Aliases: Uri
Possible values:

Required: True
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

  • System.String
  • HtmlAgilityPack.HtmlNode

OUTPUTS

  • HtmlTinkerX.HtmlJsonLdItem
  • None