{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/xeorank-com/json-schema/xeorank-com-crawl-job-status-schema.json",
  "title": "CrawlJobStatus",
  "x-generated": "2026-11-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/xeorank-com-openapi.json#/components/schemas/CrawlJobStatus",
  "properties": {
    "job_id": {
      "type": "string",
      "title": "Job Id"
    },
    "seed_url": {
      "type": "string",
      "title": "Seed Url"
    },
    "status": {
      "type": "string",
      "enum": [
        "queued",
        "running",
        "completed",
        "partial",
        "failed",
        "cancelled"
      ],
      "title": "Status"
    },
    "stage": {
      "type": "string",
      "title": "Stage",
      "default": "queued"
    },
    "status_detail": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Status Detail"
    },
    "pages_crawled": {
      "type": "integer",
      "title": "Pages Crawled",
      "default": 0
    },
    "pages_discovered": {
      "type": "integer",
      "title": "Pages Discovered",
      "default": 0
    },
    "counts": {
      "anyOf": [
        {
          "$ref": "#/$defs/CrawlCounts"
        },
        {
          "type": "null"
        }
      ]
    },
    "errors_count": {
      "type": "integer",
      "title": "Errors Count",
      "default": 0
    },
    "health_score": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Health Score"
    },
    "health_breakdown": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Health Breakdown"
    },
    "coverage": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Coverage"
    },
    "error_message": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Error Message"
    },
    "retry_count": {
      "type": "integer",
      "title": "Retry Count",
      "default": 0
    },
    "last_heartbeat_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Last Heartbeat At"
    },
    "dispatch_required": {
      "type": "boolean",
      "title": "Dispatch Required",
      "default": false
    },
    "started_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Started At"
    },
    "finished_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Finished At"
    },
    "created_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Created At"
    }
  },
  "type": "object",
  "required": [
    "job_id",
    "seed_url",
    "status"
  ],
  "$defs": {
    "CrawlCounts": {
      "properties": {
        "fetched_pages": {
          "type": "integer",
          "title": "Fetched Pages",
          "default": 0
        },
        "recorded_urls": {
          "type": "integer",
          "title": "Recorded Urls",
          "default": 0
        },
        "not_fetched_urls": {
          "type": "integer",
          "title": "Not Fetched Urls",
          "default": 0
        }
      },
      "type": "object",
      "title": "CrawlCounts"
    }
  }
}