---
title: "Get the comments on a LinkedIn post"
method: GET
path: "/linkedin/comments"
tags: ["LinkedIn"]
---

# Get the comments on a LinkedIn post

`GET /linkedin/comments`

## Request

- Base URL: `https://api.scrapefield.com/v1`
- URL: `https://api.scrapefield.com/v1/linkedin/comments`
- Auth: one of:
  - HTTP bearer
  - none

Fetch the comments on one post, up to 100 a page: each comment's text, author (name, headline, profile), published_at, like_count, reply_count and its own `url`, which opens the post at that comment. With `comment_url`, the replies to one comment. Use this to see who engages with a post and what they say.

Give exactly one of `url` or `comment_url` to identify the subject.

Costs 7 credits, whether the answer is fetched or served from cache. A failed call is refunded automatically.

## Query parameters

- `url` string
- `comment_url` string
- `sort` 'relevance' | 'newest'
- `cursor` string
- `fresh` boolean
- `demo` boolean

## Response `200`

The request succeeded.

- object
  - `data` LinkedinComment[], required
    - `id` string, required: LinkedIn's id for the comment.
    - `url` string, uri, nullable, required: The comment's own link, as LinkedIn's "Copy link to comment" gives it: it opens the post at this comment, and linkedin/comments and linkedin/reactions take it as `comment_url`. `null` for a reply whose link the source does not give.
    - `post_urn` string, nullable, required: The post it is on, e.g. `urn:li:activity:7243…`.
    - `parent_id` string, nullable, required: The comment it answers, for a reply.
    - `text` string, nullable, required: The comment's text.
    - `author` object, required: Who wrote it.
      - `type` 'person' | 'company', required: A company page can comment and react as itself.
      - `vanity_name` string, nullable, required: The public name in the URL: after `/in/` for a person, after `/company/` for a company. `null` where LinkedIn gives only an id.
      - `url` string, uri, required: Their page. Where LinkedIn lists a person by member id, as it does a post's reactors, this is a member-id link (`/in/ACoAA…`).
      - `full_name` string, nullable, required: The person's name, or the company's.
      - `headline` string, nullable, required: The line under the name. For a company, LinkedIn prints its follower count here.
      - `location` string, nullable, required: As printed. `null` in most lists.
      - `services` string[], required: What they offer, for someone found by linkedin/services. Empty in other lists.
    - `published_at` string, date-time, nullable, required: When it was posted. `null` when the source does not say.
    - `like_count` integer, nullable, required: Reactions to the comment, all kinds together.
    - `reply_count` integer, nullable, required: How many replies it has.
  - `meta` Meta, required
    - `request_id` string, required: Quote this if you contact support.
    - `credits_charged` integer, required: The endpoint's published cost. 0 for a demo answer, and for a list emptied because everyone in it asked not to be served. A failed call has no `meta`: it answers with an error, and is refunded.
    - `credits_remaining` integer
    - `cached` boolean, required
    - `fetched_at` string, date-time, required: When the data was actually fetched — the original time on a cache hit, so freshness is always visible.
    - `next_cursor` string, nullable, required: Pass as `cursor` for the next page. `null` on the last page. It lasts as long as the answer is cached.
    - `demo` boolean: Present, and true, on a demo answer (`?demo=true` with no key).
    - `note` string: On a demo answer: what it is, and what a live call costs.

## Other responses

- `400`: Something went wrong. `error.code` is stable; `error.message` says what to do next.
- `401`: Something went wrong. `error.code` is stable; `error.message` says what to do next.
- `403`: Something went wrong. `error.code` is stable; `error.message` says what to do next.
- `404`: Something went wrong. `error.code` is stable; `error.message` says what to do next.
- `429`: Something went wrong. `error.code` is stable; `error.message` says what to do next.
- `500`: Something went wrong. `error.code` is stable; `error.message` says what to do next.
- `501`: Something went wrong. `error.code` is stable; `error.message` says what to do next.
- `502`: Something went wrong. `error.code` is stable; `error.message` says what to do next.

---

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