Link building in 2026 is an agent problem, not a VA problem. This tutorial builds a link-building agent that finds three opportunity types nightly: broken link prospects, guest post targets, and unlinked brand mentions. All signals come from Scavio SERP.
Prerequisites
- Python 3.10+
- A Scavio API key
- Your target keywords and brand name
- An LLM credential for outreach draft
Walkthrough
Step 1: Find guest post targets
Search for 'write for us' on target topic blogs.
import requests, os
API_KEY = os.environ['SCAVIO_API_KEY']
def guest_targets(topic):
r = requests.post('https://api.scavio.dev/api/v1/search',
headers={'x-api-key': API_KEY},
json={'query': f'{topic} "write for us" OR "contribute"', 'num_results': 50})
return r.json().get('organic_results', [])Step 2: Find broken link opportunities
Search for 'resources' pages on target topic and check link health.
def resource_pages(topic):
r = requests.post('https://api.scavio.dev/api/v1/search',
headers={'x-api-key': API_KEY},
json={'query': f'{topic} "resources" OR "useful links"'})
return r.json().get('organic_results', [])Step 3: Find unlinked brand mentions
Search mentions of your brand that do not link back.
def unlinked(brand):
r = requests.post('https://api.scavio.dev/api/v1/search',
headers={'x-api-key': API_KEY},
json={'query': f'"{brand}" -site:{brand}.com'})
return r.json().get('organic_results', [])Step 4: Score each prospect
Authority signals from domain age, backlinks (inferred from SERP rank).
def score(prospect):
rank = prospect.get('position', 100)
return max(0, 100 - rank)Step 5: Draft outreach with an LLM
Feed prospect context to Claude for a personalized email.
def draft(prospect):
prompt = f'Write a 3-sentence outreach email to {prospect["link"]} about guest posting.'
# call your LLM here
return promptPython Example
import os, requests
API_KEY = os.environ['SCAVIO_API_KEY']
def link_building(topic, brand):
queries = [
f'{topic} "write for us"',
f'{topic} "resources" OR "useful links"',
f'"{brand}" -site:{brand}.com'
]
prospects = []
for q in queries:
r = requests.post('https://api.scavio.dev/api/v1/search',
headers={'x-api-key': API_KEY}, json={'query': q, 'num_results': 20})
prospects += r.json().get('organic_results', [])
return prospects[:30]
print(len(link_building('ai agents', 'scavio')))JavaScript Example
const API_KEY = process.env.SCAVIO_API_KEY;
export async function linkBuilding(topic, brand) {
const queries = [
`${topic} "write for us"`,
`${topic} "resources"`,
`"${brand}" -site:${brand}.com`
];
const prospects = [];
for (const q of queries) {
const r = await fetch('https://api.scavio.dev/api/v1/search', {
method: 'POST',
headers: { 'x-api-key': API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({ query: q, num_results: 20 })
});
const d = await r.json();
prospects.push(...(d.organic_results || []));
}
return prospects.slice(0, 30);
}Expected Output
Nightly output of 30-60 link prospects categorized by type. Typical conversion: 3-8% reply rate with LLM-drafted personalized outreach.