Website Broken Outbound Link Watch avatar

Website Broken Outbound Link Watch

Pricing

from $1.00 / 1,000 link change reports

Go to Apify Store
Website Broken Outbound Link Watch

Website Broken Outbound Link Watch

Samples a public HTTPS site's outbound links within robots.txt rules and reports newly broken or fixed links against a stored baseline.

Pricing

from $1.00 / 1,000 link change reports

Rating

0.0

(0)

Developer

Practical AI Lab

Practical AI Lab

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

9 days ago

Last modified

Features

Limited permissions

Share

Watch the links your public website sends visitors to other sites. The Actor reads a small, bounded set of your pages, validates a sample of the outbound links, and keeps a per-domain baseline. The first run stores the baseline. Every later run reports which links became broken, which were fixed, and which broken links disappeared from your pages, each with the page it was found on, the before/after status and UTC timestamps.

It is a monitoring and evidence tool, not a full site crawler. See Limitations before relying on it.

Quick start

Copy this input into the Input tab and run it once to create the baseline:

{
"startUrl": "https://crawlee.dev/",
"maxPages": 12,
"maxOutboundLinks": 20,
"maxLinksPerHost": 3
}

Replace startUrl with your own site root. It must be one public HTTPS root with no path, for example https://example.com/.

Run it again later (or on a schedule) with the same input to get the change report.

What it does

  1. Validates startUrl: HTTPS only, public host, no credentials, no custom port, no localhost, private or reserved addresses (host names are resolved and every address must be public).
  2. Reads robots.txt first and obeys it, including Crawl-delay (a delay above 10 seconds stops the run). If robots.txt cannot be read safely, nothing is crawled.
  3. Reads the homepage, then up to maxPages pages in total, chosen from the sitemap (one index level, at most 3 sitemap files, first 200 URLs) or, when there is no usable sitemap, from homepage links.
  4. Collects outbound links from <a href> tags only, then validates a stable, host-diversified sample using HEAD (falling back to a bodyless GET when HEAD is not allowed). Each failing link is retried once.
  5. Compares the sample with the stored baseline and writes the report.

Redirects are followed manually and every hop is re-validated. On your own site, redirects to a different origin are rejected. For outbound links, redirects must stay HTTPS and public.

Output

Dataset (recordType):

  • SUMMARY: one row per run with status, counts and a plain-language message.
  • FINDING: one row per broken or changed link, with changeType, targetUrl, sourcePageUrl, previousLinkStatus / previousHttpStatus / previousCheckedAt (before) and linkStatus / httpStatus / checkedAt (after).

Key-value store of the run:

  • REPORT: full JSON report (summary, findings, every checked link, crawled pages, notes, limitations, billing eligibility).
  • REPORT_CSV: findings as CSV, with the same source URL and timestamp columns.

Baseline store (named store, default pal-link-watch-state): one BASELINE_<domain> record per domain.

Run statuses

StatusMeaningEligible for billing event
BASELINE_CREATEDFirst run for this domain; baseline storedNo
NO_CHANGESNothing changed since the previous runNo
CHANGES_DETECTEDAt least one change in the table belowYes, once per run
UNSAFE_START_URL, INVALID_START_URL, START_HOST_UNRESOLVABLEInput rejected before any requestNo (run fails)
BLOCKED_BY_ROBOTS, ROBOTS_UNAVAILABLE, ROBOTS_CRAWL_DELAY_TOO_LONGrobots.txt forbids, cannot be read, or asks for a very long delayNo (run fails)
START_PAGE_UNAVAILABLE, NETWORK_UNRELIABLEHomepage unreadable, or every sampled link failed (likely a network problem)No (run fails)

Failed runs write an explanatory report, never touch the baseline and are never billed.

Change types

changeTypeMeaning
BASELINE_BROKENBroken in the first run (baseline evidence)
NEWLY_BROKENWas healthy in the baseline, now broken
NEWLY_OBSERVED_BROKENBroken and not part of the baseline sample (new link, or only sampled now)
FIXEDWas broken, now answers successfully
BROKEN_STATUS_CHANGEDStill broken, but in a different way (for example 404 to 500)
BROKEN_LINK_REMOVEDA broken link is no longer found on the pages that carried it
STILL_BROKENInformational: unchanged broken link (not a change)

Link statuses: ok, broken_not_found (404/410), broken_client_error, broken_server_error, broken_unreachable (DNS, connection, timeout), broken_redirect, blocked_or_restricted (401, 403, 429 and similar; not counted as broken).

Scheduling

Create a Task with your input and add a schedule, for example daily or weekly. Keep stateStoreName unchanged so runs share one baseline. Because updateBaseline is on by default, each run is compared with the previous run and every change is reported once. Turn it off to keep comparing against the first run.

Use one Task per site root. Different domains are stored under separate baseline keys, and www.example.com and example.com are different origins.

Input

FieldDefaultNotes
startUrl (required)One public HTTPS site root
maxPages121-40 pages read on your site
maxOutboundLinks201-60 outbound links validated
maxLinksPerHost31-10 links per outside host
requestDelayMs500250-5000 ms between all requests
requestTimeoutSecs103-30 seconds
updateBaselinetrueRoll the baseline forward after each run
stateStoreNamepal-link-watch-stateNamed store for baselines; empty uses the run's own store, which does not persist between runs

Total requests per run are capped (about 10 + maxPages + 4 x maxOutboundLinks). Memory use is low because pages are streamed up to a size limit and processed one at a time.

Safety and privacy

  • Only robots-permitted public pages are read. Login, account, checkout, admin, unsubscribe and similar paths are skipped, as are non-page files (PDF, images, archives).
  • Outbound hosts have their own robots.txt read; disallowed links are skipped and counted, not reported as broken.
  • Contact-style links (mailto:, tel:) are ignored and never stored. Outbound links whose query contains credential-like or address-like values are skipped entirely. Tracking parameters and fragments are removed from stored URLs.
  • No logins, cookies, proxies, browsers or third-party APIs are used.
  • Response sizes are capped, compressed responses are decoded under the same cap, and XML with DTD or entity declarations is refused.

Pricing

The code defines one pay-per-event event, link-change-report, charged at most once per run and only when the status is CHANGES_DETECTED. Baseline, no-change and failed runs never charge. No price or payable plan is configured in this project.

Limitations and sample-size caveats

  • This is a sample, not a full audit. At most 40 pages and 60 outbound links are checked per run. The report states how many links were discovered versus checked (coveragePercent). No finding does not mean no broken links.
  • Pages come from the first 200 URLs of the sitemap (or homepage links), chosen by a stable hash so repeated runs look at mostly the same pages. Large sites will have large unchecked areas. Gzip-compressed sitemaps are not read.
  • Links are compared only when present in both samples. If the sample changes, a link can appear as NEWLY_OBSERVED_BROKEN although it existed before.
  • Only static <a href> links are seen; links rendered by JavaScript are not.
  • A broken result can be a temporary outage, a bot-blocking rule answering with an error code, or a site that rejects HEAD requests. Treat findings as leads to verify, not final proof.
  • Sites that hide behind a login, answer 401/403/429, or disallow this crawler cannot be validated and are reported as blocked or skipped.
  • DNS is checked before each request, but a hostile DNS server could change its answer between the check and the connection; do not rely on this Actor as a security scanner.
  • Redirect targets are checked for safety but their robots.txt is not re-read.
  • Query strings are cleaned, so a page that depends on a removed tracking parameter may be checked in a slightly different form.

Local tests

The unit tests are fully offline and use mocked HTTP. From the project folder:

python -m unittest discover -s tests -t .