> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fetchin.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Post Reactions

> Fetch reactions on a professional post with reactor profile information

## Endpoint

```
GET /api/v1/post/reactions
```

## Authentication

Include your API key in the request header:

```bash theme={null}
X-API-Key: your-api-key-here
```

## Parameters

<ParamField query="postUrlOrUrn" type="string" required>
  Professional post URL or URN.

  Examples:

  * `https://www.linkedin.com/posts/username_some-post-slug-1234567890-abcd`
  * `urn:li:activity:7287782484287606784`
  * `urn:li:ugcPost:7287782484287606784`
</ParamField>

<ParamField query="count" type="integer" default="100">
  Number of reactions to fetch per page.

  * Minimum: 1
  * Maximum: 100
  * Default: 100
</ParamField>

<ParamField query="start" type="integer" default="0">
  Offset for pagination.

  * Default: 0
</ParamField>

## Response

<ResponseField name="reactions" type="array">
  Array of reactions on the post

  <Expandable title="Reaction object">
    <ResponseField name="reactionType" type="string">
      The type of reaction. One of: `LIKE`, `EMPATHY` (Love), `ENTERTAINMENT` (Funny), `INTEREST` (Insightful), `PRAISE` (Celebrate), `APPRECIATION` (Support)
    </ResponseField>

    <ResponseField name="actor" type="object" required>
      Information about the person who reacted

      <Expandable title="Actor object">
        <ResponseField name="urn" type="string" required>
          Professional profile URN of the reactor
        </ResponseField>

        <ResponseField name="name" type="string" required>
          Full name of the reactor
        </ResponseField>

        <ResponseField name="headline" type="string" required>
          Professional headline of the reactor
        </ResponseField>

        <ResponseField name="profileUrl" type="string" required>
          Professional profile URL of the reactor
        </ResponseField>

        <ResponseField name="profilePictureUrl" type="string" required>
          Profile picture URL of the reactor
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="hasMore" type="boolean">
  Indicates whether there are more reactions to fetch.
</ResponseField>

## Example Request

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://api.fetchin.io/api/v1/post/reactions?postUrlOrUrn=https://www.linkedin.com/posts/username_post-slug-1234567890-abcd&count=100" \
    -H "X-API-Key: your-api-key-here"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://api.fetchin.io/api/v1/post/reactions?postUrlOrUrn=urn:li:activity:7287782484287606784&count=100',
    {
      headers: {
        'X-API-Key': 'your-api-key-here'
      }
    }
  );

  const data = await response.json();
  console.log(data);
  ```

  ```python Python theme={null}
  import requests

  headers = {
      'X-API-Key': 'your-api-key-here'
  }

  params = {
      'postUrlOrUrn': 'urn:li:activity:7287782484287606784',
      'count': 100
  }

  response = requests.get(
      'https://api.fetchin.io/api/v1/post/reactions',
      headers=headers,
      params=params
  )

  data = response.json()
  print(data)
  ```

  ```php PHP theme={null}
  <?php

  $apiKey = 'your-api-key-here';
  $postUrlOrUrn = 'urn:li:activity:7287782484287606784';
  $count = 100;

  $url = "https://api.fetchin.io/api/v1/post/reactions?postUrlOrUrn=" . urlencode($postUrlOrUrn) . "&count=" . $count;

  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, $url);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_HTTPHEADER, [
      'X-API-Key: ' . $apiKey
  ]);

  $response = curl_exec($ch);
  $data = json_decode($response, true);

  curl_close($ch);
  print_r($data);
  ?>
  ```
</CodeGroup>

## Example Response

<ResponseExample>
  ```json 200 Success theme={null}
  {
    "reactions": [
      {
        "reactionType": "LIKE",
        "actor": {
          "urn": "urn:li:fsd_profile:ACoAABBfDXAB9eK9V6vEHbzfQXZ-wcjke_QuT7g",
          "name": "Kevin Piacentini",
          "headline": "Lead Engineer | Scaled my SaaS to $250K ARR",
          "profileUrl": "https://www.linkedin.com/in/ACoAABBfDXAB9eK9V6vEHbzfQXZ-wcjke_QuT7g",
          "profilePictureUrl": "https://media.licdn.com/dms/image/..."
        }
      },
      {
        "reactionType": "EMPATHY",
        "actor": {
          "urn": "urn:li:fsd_profile:ACoAAElKiMcBWNSGaHLmNaJXyyVbUFfQNxR3jpM",
          "name": "Yasmine Damnati",
          "headline": "Apprentie ingenieur automatisme",
          "profileUrl": "https://www.linkedin.com/in/ACoAAElKiMcBWNSGaHLmNaJXyyVbUFfQNxR3jpM",
          "profilePictureUrl": "https://media.licdn.com/dms/image/..."
        }
      }
    ],
    "hasMore": false
  }
  ```

  ```json 400 Bad Request theme={null}
  {
    "error": "Missing postUrlOrUrn parameter",
    "code": "MISSING_PARAMETER"
  }
  ```

  ```json 401 Unauthorized theme={null}
  {
    "error": "Invalid API key",
    "code": "INVALID_API_KEY"
  }
  ```

  ```json 404 Not Found theme={null}
  {
    "error": "Unable to find post from url",
    "code": "POST_NOT_FOUND"
  }
  ```

  ```json 402 Payment Required theme={null}
  {
    "error": "Quota exceeded. Upgrade your plan or wait for renewal.",
    "code": "QUOTA_EXHAUSTED"
  }
  ```

  ```json 500 Internal Server Error theme={null}
  {
    "error": "Internal server error",
    "code": "INTERNAL_ERROR"
  }
  ```

  ```json 503 Service Unavailable theme={null}
  {
    "error": "Service temporarily unable to serve this request. Please retry.",
    "code": "SERVICE_UNAVAILABLE"
  }
  ```
</ResponseExample>

## Errors

See [Error Handling](/concepts/error-handling) for the full list of error codes and recommended handling.

* `400` — `MISSING_PARAMETER`, `INVALID_URN`
* `401` — `INVALID_API_KEY`
* `404` — `POST_NOT_FOUND`
* `402` — `QUOTA_EXHAUSTED`
* `429` — `RATE_LIMITED`
* `500` — `INTERNAL_ERROR`
* `503` — `SERVICE_UNAVAILABLE`

## Pagination

To fetch all reactions from a post with many reactions, use offset pagination:

1. Make an initial request with `start=0`
2. If `hasMore` is `true`, increment `start` by `count` in your next request
3. Continue until `hasMore` is `false`

```javascript theme={null}
async function fetchAllReactions(postUrlOrUrn) {
  const allReactions = [];
  let start = 0;
  const count = 100;
  let hasMore = true;

  while (hasMore) {
    const params = new URLSearchParams({ postUrlOrUrn, count: String(count), start: String(start) });

    const response = await fetch(
      `https://api.fetchin.io/api/v1/post/reactions?${params}`,
      { headers: { 'X-API-Key': 'your-api-key-here' } }
    );

    const data = await response.json();
    allReactions.push(...data.reactions);
    hasMore = data.hasMore;
    start += count;
  }

  return allReactions;
}
```

## Notes

<Info>
  This endpoint consumes 1 credit from your monthly quota per API call, regardless of the `count` parameter value.
</Info>

<Tip>
  You can pass either a professional post URL (e.g. `https://www.linkedin.com/posts/...`) or a post URN (e.g. `urn:li:activity:...`). When a URL is provided, the API automatically resolves it to the correct activity URN.
</Tip>


## OpenAPI

````yaml GET /api/v1/post/reactions
openapi: 3.1.0
info:
  title: Fetchin API
  version: 1.0.0
  description: Public B2B data API for fetching posts and profile information
servers:
  - url: https://api.fetchin.io
    description: Production server
security:
  - ApiKeyAuth: []
paths:
  /api/v1/post/reactions:
    get:
      summary: Get reactions on a post
      description: >-
        Fetch who reacted to a specific professional post, including their
        reaction type and profile information.
      parameters:
        - name: postUrlOrUrn
          in: query
          required: true
          description: Professional post URL or URN
          schema:
            type: string
            example: https://www.linkedin.com/posts/username_post-slug-1234567890-abcd
        - name: count
          in: query
          required: false
          description: 'Number of reactions to fetch (default: 100)'
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 100
        - name: start
          in: query
          required: false
          description: >-
            Offset of the first item to return. This endpoint pages by offset:
            advance `start` by the number of items you received. Keep requesting
            while `hasMore` is true; an empty page ends the list.
          schema:
            type: integer
            minimum: 0
            default: 0
      responses:
        '200':
          description: Successfully fetched post reactions
          content:
            application/json:
              schema:
                type: object
                properties:
                  reactions:
                    type: array
                    items:
                      type: object
                      properties:
                        reactionType:
                          type: string
                          enum:
                            - LIKE
                            - EMPATHY
                            - ENTERTAINMENT
                            - INTEREST
                            - PRAISE
                            - APPRECIATION
                          description: >-
                            The type of reaction: LIKE (Like), EMPATHY (Love),
                            ENTERTAINMENT (Funny), INTEREST (Insightful), PRAISE
                            (Celebrate), APPRECIATION (Support)
                        actor:
                          type: object
                          required:
                            - urn
                            - name
                            - headline
                            - profileUrl
                            - profilePictureUrl
                          properties:
                            urn:
                              type: string
                              example: urn:li:fsd_profile:ACoAAABCDEF
                            name:
                              type: string
                              example: Jane Doe
                            headline:
                              type: string
                              example: Software Engineer at Tech Company
                            profileUrl:
                              type: string
                              example: https://www.linkedin.com/in/ACoAAABCDEF
                            profilePictureUrl:
                              type: string
                              example: https://media.licdn.com/dms/image/...
                  hasMore:
                    type: boolean
                    description: Whether more reactions are available
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
components:
  responses:
    BadRequest:
      description: Bad request - a required parameter is missing or a value is invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            missingParameter:
              value:
                error: Missing profileUrlOrUrn parameter
                code: MISSING_PARAMETER
            invalidParameter:
              value:
                error: limit must be a number between 1 and 100
                code: INVALID_PARAMETER
            invalidUrn:
              value:
                error: 'Invalid URN format: foo'
                code: INVALID_URN
    Unauthorized:
      description: Unauthorized - the X-API-Key header is missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            missingApiKey:
              value:
                error: Missing API key. Include X-API-Key header.
                code: UNAUTHENTICATED
            invalidApiKey:
              value:
                error: Invalid API key
                code: INVALID_API_KEY
    PaymentRequired:
      description: >-
        Payment required - your monthly credit quota is exhausted
        (QUOTA_EXHAUSTED). Upgrade your plan or wait for renewal; retrying will
        not help and no Retry-After is sent. Distinct from the per-second rate
        limit, which is a 429 (RATE_LIMITED).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            quotaExhausted:
              value:
                error: Quota exceeded. Upgrade your plan or wait for renewal.
                code: QUOTA_EXHAUSTED
    NotFound:
      description: >-
        Not found - the request was served successfully but the requested
        professional entity does not exist.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            profileNotFound:
              value:
                error: LinkedIn profile not found
                code: PROFILE_NOT_FOUND
            postNotFound:
              value:
                error: Unable to find post from url
                code: POST_NOT_FOUND
            companyNotFound:
              value:
                error: Unable to find company slug from urn
                code: COMPANY_NOT_FOUND
    TooManyRequests:
      description: >-
        Too many requests - your per-second rate limit (RATE_LIMITED) was
        exceeded. Back off and retry, honoring the Retry-After header. (Monthly
        credit quota exhaustion is a separate 402 PaymentRequired /
        QUOTA_EXHAUSTED.)
      headers:
        Retry-After:
          description: Number of seconds to wait before retrying the request.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            rateLimited:
              value:
                error: Rate limit exceeded. Try again later.
                code: RATE_LIMITED
    InternalError:
      description: >-
        Internal server error - an unexpected error occurred in our API. Safe to
        retry; contact support if it persists.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            internalError:
              value:
                error: Internal server error
                code: INTERNAL_ERROR
    ServiceUnavailable:
      description: >-
        Service unavailable - our API is temporarily unable to serve this
        request (capacity exhausted or overloaded). This is on our side, not
        yours and not an upstream service outage. Retry with backoff, honoring
        the Retry-After header.
      headers:
        Retry-After:
          description: Number of seconds to wait before retrying the request.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            serviceUnavailable:
              value:
                error: >-
                  Service temporarily unable to serve this request. Please
                  retry.
                code: SERVICE_UNAVAILABLE
  schemas:
    Error:
      type: object
      required:
        - error
        - code
      properties:
        error:
          type: string
          description: >-
            Human-readable description of what went wrong. For display/logging;
            do not branch on this string.
        code:
          type: string
          enum:
            - MISSING_PARAMETER
            - INVALID_PARAMETER
            - INVALID_URN
            - UNAUTHENTICATED
            - INVALID_API_KEY
            - FORBIDDEN
            - NOT_FOUND
            - PROFILE_NOT_FOUND
            - POST_NOT_FOUND
            - COMPANY_NOT_FOUND
            - RATE_LIMITED
            - QUOTA_EXHAUSTED
            - INTERNAL_ERROR
            - UPSTREAM_ERROR
            - SERVICE_UNAVAILABLE
            - UPSTREAM_TIMEOUT
          description: >-
            Stable, machine-readable error code. Branch your integration on this
            value, not on the HTTP status alone or the message text.
        details:
          type: object
          additionalProperties: true
          description: Optional structured context (e.g. creditsNeeded on quota errors).
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````