Skip to main content
GET
/
api
/
v1
/
posts
Get LinkedIn posts from a profile
curl --request GET \
  --url https://api.fetchin.io/api/v1/posts \
  --header 'X-API-Key: <api-key>'
[
  {
    "id": "urn:li:activity:7123456789012345678",
    "shareUrn": "urn:li:ugcPost:7123456789012345678",
    "content": "Excited to announce our new initiative...",
    "date": "2024-01-15T10:30:00Z",
    "reactionCount": 127,
    "commentCount": 15,
    "sharesCount": 12,
    "imageUrl": "https://media.licdn.com/dms/image/...",
    "videoUrl": null,
    "carouselPdfUrl": null,
    "profile": {
      "urn": "urn:li:fsd_profile:ACoAAABCDEF",
      "name": "William Gates",
      "headline": "Co-chair, Bill & Melinda Gates Foundation",
      "url": "https://www.linkedin.com/in/williamhgates",
      "imageUrl": "https://media.licdn.com/dms/image/..."
    }
  },
  {
    "id": "urn:li:activity:7123456789012345679",
    "shareUrn": "urn:li:ugcPost:7123456789012345679",
    "content": "Reflecting on the past year and looking forward...",
    "date": "2024-01-10T14:20:00Z",
    "reactionCount": 89,
    "commentCount": 7,
    "sharesCount": 4,
    "imageUrl": null,
    "videoUrl": "https://dms.licdn.com/playlist/...",
    "carouselPdfUrl": null,
    "profile": {
      "urn": "urn:li:fsd_profile:ACoAAABCDEF",
      "name": "William Gates",
      "headline": "Co-chair, Bill & Melinda Gates Foundation",
      "url": "https://www.linkedin.com/in/williamhgates",
      "imageUrl": "https://media.licdn.com/dms/image/..."
    }
  }
]

Endpoint

GET /api/v1/posts

Authentication

Include your API key in the request header:
X-API-Key: your-api-key-here

Parameters

profileUrlOrUrn
string
required
LinkedIn profile URL or URN.Examples:
  • https://www.linkedin.com/in/username
  • urn:li:member:123456789
count
integer
default:"10"
Number of posts to fetch.
  • Minimum: 1
  • Maximum: 50
  • Default: 10

Response

posts
array
Array of LinkedIn posts

Example Request

curl -X GET "https://api.fetchin.io/api/v1/posts?profileUrlOrUrn=https://www.linkedin.com/in/williamhgates&count=5" \
  -H "X-API-Key: your-api-key-here"

Example Response

[
  {
    "id": "urn:li:activity:7123456789012345678",
    "shareUrn": "urn:li:ugcPost:7123456789012345678",
    "content": "Excited to announce our new initiative...",
    "date": "2024-01-15T10:30:00Z",
    "reactionCount": 127,
    "commentCount": 15,
    "sharesCount": 12,
    "imageUrl": "https://media.licdn.com/dms/image/...",
    "videoUrl": null,
    "carouselPdfUrl": null,
    "profile": {
      "urn": "urn:li:fsd_profile:ACoAAABCDEF",
      "name": "William Gates",
      "headline": "Co-chair, Bill & Melinda Gates Foundation",
      "url": "https://www.linkedin.com/in/williamhgates",
      "imageUrl": "https://media.licdn.com/dms/image/..."
    }
  },
  {
    "id": "urn:li:activity:7123456789012345679",
    "shareUrn": "urn:li:ugcPost:7123456789012345679",
    "content": "Reflecting on the past year and looking forward...",
    "date": "2024-01-10T14:20:00Z",
    "reactionCount": 89,
    "commentCount": 7,
    "sharesCount": 4,
    "imageUrl": null,
    "videoUrl": "https://dms.licdn.com/playlist/...",
    "carouselPdfUrl": null,
    "profile": {
      "urn": "urn:li:fsd_profile:ACoAAABCDEF",
      "name": "William Gates",
      "headline": "Co-chair, Bill & Melinda Gates Foundation",
      "url": "https://www.linkedin.com/in/williamhgates",
      "imageUrl": "https://media.licdn.com/dms/image/..."
    }
  }
]

Errors

See Error Handling for the full list of error codes and recommended handling.
  • 400MISSING_PARAMETER / INVALID_URN
  • 401INVALID_API_KEY
  • 404COMPANY_NOT_FOUND
  • 429RATE_LIMITED / QUOTA_EXHAUSTED
  • 500INTERNAL_ERROR
  • 503SERVICE_UNAVAILABLE

Notes

This endpoint consumes 1 credit from your monthly quota, regardless of the count parameter value. Failed requests (errors) do not count against your quota.
Posts are returned in reverse chronological order (newest first).
Cache results when possible to avoid redundant requests for the same profile.

Authorizations

X-API-Key
string
header
required

Query Parameters

profileUrlOrUrn
string
required

The LinkedIn profile to fetch. Accepts a profile URN (recommended for consistency, since a profile's public identifier can change over time while the URN does not; example urn:li:fsd_profile:ACoAAA8BYqEBCGLg_vT_ca6mMEqkpp9nVffJ3hc), a public identifier/slug (also fine; example williamhgates), or a full profile URL (example https://www.linkedin.com/in/williamhgates; a trailing slash is ignored). The slug is the last path segment of a profile URL, so pass just the slug, not the /in/ prefix.

Example:

"urn:li:fsd_profile:ACoAAA8BYqEBCGLg_vT_ca6mMEqkpp9nVffJ3hc"

count
integer
default:10

Number of posts to fetch (default: 10)

Required range: 1 <= x <= 50
start
integer
default:0

Offset for pagination (default: 0)

Required range: x >= 0
paginationToken
string

Token for fetching the next page of posts. Use the paginationToken from the previous response.

Response

Successfully fetched posts

id
string

Activity URN. References the post in the urn:li:activity:* namespace.

Example:

"urn:li:activity:1234567890"

shareUrn
string

Share URN. References the same post as id but in the urn:li:share:* or urn:li:ugcPost:* namespace (depends on the post type).

Example:

"urn:li:ugcPost:7123456789012345678"

content
string
Example:

"This is a LinkedIn post content..."

date
string<date-time>
reactionCount
integer
commentCount
integer
sharesCount
integer

Number of times the post was reshared.

imageUrl
string
videoUrl
string
profile
object