{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/desearch-ai/json-schema/desearch-ai-facebook-post-schema.json",
  "title": "FacebookPost",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/desearch-ai-facebook-search-api-openapi.yml#/components/schemas/FacebookPost",
  "properties": {
    "id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Id"
    },
    "url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Url"
    },
    "text": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Text"
    },
    "createTime": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Createtime"
    },
    "author": {
      "anyOf": [
        {
          "$ref": "#/$defs/FacebookProfile"
        },
        {
          "type": "null"
        }
      ]
    },
    "stats": {
      "anyOf": [
        {
          "$ref": "#/$defs/FacebookPostStats"
        },
        {
          "type": "null"
        }
      ]
    },
    "media": {
      "items": {
        "$ref": "#/$defs/FacebookMedia"
      },
      "type": "array",
      "title": "Media"
    },
    "hashtags": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Hashtags"
    },
    "linkUrl": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Linkurl",
      "description": "Ad landing URL from snapshot.link_url. url stays the Ad Library or post URL."
    },
    "cta": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Cta",
      "description": "Ad call to action: the button text (snapshot.cta_text), or the CTA type such as SHOP_NOW when no text is sent."
    },
    "headline": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Headline",
      "description": "Ad headline, from snapshot.title."
    },
    "linkDescription": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Linkdescription",
      "description": "Ad link description, from snapshot.link_description."
    },
    "endDate": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Enddate",
      "description": "Ad end date: the provider's date string, or ISO 8601 UTC when the provider sends a unix time. Omitted when the provider does not send one."
    },
    "active": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Active",
      "description": "Whether the ad is active (is_active). Omitted when the provider does not say."
    },
    "platforms": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Platforms",
      "description": "Publisher platforms, such as FACEBOOK or INSTAGRAM. Empty when the payload has none."
    }
  },
  "type": "object",
  "$defs": {
    "FacebookMedia": {
      "properties": {
        "type": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Type"
        },
        "url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Url"
        },
        "thumbnail": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Thumbnail"
        },
        "width": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Width"
        },
        "height": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Height"
        }
      },
      "type": "object",
      "title": "FacebookMedia"
    },
    "FacebookPostStats": {
      "properties": {
        "reactionCount": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Reactioncount"
        },
        "commentCount": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Commentcount"
        },
        "shareCount": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Sharecount"
        },
        "viewCount": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Viewcount"
        }
      },
      "type": "object",
      "title": "FacebookPostStats"
    },
    "FacebookProfile": {
      "properties": {
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Id"
        },
        "username": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Username"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Name"
        },
        "url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Url"
        },
        "avatar": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Avatar"
        },
        "verified": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Verified"
        },
        "bio": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Bio"
        },
        "category": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Category"
        },
        "followers": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Followers"
        },
        "likes": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Likes"
        }
      },
      "type": "object",
      "title": "FacebookProfile"
    }
  }
}