# st.retrievePostReactions

> The API Reference is also the SDK and CLI reference. Consecutive code fences marked `tab=HTTP`, `tab=Node`, `tab=Python` and `tab=CLI` are the same call on each surface (a fence marked `tab=HTTP,CLI` is the same text for both), and a block between `:::surface <names>` and `:::` applies only to the surfaces it names. Identifiers in the text are written as in Node and in HTTP JSON (camelCase); the Python SDK spells methods, parameters and result attributes in snake_case (`sendMessage` → `send_message`, `reconnectionLink` → `reconnection_link`), while names inside HTTP JSON stay camelCase.

This action allows you to retrieve reactions for a certain post.

:::surface node,python
In the SDK this action runs inside `fetchPost` with `retrieveReactions` enabled; its result comes back in `data.reactions`, and its errors in `errors`.
:::

:::surface cli
In the CLI this action runs inside `linkedin post fetch` with `--reactions`; that command's other options are on [`st.openPost`](/docs/action-st-open-post).
:::

## Constraints

> ⏺️ **Root Start:** allowed, when `postUrl` or `postUrn` parameter is provided.

> ⬆️ **Parent Actions:** [st.openPost](/docs/action-st-open-post), [st.doForPosts](/docs/action-st-do-for-posts).

> ⬇️ **Child Actions:** N/A.

## Parameters

```json tab=HTTP
{
  "actionType": "st.retrievePostReactions",
  "postUrl": "https://www.linkedin.com/posts/post1",
  "limit": 100,
  "label": "post1Reactions"
}
```

```typescript tab=Node
const workflow = await linkedapi.fetchPost.execute({
  postUrl: "https://www.linkedin.com/posts/post1",
  retrieveReactions: true,
});

const { data, errors } = await linkedapi.fetchPost.result(workflow.workflowId);
console.log(data?.reactions);
console.log(errors);
```

```python tab=Python
from linkedapi import FetchPostParams

workflow = linkedapi.fetch_post.execute(
    FetchPostParams(
        post_url="https://www.linkedin.com/posts/post1",
        retrieve_reactions=True,
    )
)

result = linkedapi.fetch_post.result(workflow.workflow_id)
if result.data:
    print(result.data.reactions)
print(result.errors)
```

```bash tab=CLI
linkedin post fetch https://www.linkedin.com/posts/post1 --reactions --json
```

- `postUrl` (required for root start unless `postUrn` is provided, forbidden for parent start) – LinkedIn URL of the post.
- `postUrn` (optional) – [URN](/docs/data-conventions#linkedin-urns) of the post, accepted instead of `postUrl`. When both are provided, the URL must contain that same URN.
- `limit` (optional) – number of reactions to retrieve. Defaults to **10**, with a maximum value of **500**.
- `label` (optional) – custom label for tracking this action in workflow completion.

## Result options

1. **Successful reactions retrieval:**

```json
{
  "actionType": "st.retrievePostReactions",
  "label": "post1Reactions",
  "success": true,
  "data": [
    {
      "actor": {
        "type": "person",
        "name": "John Doe",
        "urn": null,
        "profileUrl": "https://www.linkedin.com/in/john-doe",
        "headline": "Product Manager",
        "viewerState": { "connectionDegree": "2nd" }
      },
      "type": "like"
    },
    {
      "actor": {
        "type": "person",
        "name": "Jane Doe",
        "urn": null,
        "profileUrl": "https://www.linkedin.com/in/person1",
        "headline": "Helping companies to use AI",
        "viewerState": { "connectionDegree": "3rd+" }
      },
      "type": "support"
    }
  ]
}
```

- `label` – included only if specified in the action parameters.
- `data` – array of reactions.
  - `actor` – person or company who reacted.
    - For person actors: `type`, `name`, `urn`, `profileUrl`, `headline`, `viewerState` with `connectionDegree` – `1st`, `2nd`, `3rd+`, or `null` if LinkedIn does not show it (see [viewer state](/docs/data-conventions#viewer-state)).
    - For company actors: `type`, `name`, `urn`, `companyUrl`.
    - `urn` – [URN](/docs/data-conventions#linkedin-urns) of the person or company, or `null` if LinkedIn does not expose it.
  - `type` – enum describing the reaction type. Possible values:
    - `like` – standard "like".
    - `celebrate` – to celebrate an achievement.
    - `support` – to show support.
    - `love` – to express love or admiration.
    - `insightful` – to appreciate insightful content.
    - `funny` – to react to something humorous.

2. **Failed reactions retrieval:**

```json
{
  "actionType": "st.retrievePostReactions",
  "success": false,
  "label": "post1",
  "error": {
    "type": "postNotFound",
    "message": "The provided URL is not an existing LinkedIn post."
  }
}
```

- `label` – included only if specified in the action parameters.
- `error.type` – enum with the following possible values:
  - `postNotFound` – provided URL is not an existing LinkedIn post.
