{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "schema_version": {
      "anyOf": [
        {
          "type": "number",
          "const": 1
        },
        {
          "type": "number",
          "const": 2
        }
      ]
    },
    "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."
    },
    "scope": {
      "type": "object",
      "properties": {
        "domain": {
          "type": "string",
          "minLength": 1,
          "maxLength": 253
        },
        "include_subdomains": {
          "type": "boolean"
        },
        "website_revision": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "query_version": {
          "type": "string",
          "const": "dataforseo-as-is-v1"
        }
      },
      "required": [
        "domain",
        "include_subdomains",
        "website_revision",
        "query_version"
      ],
      "additionalProperties": false
    },
    "source": {
      "type": "string",
      "const": "dataforseo"
    },
    "data_mode": {
      "type": "string",
      "enum": [
        "synthetic",
        "provider_index"
      ]
    },
    "state": {
      "type": "string",
      "enum": [
        "queued",
        "fetching",
        "checking",
        "ready",
        "partial",
        "empty",
        "failed",
        "cancelled",
        "reconciliation_required"
      ],
      "description": "Saved lifecycle or evidence state, as enumerated for this record."
    },
    "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."
    },
    "updated_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 of the last record update."
    },
    "execution_deadline": {
      "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))$"
    },
    "timing": {
      "type": "object",
      "properties": {
        "first_result_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"
            }
          ]
        },
        "first_result_ms": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "first_result_at",
        "finished_at",
        "first_result_ms"
      ],
      "additionalProperties": false
    },
    "components": {
      "type": "object",
      "properties": {
        "summary": {
          "type": "object",
          "properties": {
            "state": {
              "type": "string",
              "enum": [
                "pending",
                "running",
                "succeeded",
                "partial",
                "empty",
                "failed",
                "cancelled",
                "reconciliation_required"
              ],
              "description": "Saved lifecycle or evidence state, as enumerated for this record."
            },
            "run_id": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^[a-zA-Z0-9_-]{1,128}$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "retrieved_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",
                  "maxLength": 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."
            }
          },
          "required": [
            "state",
            "run_id",
            "retrieved_at",
            "error_code"
          ],
          "additionalProperties": false,
          "description": "Grouped change counts included in this delivery, limited to accessible websites."
        },
        "list": {
          "type": "object",
          "properties": {
            "state": {
              "type": "string",
              "enum": [
                "pending",
                "running",
                "succeeded",
                "partial",
                "empty",
                "failed",
                "cancelled",
                "reconciliation_required"
              ],
              "description": "Saved lifecycle or evidence state, as enumerated for this record."
            },
            "run_id": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^[a-zA-Z0-9_-]{1,128}$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "retrieved_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",
                  "maxLength": 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."
            }
          },
          "required": [
            "state",
            "run_id",
            "retrieved_at",
            "error_code"
          ],
          "additionalProperties": false
        },
        "checks": {
          "type": "object",
          "properties": {
            "state": {
              "type": "string",
              "enum": [
                "pending",
                "running",
                "succeeded",
                "partial",
                "empty",
                "failed",
                "cancelled",
                "reconciliation_required"
              ],
              "description": "Saved lifecycle or evidence state, as enumerated for this record."
            },
            "run_id": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^[a-zA-Z0-9_-]{1,128}$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "retrieved_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",
                  "maxLength": 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."
            }
          },
          "required": [
            "state",
            "run_id",
            "retrieved_at",
            "error_code"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "summary",
        "list",
        "checks"
      ],
      "additionalProperties": false
    },
    "summary": {
      "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": false,
          "description": "Grouped change counts included in this delivery, limited to accessible websites."
        },
        {
          "type": "null"
        }
      ],
      "description": "Grouped change counts included in this delivery, limited to accessible websites."
    },
    "counts": {
      "type": "object",
      "properties": {
        "indexed_total": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        },
        "retrieved_candidates": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "selected_checks": {
          "type": "integer",
          "minimum": 0,
          "maximum": 10
        },
        "checked": {
          "type": "integer",
          "minimum": 0,
          "maximum": 10
        },
        "present": {
          "type": "integer",
          "minimum": 0,
          "maximum": 10
        },
        "absent": {
          "type": "integer",
          "minimum": 0,
          "maximum": 10
        },
        "source_unavailable": {
          "type": "integer",
          "minimum": 0,
          "maximum": 10
        },
        "unknown": {
          "type": "integer",
          "minimum": 0,
          "maximum": 10
        }
      },
      "required": [
        "indexed_total",
        "retrieved_candidates",
        "selected_checks",
        "checked",
        "present",
        "absent",
        "source_unavailable",
        "unknown"
      ],
      "additionalProperties": false
    },
    "coverage": {
      "type": "object",
      "properties": {
        "whole_web": {
          "type": "boolean",
          "const": false
        },
        "sample": {
          "type": "boolean",
          "const": true,
          "description": "True: the rendered preview uses example content, never customer events."
        },
        "ordering": {
          "type": "string",
          "const": "rank,desc"
        },
        "reason": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 80,
              "description": "Recorded explanation; null when no explanation applies."
            },
            {
              "type": "null"
            }
          ],
          "description": "Recorded explanation; null when no explanation applies."
        }
      },
      "required": [
        "whole_web",
        "sample",
        "ordering",
        "reason"
      ],
      "additionalProperties": false,
      "description": "Dataset scope and completeness, including limits on what these results establish."
    },
    "selection": {
      "type": "object",
      "properties": {
        "policy": {
          "type": "string",
          "const": "distinct-host-target-order-v1"
        },
        "manifest_hash": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            {
              "type": "null"
            }
          ]
        },
        "candidate_ids": {
          "maxItems": 10,
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^[a-zA-Z0-9_-]{1,128}$"
          }
        },
        "render_limit": {
          "type": "number",
          "const": 0
        }
      },
      "required": [
        "policy",
        "manifest_hash",
        "candidate_ids",
        "render_limit"
      ],
      "additionalProperties": false
    },
    "recurring_monitoring_created": {
      "type": "boolean",
      "const": false,
      "description": "Whether this operation enrolled recurring monitoring."
    },
    "recovery": {
      "type": "string",
      "enum": [
        "read_saved_run",
        "reconcile_receipt",
        "explicit_new_offer"
      ]
    },
    "replayed": {
      "description": "True when the response reuses an earlier request with the same idempotency value.",
      "type": "boolean"
    }
  },
  "required": [
    "schema_version",
    "id",
    "workspace_id",
    "project_id",
    "scope",
    "source",
    "data_mode",
    "state",
    "created_at",
    "updated_at",
    "execution_deadline",
    "timing",
    "components",
    "summary",
    "counts",
    "coverage",
    "selection",
    "recurring_monitoring_created",
    "recovery"
  ],
  "additionalProperties": false
}
