{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "v": {
      "type": "number",
      "const": 1
    },
    "id": {
      "type": "string",
      "pattern": "^[a-zA-Z0-9_-]{1,128}$",
      "description": "Resource identifier returned by the operation."
    },
    "workspace_id": {
      "type": "string",
      "pattern": "^[a-zA-Z0-9_-]{1,128}$",
      "description": "Workspace that owns this record."
    },
    "project_id": {
      "type": "string",
      "pattern": "^[a-zA-Z0-9_-]{1,128}$",
      "description": "Project that owns this record."
    },
    "operation": {
      "type": "string",
      "const": "domain_overview"
    },
    "provider": {
      "type": "string",
      "enum": [
        "linktrail_corpus",
        "dataforseo",
        "imported"
      ]
    },
    "data_mode": {
      "type": "string",
      "enum": [
        "synthetic",
        "owned_corpus",
        "provider_index",
        "imported"
      ]
    },
    "query": {
      "type": "object",
      "properties": {
        "target": {
          "type": "string",
          "minLength": 1,
          "maxLength": 253
        },
        "include_subdomains": {
          "type": "boolean"
        },
        "include_indirect_links": {
          "type": "boolean"
        },
        "exclude_internal_backlinks": {
          "type": "boolean"
        },
        "backlinks_status_type": {
          "type": "string",
          "enum": [
            "live",
            "lost",
            "all"
          ]
        },
        "backlinks_filters": {
          "type": "null"
        },
        "rank_scale": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "one_thousand"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "internal_list_limit": {
          "type": "number",
          "const": 10
        }
      },
      "required": [
        "target",
        "include_subdomains",
        "include_indirect_links",
        "exclude_internal_backlinks",
        "backlinks_status_type",
        "backlinks_filters",
        "rank_scale",
        "internal_list_limit"
      ],
      "additionalProperties": false
    },
    "status": {
      "type": "string",
      "enum": [
        "queued",
        "running",
        "succeeded",
        "failed",
        "reconciliation_required"
      ],
      "description": "Resource lifecycle status."
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$",
      "description": "UTC timestamp when the record was created."
    },
    "started_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
        },
        {
          "type": "null"
        }
      ]
    },
    "finished_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
        },
        {
          "type": "null"
        }
      ]
    },
    "error_code": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[A-Z_]{1,80}$",
          "description": "Latest delivery detail code; null when no failure or retry has been recorded."
        },
        {
          "type": "null"
        }
      ],
      "description": "Latest delivery detail code; null when no failure or retry has been recorded."
    },
    "usage": {
      "type": "object",
      "properties": {
        "unit": {
          "type": "string",
          "const": "domain_overview"
        },
        "currency": {
          "type": "string",
          "const": "USD"
        },
        "quote_id": {
          "type": "string",
          "pattern": "^[a-zA-Z0-9_-]{1,128}$"
        },
        "max_cost_microusd": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "reserved_cost_microusd": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "provider_reported_cost_microusd": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        },
        "request_count": {
          "type": "integer",
          "minimum": 0,
          "maximum": 1
        },
        "summaries_returned": {
          "type": "integer",
          "minimum": 0,
          "maximum": 1
        }
      },
      "required": [
        "unit",
        "currency",
        "quote_id",
        "max_cost_microusd",
        "reserved_cost_microusd",
        "provider_reported_cost_microusd",
        "request_count",
        "summaries_returned"
      ],
      "additionalProperties": false
    },
    "result": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "v": {
              "type": "number",
              "const": 1
            },
            "overview_run_id": {
              "type": "string",
              "pattern": "^[a-zA-Z0-9_-]{1,128}$"
            },
            "workspace_id": {
              "type": "string",
              "pattern": "^[a-zA-Z0-9_-]{1,128}$",
              "description": "Workspace that owns this record."
            },
            "project_id": {
              "type": "string",
              "pattern": "^[a-zA-Z0-9_-]{1,128}$",
              "description": "Project that owns this record."
            },
            "provider": {
              "type": "string",
              "enum": [
                "linktrail_corpus",
                "dataforseo",
                "imported"
              ]
            },
            "data_mode": {
              "type": "string",
              "enum": [
                "synthetic",
                "owned_corpus",
                "provider_index",
                "imported"
              ]
            },
            "provider_retrieved_at": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$",
              "description": "Timestamp when the upstream evidence was retrieved."
            },
            "provider_first_seen": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "provider_lost_date": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "verified_at": {
              "type": "null",
              "description": "Timestamp of the AgentLinkOps check; null until checked."
            },
            "coverage": {
              "type": "string",
              "enum": [
                "provider_summary",
                "corpus_subset",
                "partial"
              ],
              "description": "Dataset scope and completeness, including limits on what these results establish."
            },
            "counts": {
              "type": "object",
              "properties": {
                "backlinks": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "referring_domains": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "referring_main_domains": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "referring_pages": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "referring_ips": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "referring_subnets": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "crawled_pages": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "broken_backlinks": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "broken_pages": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "backlinks",
                "referring_domains",
                "referring_main_domains",
                "referring_pages",
                "referring_ips",
                "referring_subnets",
                "crawled_pages",
                "broken_backlinks",
                "broken_pages"
              ],
              "additionalProperties": false
            },
            "provider_metrics": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "dataforseo": {
                      "type": "object",
                      "properties": {
                        "rank": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 1000
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "backlinks_spam_score": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 100
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "rank_scale": {
                          "type": "string",
                          "const": "one_thousand"
                        }
                      },
                      "required": [
                        "rank",
                        "backlinks_spam_score",
                        "rank_scale"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "dataforseo"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "linktrail_corpus": {
                      "type": "object",
                      "properties": {
                        "corpus_source_pages": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "corpus_last_expanded_at": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "corpus_source_pages",
                        "corpus_last_expanded_at"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "linktrail_corpus"
                  ],
                  "additionalProperties": false
                }
              ]
            }
          },
          "required": [
            "v",
            "overview_run_id",
            "workspace_id",
            "project_id",
            "provider",
            "data_mode",
            "provider_retrieved_at",
            "provider_first_seen",
            "provider_lost_date",
            "verified_at",
            "coverage",
            "counts",
            "provider_metrics"
          ],
          "additionalProperties": {},
          "description": "Saved result; null when this operation has no completed result."
        },
        {
          "type": "null"
        }
      ],
      "description": "Saved result; null when this operation has no completed result."
    },
    "coverage": {
      "type": "string",
      "description": "Dataset scope and completeness, including limits on what these results establish."
    },
    "coverage_scope": {
      "type": "string",
      "const": "provider_query"
    },
    "whole_web_coverage": {
      "type": "boolean",
      "const": false,
      "description": "False: these results do not measure the whole web."
    },
    "replayed": {
      "description": "True when the response reuses an earlier request with the same idempotency value.",
      "type": "boolean"
    }
  },
  "required": [
    "v",
    "id",
    "workspace_id",
    "project_id",
    "operation",
    "provider",
    "data_mode",
    "query",
    "status",
    "created_at",
    "started_at",
    "finished_at",
    "error_code",
    "usage",
    "result",
    "coverage",
    "coverage_scope",
    "whole_web_coverage"
  ],
  "additionalProperties": {}
}
