{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/scrapefield-com/json-schema/scrapefield-com-linkedin-activity-schema.json",
  "title": "linkedin_activity",
  "description": "Something a person did on someone else's post: a comment or a reaction, with the post.",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/scrapefield-com-openapi.json#/components/schemas/linkedin_activity",
  "type": "object",
  "required": [
    "type",
    "comment",
    "comment_url",
    "reaction",
    "at",
    "post_url",
    "post"
  ],
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "comment",
        "reaction"
      ],
      "description": "What the person did."
    },
    "comment": {
      "type": [
        "string",
        "null"
      ],
      "description": "For a comment: its text."
    },
    "comment_url": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "description": "For a comment: its own link, which opens the post at this comment. `null` for a reaction, and where the source does not give it."
    },
    "reaction": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "like",
        "celebrate",
        "support",
        "love",
        "insightful",
        "funny",
        null
      ],
      "description": "For a reaction: which."
    },
    "at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "When they commented or reacted. `null` where the source does not say, as for some reactions."
    },
    "post_url": {
      "type": "string",
      "format": "uri",
      "description": "The post or article they commented on or reacted to."
    },
    "post": {
      "type": [
        "object",
        "null"
      ],
      "required": [
        "urn",
        "url",
        "author",
        "text",
        "published_at",
        "reaction_count",
        "reactions",
        "comment_count",
        "repost_count",
        "images",
        "video",
        "document",
        "article",
        "is_repost"
      ],
      "properties": {
        "urn": {
          "type": "string",
          "description": "LinkedIn's id for the post, e.g. `urn:li:activity:7243…`."
        },
        "url": {
          "type": "string",
          "format": "uri",
          "description": "The post."
        },
        "author": {
          "type": "object",
          "required": [
            "name",
            "type",
            "headline",
            "url"
          ],
          "properties": {
            "name": {
              "type": [
                "string",
                "null"
              ],
              "description": "`null` where the source names only the page."
            },
            "type": {
              "type": "string",
              "enum": [
                "person",
                "company"
              ],
              "description": "Whether a person or a company page posted it."
            },
            "headline": {
              "type": [
                "string",
                "null"
              ],
              "description": "The person's headline, or the company's follower line."
            },
            "url": {
              "type": "string",
              "format": "uri",
              "description": "Their profile or company page."
            }
          },
          "additionalProperties": false,
          "description": "Who posted it: a person or a company page."
        },
        "text": {
          "type": [
            "string",
            "null"
          ],
          "description": "The post's text."
        },
        "published_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "`null` where the source does not say."
        },
        "reaction_count": {
          "type": [
            "integer",
            "null"
          ],
          "description": "All reactions together. `null` where the source does not give the counts."
        },
        "reactions": {
          "type": [
            "object",
            "null"
          ],
          "required": [
            "like",
            "celebrate",
            "support",
            "love",
            "insightful",
            "funny"
          ],
          "properties": {
            "like": {
              "type": "integer",
              "description": "Like reactions."
            },
            "celebrate": {
              "type": "integer",
              "description": "Celebrate reactions."
            },
            "support": {
              "type": "integer",
              "description": "Support reactions."
            },
            "love": {
              "type": "integer",
              "description": "Love reactions."
            },
            "insightful": {
              "type": "integer",
              "description": "Insightful reactions."
            },
            "funny": {
              "type": "integer",
              "description": "Funny reactions."
            }
          },
          "additionalProperties": false,
          "description": "By kind, where LinkedIn shows the breakdown."
        },
        "comment_count": {
          "type": [
            "integer",
            "null"
          ],
          "description": "How many comments. `null` where the source does not give it."
        },
        "repost_count": {
          "type": [
            "integer",
            "null"
          ],
          "description": "How many reposts. `null` where the source does not give it."
        },
        "images": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "uri",
            "description": "One image."
          },
          "description": "Image URLs, in order."
        },
        "video": {
          "type": [
            "object",
            "null"
          ],
          "required": [
            "url",
            "duration"
          ],
          "properties": {
            "url": {
              "type": "string",
              "format": "uri",
              "description": "The video file."
            },
            "duration": {
              "type": [
                "integer",
                "null"
              ],
              "description": "Seconds."
            }
          },
          "additionalProperties": false,
          "description": "A video in the post."
        },
        "document": {
          "type": [
            "object",
            "null"
          ],
          "required": [
            "title",
            "page_count"
          ],
          "properties": {
            "title": {
              "type": "string",
              "description": "The document's title."
            },
            "page_count": {
              "type": [
                "integer",
                "null"
              ],
              "description": "How many pages it has."
            }
          },
          "additionalProperties": false,
          "description": "An attached PDF or slide deck."
        },
        "article": {
          "type": [
            "object",
            "null"
          ],
          "required": [
            "title",
            "url"
          ],
          "properties": {
            "title": {
              "type": [
                "string",
                "null"
              ],
              "description": "The title the link's preview shows."
            },
            "url": {
              "type": "string",
              "format": "uri",
              "description": "Where the link leads."
            }
          },
          "additionalProperties": false,
          "description": "A shared link."
        },
        "is_repost": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Whether this is someone else's post reposted without comment. `null` where the source does not say."
        }
      },
      "additionalProperties": false,
      "description": "The post, with its author and counts. `null` for an article, whose author the source does not give: `post_url` says where it was."
    }
  },
  "additionalProperties": false
}