Magpie HTML - v0.1.3
    Preparing search index...

    Interface LinksExtractionOptions

    Links extraction options.

    interface LinksExtractionOptions {
        scope?: "all" | "internal" | "external";
        excludeRel?: ("nofollow" | "noopener" | "noreferrer" | "ugc" | "sponsored")[];
        includeRel?: ("nofollow" | "noopener" | "noreferrer" | "ugc" | "sponsored")[];
        includeHashLinks?: boolean;
        deduplicate?: boolean;
        limit?: number;
    }
    Index

    Properties

    scope?: "all" | "internal" | "external"

    Filter links by scope.

    • 'all' - Return all links (default)
    • 'internal' - Only links to same origin
    • 'external' - Only links to different origins
    excludeRel?: ("nofollow" | "noopener" | "noreferrer" | "ugc" | "sponsored")[]

    Filter out links with specific rel attributes.

    Useful for crawlers to skip nofollow, sponsored, or UGC links.

    // Skip nofollow and sponsored links
    { excludeRel: ['nofollow', 'sponsored'] }
    includeRel?: ("nofollow" | "noopener" | "noreferrer" | "ugc" | "sponsored")[]

    Include only links with specific rel attributes.

    If specified, only links matching these rel values are included.

    includeHashLinks?: boolean

    Whether to include hash-only links (#anchor).

    false
    
    deduplicate?: boolean

    Whether to deduplicate URLs.

    If true, only unique URLs are returned (keeps first occurrence).

    true
    
    limit?: number

    Maximum number of links to extract.

    Useful for limiting extraction on large pages.