{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/scrapeatlas/json-schema/scrapeatlas-facebook-unified-post-response-schema-schema.json",
  "title": "facebookUnifiedPostResponseSchema",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/scrapeatlas-facebook-api-openapi.yml#/components/schemas/facebookUnifiedPostResponseSchema",
  "anyOf": [
    {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "post_id": {
              "type": "string"
            },
            "like_count": {
              "type": [
                "number",
                "null"
              ]
            },
            "comment_count": {
              "type": [
                "number",
                "null"
              ]
            },
            "share_count": {
              "type": [
                "number",
                "null"
              ]
            },
            "view_count": {
              "type": [
                "number",
                "null"
              ]
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "creation_time": {
              "type": [
                "string",
                "null"
              ]
            },
            "feedback_id": {
              "type": [
                "string",
                "null"
              ]
            },
            "url": {
              "type": [
                "string",
                "null"
              ]
            },
            "image_url": {
              "type": [
                "string",
                "null"
              ]
            },
            "video": {
              "anyOf": [
                {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                },
                {
                  "type": "null"
                }
              ]
            },
            "mediaAttachments": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          }
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "index": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "image",
                      "video",
                      "gif",
                      "unknown"
                    ]
                  },
                  "url": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "thumbnailUrl": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "width": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "height": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "bestVideo": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "url": {
                            "type": "string"
                          },
                          "width": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "height": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "bitrate": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "hasAudio": {
                            "type": [
                              "boolean",
                              "null"
                            ]
                          },
                          "source": {
                            "type": "string",
                            "enum": [
                              "progressive",
                              "dash"
                            ]
                          },
                          "mimeType": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "url",
                          "width",
                          "height",
                          "bitrate",
                          "hasAudio",
                          "source",
                          "mimeType"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "audioUrl": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "variants": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "url": {
                          "type": "string"
                        },
                        "width": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "height": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "bitrate": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "hasAudio": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "source": {
                          "type": "string",
                          "enum": [
                            "progressive",
                            "dash"
                          ]
                        },
                        "mimeType": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "url",
                        "width",
                        "height",
                        "bitrate",
                        "hasAudio",
                        "source",
                        "mimeType"
                      ],
                      "additionalProperties": false
                    },
                    "maxItems": 100
                  }
                },
                "required": [
                  "id",
                  "index",
                  "type",
                  "url",
                  "thumbnailUrl",
                  "width",
                  "height",
                  "bestVideo",
                  "audioUrl",
                  "variants"
                ],
                "additionalProperties": false
              },
              "maxItems": 100
            },
            "author": {
              "anyOf": [
                {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                },
                {
                  "type": "null"
                }
              ]
            },
            "music": {
              "anyOf": [
                {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                },
                {
                  "type": "null"
                }
              ]
            },
            "data": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            },
            "hydration": {
              "type": "object",
              "properties": {
                "total": {
                  "type": "integer"
                },
                "enriched": {
                  "type": "integer"
                },
                "failed": {
                  "type": "integer"
                }
              },
              "required": [
                "total",
                "enriched",
                "failed"
              ],
              "additionalProperties": false
            },
            "success": {
              "type": "boolean",
              "const": true
            },
            "status": {
              "type": "string",
              "enum": [
                "success",
                "partial"
              ]
            },
            "requestId": {
              "type": "string",
              "format": "uuid"
            },
            "sourceUrl": {
              "type": "string",
              "format": "uri"
            },
            "fetchedAt": {
              "type": "string",
              "format": "date-time"
            },
            "coverage": {
              "type": "object",
              "properties": {
                "source": {
                  "type": "string",
                  "const": "public_web"
                },
                "complete": {
                  "type": "boolean"
                },
                "warnings": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "order": {
                  "type": "string",
                  "enum": [
                    "newest_first",
                    "oldest_first",
                    "ranked",
                    "relevance",
                    "source_order"
                  ]
                },
                "window": {
                  "type": "object",
                  "properties": {
                    "since": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "until": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [],
                  "additionalProperties": false
                }
              },
              "required": [
                "source",
                "complete",
                "warnings"
              ],
              "additionalProperties": false
            },
            "accounting": {
              "type": "object",
              "properties": {
                "upstreamRequests": {
                  "type": "integer",
                  "minimum": 0
                },
                "responseBytes": {
                  "type": "integer",
                  "minimum": 0
                },
                "durationMs": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "required": [
                "upstreamRequests",
                "responseBytes",
                "durationMs"
              ],
              "additionalProperties": false
            },
            "comments": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  },
                  "maxItems": 100
                },
                {
                  "type": "null"
                }
              ]
            },
            "transcript": {
              "type": [
                "string",
                "null"
              ]
            },
            "comments_cursor": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "post_id",
            "like_count",
            "comment_count",
            "share_count",
            "view_count",
            "description",
            "creation_time",
            "feedback_id",
            "url",
            "image_url",
            "video",
            "mediaAttachments",
            "author",
            "music",
            "success",
            "status",
            "requestId",
            "sourceUrl",
            "fetchedAt",
            "coverage",
            "accounting"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "success": {
              "type": "boolean",
              "const": false
            },
            "status": {
              "type": "string",
              "enum": [
                "failed",
                "challenged"
              ]
            },
            "requestId": {
              "type": "string",
              "format": "uuid"
            },
            "failure": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string",
                  "enum": [
                    "invalid_request",
                    "unauthorized",
                    "not_found",
                    "restricted_page",
                    "upstream_challenged",
                    "upstream_rate_limited",
                    "upstream_error",
                    "unsupported_page",
                    "response_too_large",
                    "unsafe_redirect",
                    "request_limit",
                    "timeout",
                    "payload_too_complex",
                    "busy"
                  ]
                },
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "code",
                "message"
              ],
              "additionalProperties": false
            },
            "accounting": {
              "type": "object",
              "properties": {
                "upstreamRequests": {
                  "type": "integer",
                  "minimum": 0
                },
                "responseBytes": {
                  "type": "integer",
                  "minimum": 0
                },
                "durationMs": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "required": [
                "upstreamRequests",
                "responseBytes",
                "durationMs"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "success",
            "status",
            "requestId",
            "failure",
            "accounting"
          ],
          "additionalProperties": false
        }
      ]
    },
    {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "data": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            },
            "hydration": {
              "type": "object",
              "properties": {
                "total": {
                  "type": "integer"
                },
                "enriched": {
                  "type": "integer"
                },
                "failed": {
                  "type": "integer"
                }
              },
              "required": [
                "total",
                "enriched",
                "failed"
              ],
              "additionalProperties": false
            },
            "success": {
              "type": "boolean",
              "const": true
            },
            "status": {
              "type": "string",
              "enum": [
                "success",
                "partial"
              ]
            },
            "requestId": {
              "type": "string",
              "format": "uuid"
            },
            "sourceUrl": {
              "type": "string",
              "format": "uri"
            },
            "fetchedAt": {
              "type": "string",
              "format": "date-time"
            },
            "coverage": {
              "type": "object",
              "properties": {
                "source": {
                  "type": "string",
                  "const": "public_web"
                },
                "complete": {
                  "type": "boolean"
                },
                "warnings": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "order": {
                  "type": "string",
                  "enum": [
                    "newest_first",
                    "oldest_first",
                    "ranked",
                    "relevance",
                    "source_order"
                  ]
                },
                "window": {
                  "type": "object",
                  "properties": {
                    "since": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "until": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [],
                  "additionalProperties": false
                }
              },
              "required": [
                "source",
                "complete",
                "warnings"
              ],
              "additionalProperties": false
            },
            "accounting": {
              "type": "object",
              "properties": {
                "upstreamRequests": {
                  "type": "integer",
                  "minimum": 0
                },
                "responseBytes": {
                  "type": "integer",
                  "minimum": 0
                },
                "durationMs": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "required": [
                "upstreamRequests",
                "responseBytes",
                "durationMs"
              ],
              "additionalProperties": false
            },
            "post_id": {
              "type": [
                "string",
                "null"
              ]
            },
            "transcript": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "success",
            "status",
            "requestId",
            "sourceUrl",
            "fetchedAt",
            "coverage",
            "accounting",
            "post_id",
            "transcript"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "success": {
              "type": "boolean",
              "const": false
            },
            "status": {
              "type": "string",
              "enum": [
                "failed",
                "challenged"
              ]
            },
            "requestId": {
              "type": "string",
              "format": "uuid"
            },
            "failure": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string",
                  "enum": [
                    "invalid_request",
                    "unauthorized",
                    "not_found",
                    "restricted_page",
                    "upstream_challenged",
                    "upstream_rate_limited",
                    "upstream_error",
                    "unsupported_page",
                    "response_too_large",
                    "unsafe_redirect",
                    "request_limit",
                    "timeout",
                    "payload_too_complex",
                    "busy"
                  ]
                },
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "code",
                "message"
              ],
              "additionalProperties": false
            },
            "accounting": {
              "type": "object",
              "properties": {
                "upstreamRequests": {
                  "type": "integer",
                  "minimum": 0
                },
                "responseBytes": {
                  "type": "integer",
                  "minimum": 0
                },
                "durationMs": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "required": [
                "upstreamRequests",
                "responseBytes",
                "durationMs"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "success",
            "status",
            "requestId",
            "failure",
            "accounting"
          ],
          "additionalProperties": false
        }
      ]
    },
    {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "data": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            },
            "hydration": {
              "type": "object",
              "properties": {
                "total": {
                  "type": "integer"
                },
                "enriched": {
                  "type": "integer"
                },
                "failed": {
                  "type": "integer"
                }
              },
              "required": [
                "total",
                "enriched",
                "failed"
              ],
              "additionalProperties": false
            },
            "success": {
              "type": "boolean",
              "const": true
            },
            "status": {
              "type": "string",
              "enum": [
                "success",
                "partial"
              ]
            },
            "requestId": {
              "type": "string",
              "format": "uuid"
            },
            "sourceUrl": {
              "type": "string",
              "format": "uri"
            },
            "fetchedAt": {
              "type": "string",
              "format": "date-time"
            },
            "coverage": {
              "type": "object",
              "properties": {
                "source": {
                  "type": "string",
                  "const": "public_web"
                },
                "complete": {
                  "type": "boolean"
                },
                "warnings": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "order": {
                  "type": "string",
                  "enum": [
                    "newest_first",
                    "oldest_first",
                    "ranked",
                    "relevance",
                    "source_order"
                  ]
                },
                "window": {
                  "type": "object",
                  "properties": {
                    "since": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "until": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [],
                  "additionalProperties": false
                }
              },
              "required": [
                "source",
                "complete",
                "warnings"
              ],
              "additionalProperties": false
            },
            "accounting": {
              "type": "object",
              "properties": {
                "upstreamRequests": {
                  "type": "integer",
                  "minimum": 0
                },
                "responseBytes": {
                  "type": "integer",
                  "minimum": 0
                },
                "durationMs": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "required": [
                "upstreamRequests",
                "responseBytes",
                "durationMs"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "data",
            "success",
            "status",
            "requestId",
            "sourceUrl",
            "fetchedAt",
            "coverage",
            "accounting"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "success": {
              "type": "boolean",
              "const": false
            },
            "status": {
              "type": "string",
              "enum": [
                "failed",
                "challenged"
              ]
            },
            "requestId": {
              "type": "string",
              "format": "uuid"
            },
            "failure": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string",
                  "enum": [
                    "invalid_request",
                    "unauthorized",
                    "not_found",
                    "restricted_page",
                    "upstream_challenged",
                    "upstream_rate_limited",
                    "upstream_error",
                    "unsupported_page",
                    "response_too_large",
                    "unsafe_redirect",
                    "request_limit",
                    "timeout",
                    "payload_too_complex",
                    "busy"
                  ]
                },
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "code",
                "message"
              ],
              "additionalProperties": false
            },
            "accounting": {
              "type": "object",
              "properties": {
                "upstreamRequests": {
                  "type": "integer",
                  "minimum": 0
                },
                "responseBytes": {
                  "type": "integer",
                  "minimum": 0
                },
                "durationMs": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "required": [
                "upstreamRequests",
                "responseBytes",
                "durationMs"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "success",
            "status",
            "requestId",
            "failure",
            "accounting"
          ],
          "additionalProperties": false
        }
      ]
    }
  ]
}