Backlink API: check a domain's backlinks in Python
2026-10-08
A backlink API returns the link profile of a domain without a dashboard: how many sites link to it and how those links are distributed. This guide calls the AxioAPI backlink summary endpoint, shows what the response looks like and how to compare your site with a competitor.
What you need
- An AxioAPI key, stored as the AXIOAPI_KEY environment variable.
- A public hostname such as example.com, without https:// or a path.
- Python 3 with the requests package, or just curl.
One request with curl
GET /api/v1/seo/domains/{domain}/backlinks takes the hostname in the path and returns the backlink summary.
curl -s "https://axioapi.com/api/v1/seo/domains/example.com/backlinks" \
-H "Authorization: Bearer $AXIOAPI_KEY"
Compare domains in Python
The script loops over your domain and a competitor, prints which data sources answered and the metrics each one returned. Keeping the source name next to every number lets you see which provider a figure came from.
import os
import requests
API = "https://axioapi.com/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['AXIOAPI_KEY']}", "Accept": "application/json"}
def backlink_summary(domain):
res = requests.get(f"{API}/seo/domains/{domain}/backlinks", headers=HEADERS, timeout=60)
res.raise_for_status()
return res.json()["data"]
for domain in ["example.com", "competitor.com"]:
data = backlink_summary(domain)
print(domain, "| partial answer:", data["partial"], "| sources missing:", data["missing"])
for source, metrics in data["sources"].items():
print(f" {source}: {metrics}")
Read the response
- data.sources holds the metrics of each source that answered, keyed by source name. Sources can use different metrics, so compare a figure only with the same source.
- data.missing lists sources that did not answer and data.partial is true when any are missing. Treat a partial answer as incomplete and retry later instead of reading a missing value as zero.
- data.cached tells you whether the answer came from the cache. Repeated requests for the same domain can be served from the cache and are still billed as a request.
Use backlink data well
The numbers are estimates from third-party indexes, not a full list of every link, and they differ between providers. Use them to compare trends and competitors rather than as an exact count.
Start from the number of referring domains rather than total links, because many links from one site count for much less than links from many sites. For a quick manual check, try the free backlink checker.