# Get LinkedIn post comments (https://snitchfeed.com/docs/api/linkedin/posts/comments)

**Authentication:** All requests require `Authorization: Bearer <api_key>` header. Obtain your API key from the SnitchFeed platform under Integrations → API Keys.

## `POST /data/linkedin/posts/comments`

**Full URL:** `https://api.snitchfeed.com/v1/data/linkedin/posts/comments`

**Summary:** Get LinkedIn post comments

Fetch commenters and comment text for a public LinkedIn post by post URL.

Returns up to `maxComments` comments (default 100, max 1000).

**Recommended client timeout: 90 seconds.** Larger `maxComments` values take longer because multiple pages are fetched.

Credits

Each **successful** response deducts **1 credit per comment returned**. Requests that fail (4xx / 5xx) are not billed.

See the [credits documentation](https://snitchfeed.com/docs/api/credits) for the full rate table.

### Request Body

**Content-Type:** `application/json`

#### Fields

Request body for `POST /data/linkedin/posts/comments`.

| Field | Type | Required | Description |
|-------|------|:--------:|-------------|
| `postUrl` | string | ✓ | Public LinkedIn post URL (e.g. `https://www.linkedin.com/posts/...` or a `feed/update/urn:li:activity:...` URL). (minLength: 1, maxLength: 2048) |
| `maxComments` | integer |  | Maximum comments to return (100-1000). Default 100. Charged at 1 credit per comment returned. (min: 100, max: 1000) |

### Responses

#### `200`: Post comments

#### Response fields

Successful `POST /data/linkedin/posts/comments` response.

| Field | Type | Required | Description |
|-------|------|:--------:|-------------|
| `requestId` | string | ✓ | Server-generated id for this request (logging / support). |
| `comments` | object[] | ✓ | Comments returned for this request (up to `maxComments`). |
| `meta` | object | ✓ |  |
| `returnedCount` | integer | ✓ | Number of comments in this response. |
| `total` | integer | ✓ | Total comments reported by LinkedIn for this post when available. |
| `creditsCharged` | integer | ✓ | Credits deducted for this successful request. |

#### `400`: Validation or bad request

#### Response fields

Validation error

| Field | Type | Required | Description |
|-------|------|:--------:|-------------|
| `requestId` | string | ✓ | Server-generated id for this request (logging / support). |
| `error` | object | ✓ |  |
| `code` | "validation_error" | ✓ |  |
| `message` | string | ✓ |  |
| `issues` | object[] | ✓ |  |

**Example:**
```json
{
  "requestId": "01HXYZABCDEF",
  "error": {
    "code": "validation_error",
    "message": "query: String must contain at least 1 character(s)",
    "issues": [
      {
        "path": "query",
        "message": "String must contain at least 1 character(s)"
      }
    ]
  }
}
```

#### `401`: Unauthorized

#### Response fields

Unauthorized

| Field | Type | Required | Description |
|-------|------|:--------:|-------------|
| `requestId` | string | ✓ | Server-generated id for this request (logging / support). |
| `error` | object | ✓ |  |
| `code` | "unauthorized" | ✓ |  |
| `message` | string | ✓ |  |

**Example:**
```json
{
  "requestId": "01HXYZABCDEF",
  "error": {
    "code": "unauthorized",
    "message": "Invalid or revoked API key."
  }
}
```

#### `429`: Rate limited (20 requests per minute per surface) or too many concurrent in-flight requests (max 2 per organization)

#### Response fields

Rate limited or too many concurrent in-flight requests

| Field | Type | Required | Description |
|-------|------|:--------:|-------------|
| `requestId` | string | ✓ | Server-generated id for this request (logging / support). |
| `error` | object | ✓ |  |
| `code` | "rate_limited" | ✓ |  |
| `message` | string | ✓ |  |
| `retryAfter` | integer | ✓ | Seconds until the rate limit resets (same value as the `Retry-After` response header). |

**Example:**
```json
{
  "requestId": "01HXYZABCDEF",
  "error": {
    "code": "rate_limited",
    "message": "Rate limit exceeded for linkedin. Try again later.",
    "retryAfter": 42
  }
}
```

#### `502`: Upstream error

#### Response fields

Upstream error

| Field | Type | Required | Description |
|-------|------|:--------:|-------------|
| `requestId` | string | ✓ | Server-generated id for this request (logging / support). |
| `error` | object | ✓ |  |
| `code` | "upstream_error" | ✓ |  |
| `message` | string | ✓ |  |

**Example:**
```json
{
  "requestId": "01HXYZABCDEF",
  "error": {
    "code": "upstream_error",
    "message": "LinkedIn search could not be completed. You won't be charged for this request."
  }
}
```

#### `503`: LinkedIn comments scrape temporarily unavailable

#### Response fields

LinkedIn search temporarily unavailable

| Field | Type | Required | Description |
|-------|------|:--------:|-------------|
| `requestId` | string | ✓ | Server-generated id for this request (logging / support). |
| `error` | object | ✓ |  |
| `code` | "linkedin_unavailable" | ✓ |  |
| `message` | string | ✓ |  |

**Example:**
```json
{
  "requestId": "ce8f36c6-c9e6-4ab1-93b3-d11bbbe886aa",
  "error": {
    "code": "linkedin_unavailable",
    "message": "LinkedIn search is temporarily unavailable. Retry later. You won't be charged for this request."
  }
}
```
