| wayback_snapshot_url_native | R Documentation |
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).
wayback_snapshot_url_native(url, timeout = 30L)
url |
URL to resolve. |
timeout |
Request timeout, seconds. |
The https snapshot URL, or NULL if none is archived.
# 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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.