PostPost

LinkedIn Feed

NOT YET AVAILABLE -- These endpoints are completely disabled and return HTTP 404 (Not Found). The underlying route handlers are commented out in the source code, so the routes do not exist. They require the r_member_social permission, which is RESTRICTED and requires LinkedIn approval. All request/response formats documented below are planned and speculative -- they are not based on a working implementation and may change when the feature is built. Do not attempt to call these endpoints; they will return a 404 error.

Retrieve your LinkedIn posts, comments, and reactions via the PostPost API.

Endpoints

EndpointMethodDescription
/api/v1/linkedin-postsPOSTGet posts authored by your account
/api/v1/linkedin-post-commentsPOSTGet comments on a specific post
/api/v1/linkedin-post-reactionsPOSTGet reactions on a specific post

Get LinkedIn Posts

Retrieve posts authored by a connected LinkedIn account.

Request

POST /api/v1/linkedin-posts
x-api-key: sk_YOUR_API_KEY
Content-Type: application/json

{
  "platformId": "linkedin-ABC123",
  "start": 0,
  "count": 10,
  "sortBy": "LAST_MODIFIED"
}

Parameters

ParameterTypeRequiredDefaultDescription
platformIdstringYes-LinkedIn connection ID (e.g., linkedin-ABC123)
startnumberNo0Starting index for pagination
countnumberNo10Number of posts (max: 100)
sortBystringNoLAST_MODIFIEDSort order: LAST_MODIFIED or CREATED

Response

{
  "success": true,
  "posts": [
    {
      "id": "urn:li:share:7123456789",
      "commentary": "Excited to share our latest product update!",
      "publishedAt": 1709294400000,
      "visibility": "PUBLIC",
      "lifecycleState": "PUBLISHED",
      "author": "urn:li:person:ABC123",
      "distribution": {
        "feedDistribution": "MAIN_FEED"
      },
      "content": {
        "media": []
      }
    }
  ],
  "pagination": {
    "start": 0,
    "count": 10,
    "total": 45
  },
  "cached": false
}

cURL Example

curl -X POST "https://api.postpost.dev/api/v1/linkedin-posts" \
  -H "x-api-key: sk_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "platformId": "linkedin-ABC123",
    "count": 20,
    "sortBy": "LAST_MODIFIED"
  }'

Python Example

import requests

response = requests.post(
    "https://api.postpost.dev/api/v1/linkedin-posts",
    headers={"x-api-key": "sk_YOUR_API_KEY"},
    json={
        "platformId": "linkedin-ABC123",
        "count": 20,
        "sortBy": "LAST_MODIFIED"
    }
)

data = response.json()
for post in data["posts"]:
    print(f"Post: {post['commentary'][:50]}...")
    print(f"Published: {post['publishedAt']}")
    print("---")

Get Post Comments

Retrieve comments on a specific LinkedIn post.

Request

POST /api/v1/linkedin-post-comments
x-api-key: sk_YOUR_API_KEY
Content-Type: application/json

{
  "postedId": "urn:li:share:7123456789",
  "platformId": "linkedin-ABC123",
  "start": 0,
  "count": 20
}

Parameters

ParameterTypeRequiredDefaultDescription
postedIdstringYes-LinkedIn post URN
platformIdstringYes-LinkedIn connection ID
startnumberNo0Starting index for pagination
countnumberNo20Number of comments (max: 100)

Response

{
  "success": true,
  "comments": [
    {
      "id": "6636062862760562688",
      "commentUrn": "urn:li:comment:(urn:li:activity:123,6636062862760562688)",
      "actor": "urn:li:person:XYZ789",
      "message": "Great insights! Thanks for sharing.",
      "created": {
        "time": 1582160678569
      },
      "lastModified": {
        "time": 1582160678569
      },
      "likesSummary": {
        "totalLikes": 5
      },
      "commentsCount": 2
    }
  ],
  "pagination": {
    "start": 0,
    "count": 20,
    "total": 89
  },
  "cached": false
}

cURL Example

curl -X POST "https://api.postpost.dev/api/v1/linkedin-post-comments" \
  -H "x-api-key: sk_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "postedId": "urn:li:share:7123456789",
    "platformId": "linkedin-ABC123",
    "count": 50
  }'

Python Example

import requests

response = requests.post(
    "https://api.postpost.dev/api/v1/linkedin-post-comments",
    headers={"x-api-key": "sk_YOUR_API_KEY"},
    json={
        "postedId": "urn:li:share:7123456789",
        "platformId": "linkedin-ABC123",
        "count": 50
    }
)

data = response.json()
for comment in data["comments"]:
    print(f"Comment by {comment['actor']}: {comment['message']}")
    print(f"Likes: {comment['likesSummary']['totalLikes']}")
    print("---")

Get Post Reactions

Retrieve reactions on a specific LinkedIn post.

Request

POST /api/v1/linkedin-post-reactions
x-api-key: sk_YOUR_API_KEY
Content-Type: application/json

{
  "postedId": "urn:li:share:7123456789",
  "platformId": "linkedin-ABC123",
  "start": 0,
  "count": 50
}

Parameters

ParameterTypeRequiredDefaultDescription
postedIdstringYes-LinkedIn post URN
platformIdstringYes-LinkedIn connection ID
startnumberNo0Starting index for pagination
countnumberNo50Number of reactions (max: 100)

Response

{
  "success": true,
  "reactions": [
    {
      "id": "urn:li:reaction:(urn:li:person:XYZ789,urn:li:activity:123)",
      "reactionType": "LIKE",
      "actor": "urn:li:person:XYZ789",
      "created": {
        "time": 1686183251857
      }
    },
    {
      "id": "urn:li:reaction:(urn:li:person:ABC456,urn:li:activity:123)",
      "reactionType": "PRAISE",
      "actor": "urn:li:person:ABC456",
      "created": {
        "time": 1686183300000
      }
    }
  ],
  "pagination": {
    "start": 0,
    "count": 50,
    "total": 456
  },
  "cached": false
}

Reaction Types

TypeDescriptionEmoji
LIKEThumbs up👍
PRAISECelebrate🔥
EMPATHYLove / Heart❤️
INTERESTInsightful💡
APPRECIATIONSupport👏
ENTERTAINMENTFunny😄

cURL Example

curl -X POST "https://api.postpost.dev/api/v1/linkedin-post-reactions" \
  -H "x-api-key: sk_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "postedId": "urn:li:share:7123456789",
    "platformId": "linkedin-ABC123",
    "count": 100
  }'

Python Example

import requests
from collections import Counter

response = requests.post(
    "https://api.postpost.dev/api/v1/linkedin-post-reactions",
    headers={"x-api-key": "sk_YOUR_API_KEY"},
    json={
        "postedId": "urn:li:share:7123456789",
        "platformId": "linkedin-ABC123",
        "count": 100
    }
)

data = response.json()

# Count reactions by type
reaction_counts = Counter(r["reactionType"] for r in data["reactions"])
print("Reaction breakdown:")
for reaction_type, count in reaction_counts.most_common():
    print(f"  {reaction_type}: {count}")

Caching

All feed retrieval endpoints are cached to reduce API calls:

EndpointCache TTL
Posts15 minutes
Comments10 minutes
Reactions10 minutes

The cached field in responses indicates if data was served from cache.


Error Responses

Not Found (404)

All feed retrieval endpoints currently return HTTP 404 Not Found because the route handlers are commented out in the source code and the routes do not exist. Express returns its default HTML 404 response (e.g., Cannot POST /api/v1/linkedin-posts), not a JSON body.

Connection Not Found (404)

{
  "error": "LinkedIn connection not found"
}

Verify the platformId matches a connected LinkedIn account.

Invalid URN (400)

{
  "error": "postedId must be a valid LinkedIn URN"
}

Ensure the post URN format is correct (e.g., urn:li:share:123456 or urn:li:ugcPost:123456).


Complete Workflow Example

import requests

API_KEY = "sk_YOUR_API_KEY"
BASE_URL = "https://api.postpost.dev/api/v1"
HEADERS = {"x-api-key": API_KEY}

def get_linkedin_platform_id():
    """Get the LinkedIn platform connection ID."""
    response = requests.get(
        f"{BASE_URL}/platform-connections",
        headers=HEADERS
    )
    connections = response.json()["connections"]

    for conn in connections:
        if conn["platformId"].startswith("linkedin-"):
            return conn["platformId"]

    raise ValueError("No LinkedIn connection found")

def analyze_post_engagement(platform_id, post_id):
    """Analyze engagement on a specific post."""
    # Get comments
    comments_response = requests.post(
        f"{BASE_URL}/linkedin-post-comments",
        headers=HEADERS,
        json={"postedId": post_id, "platformId": platform_id, "count": 100}
    )
    comments = comments_response.json()

    # Get reactions
    reactions_response = requests.post(
        f"{BASE_URL}/linkedin-post-reactions",
        headers=HEADERS,
        json={"postedId": post_id, "platformId": platform_id, "count": 100}
    )
    reactions = reactions_response.json()

    return {
        "total_comments": comments["pagination"]["total"],
        "total_reactions": reactions["pagination"]["total"],
        "reaction_breakdown": Counter(r["reactionType"] for r in reactions["reactions"])
    }

# Main workflow
platform_id = get_linkedin_platform_id()

# Get recent posts
posts_response = requests.post(
    f"{BASE_URL}/linkedin-posts",
    headers=HEADERS,
    json={"platformId": platform_id, "count": 5}
)

for post in posts_response.json()["posts"]:
    print(f"\nPost: {post['commentary'][:50]}...")
    engagement = analyze_post_engagement(platform_id, post["id"])
    print(f"  Comments: {engagement['total_comments']}")
    print(f"  Reactions: {engagement['total_reactions']}")
    print(f"  Breakdown: {dict(engagement['reaction_breakdown'])}")

MCP Integration

NOT AVAILABLE: The MCP tools listed below (linkedin_posts, linkedin_post_comments, linkedin_post_reactions) are commented out in the source code and are not registered. They will not appear in MCP tool listings and cannot be invoked. They are listed here for reference only and will become available if/when the feed retrieval feature is implemented.

  • linkedin_posts - Retrieve your posts
  • linkedin_post_comments - Retrieve comments on a post
  • linkedin_post_reactions - Retrieve reactions on a post

On this page