Cover image for project: NEXUS Moz Link Explorer IN PROGRESS

Technical summary

NEXUS Moz Link Explorer queries link authority (Domain Authority, Page Authority and Spam Score) for any domain via the Moz Link API V2, with daily portfolio monitoring and evolution snapshots. The plugin also runs Link Intersect to find sites linking competitors but not you, generating outreach tasks prioritized by DA — all with monthly row-budget control, 24h cache and a Fastr slash command.

Executed scope

  • Plugin registration in plugin.php: registerTab('moz', tab.php) with the target icon (Marketing & SEO category), registerDoc('moz', doc.md) and 12 API actions via registerApiAction (moz_ prefix).
  • Moz Link API V2 integration (https://lsapi.seomoz.com/v2): POST JSON protocol with authentication via x-moz-token header (API Token) or legacy Basic Auth (Access ID + Secret Key), cURL timeouts (5s connect / 20s total).
  • Monthly row billing: url_metrics = 1 row (+1 per modifier), link_intersect = 5 rows per result (weighted; max 50 = 250 rows) and usage_data = free. Cost guard (moz_guard_rows): every call estimates consumption before running and blocks when the monthly budget (row_budget, default 3,000) is about to run out.
  • Database (real DDL, moz_install() with CREATE TABLE IF NOT EXISTS): moz_cache (kind, query_key UNIQUE, data LONGTEXT, error, status, http_code, updated_at — 24h response cache to avoid repeated row consumption), moz_snapshots (target, scope, domain_authority/page_authority/spam_score FLOAT, pages_to_root_domain, root_domains_to_root_domain, external_links, snapshot_date, UNIQUE target+date — daily snapshot with ON DUPLICATE KEY UPDATE) and moz_history (provider, query_type, query_val, status, task_id, created_at — query audit).
  • Metrics (moz_metrics): DA, PA, Spam Score, link propensity, referring pages and domains, external links, last crawled and HTTP code for any domain/URL (normalized target).
  • Portfolio monitoring: moz_all_metrics queries all configured domains; moz_snapshot_history returns DA/PA/Spam evolution per domain (configurable day window).
  • Link Intersect (moz_intersect): up to 6 positive_targets and 6 negative_targets, source_scope = 'page', ordering by source_domain_authority and 1–50 limit — returns candidate sources with DA, Spam Score and matching count.
  • Automated outreach (moz_create_outreach): generates [Moz Outreach: {anchor}] {domain} tasks with DA-based priority (≥40 → priority 3, ≥20 → 2, otherwise 1), structured description and system comment — honoring the auto_tasks config flag.
  • Centralized configuration in plugin.moz (via DB::getConfig): api_token, access_id/secret_key (legacy), domains (portfolio), default_project, row_budget (10–1,000,000), interval_min (5–10,080), alerts and auto_tasks — with the token always masked in the public response (moz_mask: first 4 + last 4 chars).
  • Cron (soft-cron): cronjob.json with the moz_monitor_metrics job (tick, non-editable) — moz_cron_check applies a 3,600s throttle and moz_cron_run syncs metrics for all monitored domains respecting the row_budget.
  • Mapped API errors: 401 (authentication), 403 (unrecognized method/banned account), 429 (rate limit / rows), others with the response message.
  • Fast Responses: fastr.json manifest with /moz <domain|url> (DA/PA/Spam query in chat, required argument) via moz_metrics.
  • Intel Hub: nx_intel_register_enricher('moz', ['domain', 'hostname', 'url'], 'moz_intel_enrich', 25) — domains mentioned in tasks/comments get an artifact with DA/PA/Spam/referring domains and severity (medium if DA ≥ 50).
  • Interface (tab.php, 594 lines): 4 tabs — Dashboard (monitored domains with metrics), Metrics (DA/PA/Spam lookup + snapshot evolution), Link Intersect (link building opportunities) and Configuration (credentials, portfolio, row_budget) — with 4 KPIs (Domains, Snapshots, Events today, Rows left).

Stack and tools

  • PHP 8 backend (no framework) + MySQL (moz_cache, moz_snapshots, moz_history)
  • Moz Link API V2 (POST JSON, x-moz-token or Basic Auth)
  • cURL with controlled timeouts and HTTP error mapping
  • Alpine.js + Tailwind CSS (4 tabs, KPIs, evolution charts and opportunity tables)
  • Internal Plugin API (PluginManager tabs/docs/actions + fastr.json + cronjob + intel enricher)
  • NEXUS API Bearer token authentication on API calls

Operational tags

  • SEO
  • Moz
  • DA
  • PA
  • Spam Score
  • Backlinks
  • Link Building
  • Outreach
  • Marketing
  • NEXUS Plugin

Operational result

  • Link authority: DA, PA and Spam Score for any domain/URL in a single call (1 row).
  • Portfolio monitoring: daily snapshots with authority evolution over time.
  • Link Intersect: opportunity bank — sites that link competitors, but not you.
  • Automated outreach: [Moz Outreach: …] tasks prioritized by DA, ready for the team to act.
  • Cost control: row estimation before every call, budget-blocking and 24h cache.
  • Quick access: /moz <domain> slash command straight from the Fastr terminal.

GitHub progress (issues)

Real-time panel with latest repository issues.

abertas (amostra): -- fechadas (amostra): -- base: -- ultimas issues

carregando andamento...

Real results

NEXUS Moz Link Explorer queries link authority (Domain Authority, Page Authority and Spam Score) for any domain via the Moz Link API V2, with daily portfolio monitoring and evolution snapshots. The plugin also runs Link Intersect to find sites linking competitors but not you, generating outreach tasks prioritized by DA — all with monthly row-budget control, 24h cache and a Fastr slash command.

Architecture and organization

Execution and operations

The project follows reproducible execution flow with technical validation in production-like environments.

Screenshots

Talk about this project

Apply this implementation pattern in your environment and accelerate delivery with technical consistency.