Backlink gaps are one of the most overlooked opportunities in SEO. You might have a solid link profile, but your competitors are likely getting links from sites that completely ignore you. I built a small script that uses the SERPSpur API to compare your domain's backlinks against competitors and find those missed opportunities:
python
import requests
API_KEY = "your_api_key_here"
def find_backlink_gaps(your_domain, competitor_domains):
response = requests.post(
"https://api.serspur.com/v1/backlink-gap",
headers={"Authorization": f"Bearer {API_KEY}"},
json={
"target": your_domain,
"competitors": competitor_domains,
"limit": 50
}
)
data = response.json()
print(f"Websites linking to competitors but not to {your_domain}:")
for site in data['gaps']:
print(f" - {site['domain']} (linked from {site['linking_domain']})")
return data
Example usage
find_backlink_gaps("example.com", ["competitor1.com", "competitor2.com"])
This reveals patterns like industry directories or niche blogs that favor your rivals. The real win is when you find sites that link to multiple competitors but skip you—those are prime targets for outreach. What's your go-to method for finding these gaps manually?
Top comments (1)
Nice script! I usually do this manually by checking Ahrefs' 'Intersection' feature, but automating it with an API is way more efficient for regular audits. One thing I'd add: don't just look at the gaps—prioritize sites with high domain authority and relevance, or you'll waste time on low-value outreach.