{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/unifapi-com/json-schema/unifapi-com-seo-backlinks-page-intersection-request-schema.json",
  "title": "SeoBacklinksPageIntersectionRequest",
  "x-generated": "2026-11-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/unifapi-com-openapi.yml#/components/schemas/SeoBacklinksPageIntersectionRequest",
  "type": "object",
  "properties": {
    "targets": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 2048
      },
      "minItems": 1,
      "maxItems": 20,
      "description": "Domains, subdomains, or pages to find common referring pages for (1-20). Order is preserved as the 1-based index in the response."
    },
    "exclude_targets": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 2048
      },
      "maxItems": 10,
      "description": "Domains, subdomains, or pages to exclude (up to 10). Pages linking to these are dropped."
    },
    "intersection_mode": {
      "type": "string",
      "enum": [
        "all",
        "partial"
      ],
      "description": "all (default) returns pages linking to any target; partial returns only pages linking to every target."
    },
    "backlinks_status_type": {
      "$ref": "#/$defs/SeoBacklinksStatusType"
    },
    "include_subdomains": {
      "type": "boolean",
      "description": "Include backlinks pointing to the target's subdomains. Defaults to true."
    },
    "include_indirect_links": {
      "type": "boolean",
      "description": "Include indirect links (via redirects or canonicals) to the target. Defaults to true."
    },
    "exclude_internal_backlinks": {
      "type": "boolean",
      "description": "Exclude internal backlinks from the target's own subdomains. Defaults to true."
    },
    "internal_list_limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 1000,
      "description": "Maximum number of entries kept in each referring_links_* breakdown map. Defaults to 10."
    },
    "rank_scale": {
      "$ref": "#/$defs/SeoBacklinksRankScale"
    },
    "filters": {
      "anyOf": [
        {
          "$ref": "#/$defs/DataForSeoFilterCondition"
        },
        {
          "type": "object",
          "properties": {
            "and": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/DataForSeoFilter"
              },
              "minItems": 2,
              "description": "Sub-expressions that must all match."
            }
          },
          "required": [
            "and"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "or": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/DataForSeoFilter"
              },
              "minItems": 2,
              "description": "Sub-expressions where at least one must match."
            }
          },
          "required": [
            "or"
          ],
          "additionalProperties": false
        }
      ],
      "description": "Filter the intersecting referring pages. Prefix each backlink field with the 1-based target index, e.g. 1.dofollow, 2.rank. Provide a single condition {\"field\",\"op\",\"value\"} or an {\"and\":[…]} / {\"or\":[…]} group of conditions (nest groups for mixed logic), up to 8 conditions. Operators: =, <>, <, <=, >, >=, in, not_in, like, not_like, ilike, not_ilike, match, not_match (use an array value with in / not_in). Filterable fields: dofollow (boolean, link is dofollow); is_new (boolean, appeared since the last check); is_lost (boolean, lost since the last check); is_broken (boolean, points to a broken page); rank (referring page rank, 0-1000); page_from_rank (referring page rank, 0-1000); domain_from_rank (referring domain rank, 0-1000); backlink_spam_score (spam score of the referring page, 0-100); item_type (anchor, image, link, redirect, or canonical); anchor (anchor text); tld_from (top-level domain of the referring page); semantic_location (link location, e.g. article, footer); first_seen (ISO date the backlink was first seen); last_seen (ISO date the backlink was last seen). Example: {\"field\":\"1.dofollow\",\"op\":\"=\",\"value\":true}"
    },
    "order_by": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/DataForSeoOrderByRule"
      },
      "minItems": 1,
      "maxItems": 3,
      "description": "Sort the intersecting referring pages. Prefix each field with the 1-based target index, e.g. 1.rank. Each rule is {\"field\",\"dir\"} with dir asc or desc; up to 3 rules, applied in order. Sortable fields: dofollow, is_new, is_lost, is_broken, rank, page_from_rank, domain_from_rank, backlink_spam_score, item_type, anchor, tld_from, semantic_location, first_seen, last_seen."
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 1000,
      "description": "Maximum number of records to return. Defaults to 100."
    },
    "offset": {
      "type": "integer",
      "minimum": 0,
      "description": "Number of records to skip from the start of the results."
    },
    "view": {
      "allOf": [
        {
          "$ref": "#/$defs/SeoBacklinksView"
        },
        {
          "description": "Controls backlink detail. summary keeps link identity and headline rank/anchor data; full adds referring-page details and link attributes. Defaults to summary."
        }
      ]
    }
  },
  "required": [
    "targets"
  ],
  "$defs": {
    "DataForSeoFilter": {
      "anyOf": [
        {
          "$ref": "#/$defs/DataForSeoFilterCondition"
        },
        {
          "type": "object",
          "properties": {
            "and": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/DataForSeoFilter"
              },
              "minItems": 2,
              "description": "Sub-expressions that must all match."
            }
          },
          "required": [
            "and"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "or": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/DataForSeoFilter"
              },
              "minItems": 2,
              "description": "Sub-expressions where at least one must match."
            }
          },
          "required": [
            "or"
          ],
          "additionalProperties": false
        }
      ]
    },
    "DataForSeoFilterCondition": {
      "type": "object",
      "properties": {
        "field": {
          "type": "string",
          "minLength": 1,
          "description": "Field to filter on. See the endpoint's list of filterable fields."
        },
        "op": {
          "type": "string",
          "enum": [
            "=",
            "<>",
            "<",
            "<=",
            ">",
            ">=",
            "in",
            "not_in",
            "like",
            "not_like",
            "ilike",
            "not_ilike",
            "match",
            "not_match"
          ],
          "description": "Comparison operator."
        },
        "value": {
          "$ref": "#/$defs/DataForSeoFilterValue"
        }
      },
      "required": [
        "field",
        "op",
        "value"
      ],
      "additionalProperties": false
    },
    "DataForSeoFilterValue": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "number"
        },
        {
          "type": "boolean"
        },
        {
          "type": "array",
          "items": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              }
            ]
          },
          "minItems": 1
        }
      ],
      "description": "Comparison value: a string, number, or boolean for scalar operators, or a non-empty array for \"in\" / \"not_in\"."
    },
    "DataForSeoOrderByRule": {
      "type": "object",
      "properties": {
        "field": {
          "type": "string",
          "minLength": 1,
          "description": "Field to sort by. See the endpoint's list of sortable fields."
        },
        "dir": {
          "type": "string",
          "enum": [
            "asc",
            "desc"
          ],
          "default": "desc",
          "description": "Sort direction: asc or desc. Defaults to desc."
        }
      },
      "required": [
        "field"
      ],
      "additionalProperties": false
    },
    "SeoBacklinksRankScale": {
      "type": "string",
      "enum": [
        "one_hundred",
        "one_thousand"
      ],
      "description": "Scale for rank values: one_thousand (0-1000, default) or one_hundred (0-100)."
    },
    "SeoBacklinksStatusType": {
      "type": "string",
      "enum": [
        "live",
        "all",
        "lost"
      ],
      "description": "Which backlinks to count: live (found on the last check, default), all, or lost."
    },
    "SeoBacklinksView": {
      "type": "string",
      "enum": [
        "summary",
        "full"
      ]
    }
  }
}