{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/rankparse-com/json-schema/rankparse-com-link-audit-schema.json",
  "title": "LinkAudit",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/rankparse-com-openapi.yaml#/components/schemas/LinkAudit",
  "type": "object",
  "required": [
    "domain",
    "health_score",
    "risk_flags",
    "link_quality",
    "anchor_profile",
    "top_backlinks",
    "risk_backlinks",
    "outbound_summary",
    "credits_used",
    "credits_remaining"
  ],
  "properties": {
    "domain": {
      "type": "string"
    },
    "health_score": {
      "type": "integer",
      "minimum": 0,
      "maximum": 100
    },
    "risk_flags": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "new_domain",
          "high_authority_new_domain",
          "no_tranco_presence",
          "low_authority"
        ]
      }
    },
    "link_quality": {
      "$ref": "#/$defs/LinkAuditQuality"
    },
    "anchor_profile": {
      "type": "object",
      "required": [
        "branded",
        "partial",
        "generic",
        "naked",
        "image"
      ],
      "properties": {
        "branded": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "partial": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "generic": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "naked": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "image": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        }
      }
    },
    "top_backlinks": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/LinkAuditBacklink"
      }
    },
    "risk_backlinks": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/LinkAuditBacklink"
      }
    },
    "outbound_summary": {
      "$ref": "#/$defs/OutboundSummary"
    },
    "credits_used": {
      "type": "integer",
      "minimum": 0
    },
    "credits_remaining": {
      "type": "integer",
      "minimum": 0
    },
    "crawl_release": {
      "type": "string"
    },
    "cached": {
      "type": "boolean"
    }
  },
  "$defs": {
    "LinkAuditBacklink": {
      "type": "object",
      "required": [
        "from_domain",
        "from_domain_score",
        "anchor_type",
        "link_quality"
      ],
      "properties": {
        "from_domain": {
          "type": "string"
        },
        "from_domain_score": {
          "type": "integer",
          "minimum": 0,
          "maximum": 100
        },
        "anchor_type": {
          "type": "string",
          "enum": [
            "branded",
            "partial",
            "naked",
            "generic",
            "image"
          ]
        },
        "link_quality": {
          "type": "string",
          "enum": [
            "high",
            "medium",
            "low"
          ]
        }
      }
    },
    "LinkAuditQuality": {
      "type": "object",
      "required": [
        "high",
        "medium",
        "low",
        "total"
      ],
      "properties": {
        "high": {
          "type": "integer",
          "minimum": 0
        },
        "medium": {
          "type": "integer",
          "minimum": 0
        },
        "low": {
          "type": "integer",
          "minimum": 0
        },
        "total": {
          "type": "integer",
          "minimum": 0
        }
      }
    },
    "OutboundSummary": {
      "type": "object",
      "required": [
        "unique_destinations",
        "top_domain",
        "top_domain_concentration"
      ],
      "properties": {
        "unique_destinations": {
          "type": "integer",
          "minimum": 0
        },
        "top_domain": {
          "type": [
            "string",
            "null"
          ]
        },
        "top_domain_concentration": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        }
      }
    }
  }
}