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.

Can I create separate sitemaps for different content types, and why would I?
Absolutely, and you should. Segmenting sitemaps by content type (e.g., blog posts, product pages, landing pages, videos) provides granular control. This allows you to prioritize submission and crawling of high-value sections. For instance, you can submit your `sitemap-products.xml` more frequently than an archive section. It also simplifies diagnostics; if Google reports errors in one sitemap, you isolate the issue to a specific content silo without sifting through a monolithic file.
How do I use case studies or client logos for SEO benefit?
Client logos with case study links are potent “elite” social proof. Create a “Clients” or “Case Studies” page optimized with relevant keywords. Use logo images with descriptive, keyword-rich alt text (e.g., `alt=“SEO case study for Tech Startup Inc”`). Link each logo to a detailed case study page. This builds internal linking structure, creates valuable content hubs, and demonstrates authority, which can attract backlinks from the featured clients themselves.
What is the core connection between social content and Guerrilla SEO?
Guerrilla SEO leverages unconventional, high-impact tactics to earn links and visibility. Shareable social content is a primary weapon. It acts as “link bait” by creating something so useful, entertaining, or provocative that it naturally attracts backlinks when shared across communities and platforms. You’re not building links directly; you’re creating an asset that earns them through social proof and value, satisfying both audience desire and search engine algorithms for authority signals.
What’s the Best Way to Structure Content Around These Question Phrases?
Forgo forcing them into awkward blog posts. Build dedicated, hyper-focused “answer” pages. Target one primary question per page, using it as the H1. Structure content with clear, scannable sections (H2s, H3s) that address related sub-questions from your research. Implement FAQ Schema markup to potentially snag a rich snippet “position zero.“ This modular approach creates a scalable content library where each page is a precise trap for specific search intent, collectively forming a comprehensive topical authority net.
What metrics should I track to measure the SEO impact of UGC?
Look beyond vanity metrics. Track: Organic traffic to UGC pages, keyword rankings for long-tails generated in UGC, and engagement signals (avg. time on page, bounce rate for UGC sections). Monitor indexation rates of UGC pages via Google Search Console. Analyze the internal linking flow from UGC to cornerstone content. Finally, track direct conversions or leads that originate from UGC pages to prove ROI. The goal is to correlate community activity with organic growth and user satisfaction.
Image