Website backlinks checker tool: scripts you can schedule
Every call here works with curl or any HTTP client. Replace the key, keep the pattern: call, save, diff.
ArchiLinks research team ·
Ground rules
One call, one bill. Each request is charged once regardless of rows, up to 1,000 per call, and deep pagination stops at 50,000.
That changes how you write scripts. Ask for per=1000 and page only when you need more, because a website backlinks checker tool built on small pages multiplies your cost by ten for no gain. Errors are plain: HTTP 401 for a missing key, 402 when credit is gone, and every JSON body carries ok.
Run each script once by hand against a small domain and read the JSON. The key names, the row container and the pagination fields should come from a real response, not from our examples, so confirm them before a cron job depends on them.
Python: save a dated snapshot
Field names in the response are shown as an example. Print one response before you rely on a key.
import json, sys, datetime, requests
BASE = "https://archilinks.com/api.php"
KEY = "sk_live_..."
def snapshot(domain, action="refdomains"):
r = requests.get(BASE, params={"action": action, "q": domain, "per": 1000, "key": KEY}, timeout=30)
if r.status_code in (401, 402):
sys.exit(f"API said {r.status_code}: check key or balance")
r.raise_for_status()
body = r.json()
assert body.get("ok"), body
name = f"{domain}-{action}-{datetime.date.today()}.json"
json.dump(body, open(name, "w"), indent=1)
print(name, body.get("_credits"))
snapshot(sys.argv[1])Node: bulk Domain Rating for a list
bulk_dr takes up to 2,000 domains for 1 credit per call, by GET with a domains parameter or by POST body. The comma separator below is an example; test with two domains first. Node 18 or later has fetch built in.
const domains = ["example.com", "example.org"];
const url = new URL("https://archilinks.com/api.php");
url.search = new URLSearchParams({
action: "bulk_dr",
domains: domains.join(","),
key: "sk_live_...",
});
const res = await fetch(url);
if (!res.ok) throw new Error(`HTTP ${res.status}`);
console.log(JSON.stringify(await res.json(), null, 2));Bash and jq: weekly diff
Save a snapshot with the date, then compare two files. Keep the cron weekly or monthly; the index refreshes about monthly.
# crontab: 0 6 1 * * /opt/seo/pull.sh old-shop.com
curl -s "https://archilinks.com/api.php?action=refdomains&q=$1&per=1000&key=$KEY" \
| jq -S . > "snap-$1-$(date +%F).json"
# compare two dated files
diff <(jq -S . snap-old-shop.com-2026-09-01.json) <(jq -S . snap-old-shop.com-2026-10-01.json) | head -50Which action for which script
| Script | Action | Cost per run | Output |
|---|---|---|---|
| Migration baseline | toppages, refdomains | 4 credits | Two JSON files |
| Outreach cleaning | bulk_dr | 1 credit per call, up to 2,000 domains | DR per prospect |
| Rival overlap | intersect | 2 credits | Sites linking to 2–10 domains |
| Anchor watch | anchors | 2 credits | Anchor text list |
| Portfolio check | compare | 1 credit per call, up to 20 domains | Side-by-side metrics |
Handling the edges
Scripts fail at the edges. Plan for them.
Wrap each call in a retry that waits and gives up after three tries, except for 401 and 402, which a retry will never fix. Log the _credits object from every authenticated response, so a spike in spend shows up in your logs before it shows up in your balance, and cap loops with a hard maximum number of pages.
Keep snapshots in git or object storage with the date in the file name. Simple, boring, effective. For migrations, pair these scripts with the redirect map recipe and the migration checklist. Google Sheets users can call the same URLs from Apps Script with UrlFetchApp, and a sheet with a monthly trigger is a perfectly good monitor.
Script questions
- How do I check how many backlinks my site has, for free?
- Call the overview or stats action with no key. Both are free and return the totals from our own link index. For the lists behind the totals, you need a key and 2 credits per call.
- What happens when the balance runs out?
- The API returns HTTP 402. Your script should stop and alert, not retry in a loop. Top up from the account page with USDT (TRC-20) and rerun.
- Can I call it from a browser?
- Yes. CORS is open. Do not put a key in public front-end code, though, since anyone can read it and spend your credit.