Skip to main content

Features

Retrieving posts data

This endpoint allows you to retrieve various types of data about specified posts.

POST https://api.linkedapi.io/data/posts.get

Body


{
  "posts": [
    "https://www.linkedin.com/posts/post1",
    "https://www.linkedin.com/posts/post2"
  ]
}
  • posts – LinkedIn URLs of posts which data you want to retrieve.

Response

  1. If all retrievals are successful:

{
  "status": "complete",
  "completion": [
    {
      "post": "https://www.linkedin.com/posts/post1",
      "result": {
        "success": true,
        "data": {
          "time": "2023-01-02T12:30:00Z",
          "type": "original",
          "repostText": null,
          "text": "Check out our latest product launch!",
          "images": [
            "https://static.linkedin.com/image1.jpg",
            "https://static.linkedin.com/image2.jpg"
          ],
          "hasVideo": false,
          "hasPoll": false,
          "reactionCount": 27,
          "commentCount": 8
        }
      }
    },
    {
      "post": "https://www.linkedin.com/posts/post2",
      "result": {
        "success": true,
        "data": {
          "time": "2023-01-01T09:15:00Z",
          "type": "repost",
          "repostText": "Thank you to everyone who joined our webinar!",
          "text": "Original post content about the webinar",
          "images": null,
          "hasVideo": true,
          "hasPoll": false,
          "reactionCount": 6,
          "commentCount": 0
        }
      }
    }
  ]
}
  • time – timestamp when the post was published.
  • type – type of the post. Enum with possible values:
    • original – for original posts.
    • repost – for reposts.
  • repostText – additional text added during repost, if applicable.
  • text – text content of the post, if available.
  • images – array of top 3 preview image URLs, if available.
  • hasVideo – boolean indicating if the post contains a video.
  • hasPoll – boolean indicating if the post contains a poll.
  • reactionCount – number of reactions on the post.
  • commentCount – number of comments on the post.
  1. If some retrievals are unsuccessful:

{
  "status": "complete",
  "completion": [
    {
      "post": "https://www.linkedin.com/posts/post1",
      "result": {
        "success": false,
        "error": {
          "errorType": "postNotFound",
          "message": "The provided URL is not an existing LinkedIn post."
        }
      }
    },
    {
      "post": "https://www.linkedin.com/posts/post2",
      "result": {
        "success": true,
        "data": {
          "time": "2023-01-01T09:15:00Z",
          "type": "repost",
          "repostText": "Thank you to everyone who joined our webinar!",
          "text": "Original post content about the webinar",
          "images": null,
          "hasVideo": true,
          "hasPoll": false,
          "reactionCount": 6,
          "commentCount": 0
        }
      }
    }
  ]
}
  • errorType – enum with the following possible values:
    • postNotFound – provided URL is not an existing LinkedIn post.
    • retrievingNotAllowed – LinkedIn has blocked retrieving data of this post due to privacy settings, or other restrictions.

Throughout the documentation, for simplicity, only the request body and final response (when status is complete) are shown. Consider possible global errors and the result handling approach for proper implementation.