Broken Link Building with Free Tools

Automating Broken Link Discovery with the Wayback Machine CDX API and jq

Most broken link building workflows still involve downloading a Screaming Frog crawl, filtering for 404s, and manually checking each URL against the Wayback Machine to see what the page used to contain. That’s fine for a single target domain, but when you’re trying to scale across dozens of competitor resource pages, directory sites, or industry roundups, the manual overhead becomes a bottleneck. The real leverage lives in the Internet Archive’s CDX API—a RESTful endpoint that exposes every archived snapshot by URL, timestamp, status code, and mimetype. Combined with `jq` for JSON processing and a bit of shell scripting, you can build a pipeline that takes a list of broken URLs and returns, in seconds, the last valid snapshot and the original content type. No paid tools, no Python dependencies, just curl and standard UNIX utilities.

The core insight: when a resource page links to a dead URL, the Wayback Machine almost always has a copy of what was there before the 404 appeared. That snapshot becomes your blueprint for recreating a similar or better piece of content. But instead of visiting each URL in a browser, you hit the CDX API with a query like `https://web.archive.org/cdx/search/cdx?url=&output=json&fl=timestamp,statuscode,length&filter=statuscode:200&limit=1`. The `fl` parameter controls which fields you get back; `filter` narrows to only successful responses; `limit=1` grabs the most recent snapshot that returned a 200. Pipe that JSON into `jq` to extract the timestamp, then construct the replay URL: `https://web.archive.org/web//`. Now you have a direct link to the archived content, ready to inspect or even fetch with `wget` for offline analysis.

The beauty of this approach is that it scales horizontally. If you have a CSV of 500 broken URLs from a competitor’s resources page, a `while read url; do curl -s “https://web.archive.org/cdx/search/cdx?url=$url&output=json&fl=timestamp,statuscode&filter=statuscode:200&limit=1” | jq -r ’.[1][0] // empty’; done < urls.txt` will return timestamps for every URL that ever had a working snapshot. You can then parallelize the curl calls with `xargs -P 8` to cut the runtime from minutes to seconds. The only rate limit to worry about is politeness—adding a 100ms sleep between requests keeps your IP from being throttled. The entire operation is free, runs on any machine with bash, and requires absolutely no API key.

But extracting snapshots is only half the battle. The real value comes from analyzing the content type and size of those snapshots. Add `mimetype` and `length` to your `fl` parameter, and `jq` can filter out HTML pages that were actually just redirects or thin wrapper scripts. For example, a broken link that used to point to a PDF or a ZIP file is a goldmine because the original resource was clearly non-trivial. You can rebuild that resource—whitepaper, case study, dataset—and pitch the site owner to replace the dead file with your new one. The CDX API also supports date range filters (`from` and `to`), which let you target snapshots from before the link went dead. If you know a specific resource page was last updated in 2019, you can restrict the CDX query to only return snapshots from 2018 or earlier, ensuring you get the version that the linker actually pointed to.

Another overlooked tactic: use the CDX API to find orphaned snapshots of pages that are now completely gone, not just 404s. Some sites delete entire sections and redirect the URL to a generic homepage. The CDX API will still return a 200 snapshot if that homepage was archived, but comparing the `length` field across snapshots can reveal when the content changed dramatically. A sudden drop in content size from 50KB to 5KB often indicates a redirect or a replacement page with no useful information. You can script this detection by pulling the last three timestamps and checking if the content length fluctuates by more than an order of magnitude.

The cherry on top: combine CDX data with Google Search Console’s coverage report. Export the list of “Not found” pages from GSC, deduplicate with the source URL column, and feed that list into the same curl/jq pipeline. Now you’re systematically checking every 404 that Google crawled, discovering which ones had valuable content, and prioritizing outreach based on the original page’s relevance to your niche. No Screaming Frog license needed, no Ahrefs credit drain. Just a terminal, a free Archive.org API, and a little bit of `jq` fluency. This is the kind of workflow that separates passive SEO from active, signal-based link acquisition.

Image
Knowledgebase

Recent Articles

F.A.Q.

Get answers to your SEO questions.

How do I measure the ROI of fast-moving guerrilla tactics?
Track velocity-based metrics, not just totals. Monitor the rate of keyword ranking improvements week-over-week, the time-to-first-page for new content, and the cost-per-acquisition of earned links. Use UTM parameters on all seeded content to track referral quality. Since guerrilla SEO is about momentum, leading indicators like impression share growth, click-through-rate from SERPs, and referral traffic spikes are often more telling than long-term domain authority scores.
What Are Common Pitfalls That Make Outreach Look Spammy and How Do I Avoid Them?
Major pitfalls include overly promotional language, irrelevant pitches, and blatant template use (e.g., “Dear [Blog Owner]“). Avoid this by: 1) Always referencing the prospect’s specific content, 2) Leading with value for their audience, not your product, 3) Sending from a real-person email address with a professional signature, and 4) Keeping requests simple and specific (e.g., “consider adding this link to your resources list”). Warm up your sending domain and maintain a low daily send volume to protect sender reputation.
What are the most effective on-site UGC formats for SEO impact?
Prioritize formats that generate fresh, keyword-rich text and foster interaction. These include: 1) Q&A forums (targeting “how to” and problem-solving long-tails), 2) Detailed product/service reviews (rich in features and use-case language), and 3) User-generated tutorials or case studies. These formats create internal linking opportunities, keep pages dynamically updated, and directly satisfy search intent. Ensure all UGC is crawlable (not hidden in JS) and consider schema markup for reviews and Q&A to enhance SERP features.
Is guest posting still a viable guerrilla SEO tactic?
Yes, but only if executed with a sniper’s precision, not a shotgun’s spread. Target publications where a single link carries massive topical relevance and domain authority. Write genuinely groundbreaking, technical deep-dives that their audience craves. The goal isn’t just any backlink; it’s a strategic foothold in a authoritative community. Furthermore, repurpose that high-quality guest post into a thread, a LinkedIn article, and snippets for social, squeezing maximum value from the effort. Quality and strategic placement trump volume every time.
What Are the Best Guerrilla Tactics for Local SEO?
Claim and fully optimize your Google Business Profile with high-quality photos, posts, and precise categories. Garner hyper-local reviews by simply asking satisfied customers. Ensure NAP (Name, Address, Phone) consistency across directories using free tools like Moz Local’s free checker. Create location-specific service pages with unique content, not just city-name swaps. Get listed in relevant, niche local directories (e.g., a local bakery in a “farmers’ market vendor” site). It’s about dominating your physical digital footprint with consistency and community engagement.
Image