Open-source backlink intelligence based on evidence, context, and editorial fit.
Backlink Intelligence is a local-first Python toolkit for SEO professionals who want to evaluate backlink opportunities beyond a single domain-level authority metric.
It covers the complete working cycle:
Qualify → Audit → Place → Monitor → Analyze
The core tool works without paid SEO APIs or paid AI APIs.
| Command | Purpose | Status |
|---|---|---|
audit |
Inspect an existing backlink and its page-level evidence | ✅ Available |
qualify |
Evaluate backlink prospects from CSV | ✅ Available |
place |
Find contextual placement opportunities and produce Before/After suggestions | ✅ Available |
monitor |
Detect changes to acquired backlinks over time | ✅ Available |
portfolio |
Review anchor, destination, and placement distributions | ✅ Available |
DA, DR, and similar third-party metrics can be useful inputs, but they do not describe the full quality of an individual link placement.
A backlink also has:
- a source page and destination page,
- topical and contextual alignment,
- an anchor,
- a surrounding paragraph,
- a placement type,
- link attributes,
- crawl/indexability evidence,
- and an outbound-link neighborhood.
Backlink Intelligence surfaces those observable signals so an SEO can make a more informed decision.
It does not claim to reproduce Google's ranking systems, predict penalties, or provide a universal "Google backlink score."
Python 3.11+ is required.
python -m pip install .For development:
git clone https://github.com/alok-vibe-code/backlink-intelligence.git
cd backlink-intelligence
python -m pip install -e .Verify the installation:
backlink-intelligence --version
backlink-intelligence statusbacklink-intelligence audit \
"https://publisher.example/article" \
"https://brand.example/target-page"Typical evidence includes:
- source/target HTTP status,
- backlink found/not found,
- anchor text,
nofollow,sponsored, andugcattributes,- placement classification,
- source indexability,
- page/context relevance,
- external-link counts,
- review flags,
- recommendation,
- and analysis confidence.
JSON output:
backlink-intelligence audit SOURCE_URL TARGET_URL --jsonSave JSON:
backlink-intelligence audit SOURCE_URL TARGET_URL --output audit.jsonCreate a CSV:
source_url,target_url,preferred_anchor
https://publisher.example/post,https://brand.example/page,agentic ai courseRun:
backlink-intelligence qualify prospects.csv --output qualification-report.csvThe report includes evidence such as relevance, placement potential, outbound-link density, review flags, confidence, and a workflow recommendation:
prioritizemanual_reviewlow_priority
This is the signature workflow.
backlink-intelligence place \
"https://publisher.example/article" \
"https://brand.example/target" \
--anchor "agentic ai course" \
--top 3For each recommended paragraph the tool returns:
- paragraph number,
- context-fit level,
- destination-fit level and score,
- requested anchor,
- actual placed anchor (preserving source capitalization/grammar where possible),
- placement strategy,
- editorial intervention level,
- original-text preservation,
- Before paragraph,
- After paragraph,
- reasons,
- and review flags.
The deterministic rewrite engine deliberately favors minimal editorial change. Exact phrase matching uses complete word boundaries, preserves the publisher's existing capitalization, and can conservatively adapt a singular/plural anchor to the grammatical form already present in source copy. Destination-intent scoring also helps distinguish a paragraph that matches the target's specific topic from one that merely repeats the requested anchor. Its output is a placement draft for human review, not an instruction to publish automatically.
Create a CSV:
source_url,target_url,expected_anchor
https://publisher.example/article,https://brand.example/page,AI guideFirst check creates the baseline:
backlink-intelligence monitor links.csv \
--state backlink-state.json \
--output monitor-report.csvRun the same command later to detect:
- removed links,
- anchor changes,
relattribute changes,- placement changes,
- source/target status changes,
- canonical changes,
- and robots changes.
Input CSV should contain target_url and can optionally include anchor and placement.
backlink-intelligence portfolio backlinks.csv --output portfolio.jsonThe report summarizes:
- anchor-category distribution,
- destination distribution,
- placement distribution.
Backlink Intelligence intentionally avoids an unexplained universal 0–100 backlink score.
Instead it exposes dimensions such as:
- Relevance: low / medium / high / very high
- Placement: editorial context / navigation / sidebar / footer / unknown
- Risk signals: explicit review flags
- Confidence: low / medium / high
- Recommendation: workflow guidance, not a ranking claim
See Methodology and Signal Definitions.
The v1 engine is deterministic and local. It combines:
- normalized term overlap,
- cosine similarity over term-frequency vectors,
- title/H1 alignment,
- heading alignment,
- page-to-page similarity,
- paragraph-to-target similarity,
- and shared topical terms.
This makes the result reproducible and inspectable without requiring an LLM API.
The placement engine follows three principles:
- Editorial fit before keyword insertion.
- Preserve publisher copy whenever possible.
- Show the evidence and let a human approve the final wording.
When the exact requested anchor already exists naturally, the tool uses minimal insertion. Otherwise it adds a conservative contextual sentence rather than rewriting the entire paragraph.
The fetcher is intentionally bounded:
- only HTTP/HTTPS URLs,
- embedded URL credentials blocked,
- localhost/private/link-local/reserved IPs blocked,
- DNS-resolved private addresses blocked,
- redirects revalidated,
- redirect count limited,
- request timeout,
- maximum HTML response size,
- non-HTML content rejected,
- identifiable user agent.
See SECURITY.md and Ethical Crawling.
The v1 parser focuses on server-delivered HTML. Pages whose meaningful content or links are rendered only by client-side JavaScript may require browser rendering, which is intentionally not bundled into the zero-dependency core.
The Before/After engine is deterministic and conservative. It does not attempt unrestricted AI copywriting. Optional model-assisted rewriting can be added later without making it mandatory for core functionality.
See Limitations.
The repository includes deterministic offline tests for:
- HTML/meta/link extraction,
- placement classification,
- URL normalization,
- outbound-link evidence,
- relevance,
- contextual placement ranking,
- Before/After generation,
- monitoring change detection,
- portfolio analysis,
- URL safety,
- CLI behavior.
Run:
python -m unittest discover -s tests -vThis project implements ideas developed in:
Backlink Quality Beyond DA & DR
The article explains the conceptual framework. This repository turns that framework into transparent, testable software.
The GitHub repository is the source of truth for the analysis engine. A later phase can expose selected capabilities through a public interface on alokblog.com, using the same package rather than duplicating SEO logic.
The initial public web version is expected to focus on:
- single backlink audit,
- contextual placement analysis,
- Before/After placement recommendations.
Bulk crawling and continuous monitoring are better suited to the local/open-source version unless hosted infrastructure is deliberately provisioned for them.
backlink_intelligence/
├── audit.py
├── cli.py
├── fetcher.py
├── html_utils.py
├── link_analysis.py
├── models.py
├── monitor.py
├── placement.py
├── portfolio.py
├── qualify.py
├── relevance.py
├── reporting.py
└── safety.py
Contributions, test cases, parser improvements, and evidence-based methodology discussions are welcome. Read CONTRIBUTING.md first.
MIT. See LICENSE.
Backlink Intelligence is an independent open-source SEO research and workflow tool. It is not affiliated with Google, Ahrefs, Semrush, Moz, Majestic, or any other search engine or SEO platform. Outputs should be treated as evidence for professional review, not as guarantees of ranking impact, penalties, or search-engine behavior.
Version 1.1 adds an optional FastAPI service for the public Backlink Placement Analyzer. Install it with:
pip install ".[api]"
uvicorn backlink_intelligence.api:app --host 127.0.0.1 --port 8000The public endpoint is POST /v1/place. It accepts a source URL, target URL, preferred anchor, and Cloudflare Turnstile token. A valid analysis returns either completed or no_suitable_placement; the latter is a successful HTTP 200 outcome, not an API error.
Generated copy is returned as plain after_text plus after_segments containing only text and link records. The API never returns executable markup. Numeric scores are internal ranking evidence and must not be presented as probabilities, authority scores, ranking potential, or percentage quality. Beta thresholds are private server configuration and are not included in responses.
Production deployment settings are documented in render.yaml and .env.example. Free hosting has capacity, cold-start, and bandwidth limits; the service does not require a database, paid SEO data, or an LLM API.