---
title: "Get comments from a post"
method: GET
path: "/api/v1/post/comments"
---

# Get comments from a post

`GET /api/v1/post/comments`

## Request

- Base URL: `https://api.fetchin.io`
- URL: `https://api.fetchin.io/api/v1/post/comments`
- Auth: API key in header `X-API-Key`

Fetch comments from a professional post including author information and replies (subcomments). Comments come back in the source's order for `sortBy`: `relevance` (default) returns a ranked SUBSET of the thread (measured: 224 of 299 top-level comments), `recent` returns the complete thread newest first and is the way to walk every comment or pick up new ones. Pages advance with `start`.

## Query parameters

- `postUrlOrUrn` string, required
- `sortBy` 'relevance' | 'recent'
- `count` integer
- `start` integer
- `paginationToken` string

## Response `200`

Successfully fetched comments

- object
  - `comments` object[]: Top-level comments in the source's order for `sortBy`, each with its replies nested.
    - `urn` string
    - `text` string
    - `createdAt` string, date-time
    - `reactionCount` integer
    - `reactionTypeCounts` object[]: The comment's reactions per type, in the source's order, when provided.
      - `type` string
      - `count` integer
    - `replyCount` integer: Replies the comment received, when the source states it.
    - `edited` boolean: `true` when the comment was edited after it was posted.
    - `pinned` boolean: `true` when the comment is pinned to the top of the thread.
    - `authorIsPostAuthor` boolean: `true` when the comment was written by the post's own author.
    - `contributed` boolean: `true` when the comment is a contribution to a collaborative article.
    - `permalink` string: Direct link to the comment.
    - `author` object: Who wrote the comment: a member or a company page - read `type`.
      - `type` 'profile' | 'company': `profile` for a member, `company` for a company page.
      - `id` string, required: `urn:li:fsd_profile:<profileId>` for a member, `urn:li:fsd_company:<companyId>` for a company page.
      - `name` string, required
      - `headline` string, required: The member's headline; for a company page, its follower line (e.g. "1,207 followers").
      - `profilePictureUrl` string, required
      - `profileUrl` string, required: Profile URL of the member, or the company page URL without a `/posts` suffix.
      - `profileId` string: Members only: the profile id (`ACoAA...`).
      - `publicId` string: Members only: the public identifier (`/in/<publicId>`).
      - `memberId` string: Members only: the numeric member id.
      - `companyId` string: Company pages only: the numeric company id.
      - `universalName` string: Company pages only: the page's public identifier.
    - `replies` object[]: Array of reply comments (subcomments), same structure as a comment with an empty `replies` array.
      - `urn` string
      - `text` string
      - `createdAt` string, date-time
      - `reactionCount` integer
      - `author` object
        - `id` string
        - `name` string
        - `headline` string
        - `profilePictureUrl` string
        - `profileUrl` string
      - `replies` unknown[]
        - unknown
  - `total` integer: Number of top-level comments the source reports for the post (replies not included). Omitted when the source does not report one.
  - `paginationToken` string: Token for fetching the next page
  - `hasMore` boolean: Whether more comments are available. Always false on an empty page.

## Other responses

- `400`: Bad request - a required parameter is missing or a value is invalid.
- `401`: Unauthorized - the X-API-Key header is missing or invalid.
- `402`: Payment required - you are out of credits (QUOTA_EXHAUSTED): the plan allowance for the current period is spent AND no pay-as-you-go credits are left. Buy pay-as-you-go credits (self-serve, https://fetchin.io/credits), 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).
- `404`: Not found - the request was served successfully but the requested professional entity does not exist.
- `429`: Too many requests - your per-second rate limit (RATE_LIMITED) was exceeded. Back off and retry, honoring the Retry-After header. (Running out of credits is a separate 402 PaymentRequired / QUOTA_EXHAUSTED, and buying credits never raises this per-second limit.)
- `500`: Internal server error - an unexpected error occurred in our API. Safe to retry; contact support if it persists.
- `503`: 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.

---

[API](https://skmtc.dev/fetchin/apis/fetchin-api.md) - [All operations](https://skmtc.dev/fetchin/apis/fetchin-api/llms.txt) - [OpenAPI document](https://skmtc.dev/fetchin/apis/fetchin-api/revisions/19a0b5d0320f?raw)
