API Documentation

Everything you need to integrate the RichAPI API into your product.

Activity

Profile Activities

Get a profile's recent posts, comments and reactions for engagement analysis.

POST
/api/v1/profile_activities
2 credits per call

Parameters

FieldTypeRequiredDescription
urnstringYesLinkedIn entity URN of the profile
typestringNoActivity type filter: POST, COMMENT, or REACTION (default: all)
paginationTokenstringNoToken from previous response for next page
sizeintegerNoNumber of items per page
useCachebooleanNoUse cached data (up to 24h). Defaults to true.

Response fields

FieldTypeDescription
elementsarrayList of activity items
elements[].typestringActivity type (POST, COMMENT, REACTION)
elements[].textstringPost or comment text
elements[].urlstringLinkedIn URL of the activity
elements[].likeCountintegerNumber of likes
elements[].commentCountintegerNumber of comments
elements[].publishedAtstringPublication timestamp

Code

curl -X POST https://api.richapi.ai/api/v1/profile_activities \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "urn": "ACoAAA...",
  "type": "POST"
}'

Try it

Sign in to test this endpoint with your API key.

Sign in to try

Post Details

Get full post details including text, media, comments and reaction counts.

POST
/api/v1/post_details
1 credit per call

Parameters

FieldTypeRequiredDescription
urnstringYesLinkedIn activity URN e.g. urn:li:activity:7458532524865232896
commentsbooleanNoInclude comments list in response (default true)
reactionsbooleanNoInclude reactions list in response (default true)

Response fields

FieldTypeDescription
urnstringLinkedIn activity URN (e.g. urn:li:activity:...)
threadUrnstringLinkedIn ugcPost URN of the thread
shareUrnstringLinkedIn ugcPost URN for sharing
commentarystringPost text content
numCommentsintegerTotal number of comments
numReactionsintegerTotal number of reactions
reactionTypeobjectReaction counts by type e.g. {like: 91, praise: 4}
shareUrlstringPublic LinkedIn post URL
actorobjectPost author: profileId, firstName, lastName, headline, profilePicture, entityUrn, profileType
commentsarrayComment list (only when comments=true). Each: id, comment, totalComments, totalReactions, url, commenter
comments[].commenterobjectCommenter profile: profileId, firstName, lastName, headline, profilePicture, entityUrn
reactionsarrayReaction list (only when reactions=true). Each: reaction (LIKE/PRAISE/etc.), reactor
reactions[].reactorobjectReactor profile: profileId, firstName, lastName, headline, profilePicture, entityUrn
contentobjectAttached content object: image, video, article, document, poll, celebration, entity, showcase (null when absent)
content.documentobjectDocument attachment: title, totalPages, documentUrl, expiry
sponsoredbooleanWhether the post is a sponsored/promoted post

Code

curl -X POST https://api.richapi.ai/api/v1/post_details \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "urn": "urn:li:activity:7458532524865232896",
  "comments": true
}'

Try it

Sign in to test this endpoint with your API key.

Sign in to try

Post Activities

Get likes, comments and reactions on a specific LinkedIn post.

POST
/api/v1/post_activities
3 credits per call

Parameters

FieldTypeRequiredDescription
urnstringYesLinkedIn activity URN e.g. urn:li:activity:7458532524865232896 (url field does not work)

Response fields

FieldTypeDescription
urnstringLinkedIn activity URN (e.g. urn:li:activity:...)
commentarystringPost text content
numCommentsintegerTotal number of comments
numReactionsintegerTotal number of reactions
reactionTypeobjectReaction counts by type (e.g. {like: 91, praise: 4})
shareUrlstringPublic URL to the LinkedIn post
actorobjectPost author: profileId, firstName, lastName, headline, profilePicture
commentsarrayComment list. Each: id, comment, totalComments, totalReactions, url, commenter
reactionsarrayReaction list. Each: reaction (LIKE/PRAISE/etc.), reactor profile
contentobjectAttached content: image, video, article, document, poll (null when absent)
sponsoredbooleanWhether the post is sponsored

Code

curl -X POST https://api.richapi.ai/api/v1/post_activities \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "urn": "urn:li:activity:7458532524865232896"
}'

Try it

Sign in to test this endpoint with your API key.

Sign in to try