wayback_snapshot_url_native: Resolve a Wayback Machine snapshot URL (C++/libcurl)

View source: R/fetch_native.R

wayback_snapshot_url_nativeR Documentation

Resolve a Wayback Machine snapshot URL (C++/libcurl)

Description

Queries the Internet Archive “available” API for the closest archived snapshot of url. C++ backend; supersedes the older jsonlite-based resolver (kept internally for offline use).

Usage

wayback_snapshot_url_native(url, timeout = 30L)

Arguments

url

URL to resolve.

timeout

Request timeout, seconds.

Value

The https snapshot URL, or NULL if none is archived.

Examples

# Input is validated before any network call:
try(wayback_snapshot_url_native(""))     # empty url -> error


# Uses the live Wayback service; degrades gracefully offline: any
# network failure returns NULL rather than erroring.
# Closest archived snapshot of a live page (or NULL if none archived).
wayback_snapshot_url_native("https://www.r-project.org/")

# A shorter timeout for a quick lookup.
wayback_snapshot_url_native("https://cloud.r-project.org/", timeout = 10)

# A never-archived URL returns NULL rather than erroring.
wayback_snapshot_url_native("https://example.invalid/never-archived")


rmoriebricklayer documentation built on Aug. 5, 2026, 9:08 a.m.