screaming_frog_links: Import Screaming Frog All Inlinks or All Outlinks...

View source: R/screaming_frog_links.R

screaming_frog_linksR Documentation

Description

Normalizes a Screaming Frog **All Inlinks** or **All Outlinks** CSV or data frame. Both exports retain their native 'Source -> Destination' orientation. Raw observations are kept separately from graph-eligible edges, and URLs are preserved for one downstream canonicalization pass.

Usage

screaming_frog_links(
  x,
  export_kind = c("all_inlinks", "all_outlinks"),
  origin_policy = c("all", "html", "rendered"),
  endpoint_action = c("drop", "error")
)

Arguments

x

A path to an All Inlinks/All Outlinks CSV file or an equivalent data frame.

export_kind

Declared export provenance: '"all_inlinks"' or '"all_outlinks"'. This never changes edge orientation.

origin_policy

Which DOM observations may become graph edges: '"all"' (default), '"html"', or '"rendered"'. Combined '"HTML & Rendered HTML"' observations qualify for either selective policy. The raw observation table is never filtered.

endpoint_action

How graph-eligible rows with a blank source or destination are handled: '"drop"' (default) or '"error"'. Such rows remain in 'observations' in either mode.

Details

Only 'Type = "Hyperlink"' observations are graph-eligible. 'Follow' is the authoritative field used to derive 'nofollow'; 'Rel' is parsed independently for disagreement diagnostics. Duplicate observations are not aggregated.

Value

An object of class 'screaming_frog_links' with components:

observations

Normalized observations in input row order.

edges

Unaggregated, graph-eligible 'from' / 'to' rows with nofollow, placement, origin, and link provenance. 'position_index' carries each link's reading-order rank among its source page's content links ('1' = first), materialized from document order for ‘all_outlinks' and 'NA' otherwise; it feeds [pagerank()]’s 'position_col'.

diagnostics

Input, eligibility, endpoint, type, origin, Follow/Rel, and schema counts plus row-level issues.

provenance

Export kind, source, policy, retained input-row IDs, and detected columns.

Examples

links <- data.frame(
  Type = c("Hyperlink", "Image"),
  Source = c("https://example.com/", "https://example.com/"),
  Destination = c("https://example.com/a", "https://example.com/logo.png"),
  Follow = c("TRUE", "TRUE"),
  check.names = FALSE
)
imported <- screaming_frog_links(links, "all_outlinks")
imported$edges

pagerankr documentation built on Oct. 1, 2026, 5:09 p.m.