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

# Extract comments from LinkedIn profile

> Extract comments left by a LinkedIn profile on other posts. Uses the voyagerFeedDashProfileUpdates endpoint and paginates until all comments are retrieved or the requested limit is reached.

Extract comments left by a LinkedIn profile on other posts. This endpoint paginates through the profile's feed activity and filters for comment-type elements, returning up to the specified limit.

## Use Cases

* Surface intent signals from prospects actively engaging with relevant content
* Identify which topics a lead is commenting on to personalise outreach
* Track engagement patterns of key prospects or customers
* Enrich lead profiles with recent activity data

## Parameters

### Required Parameters

* `linkedin_profile_url`: LinkedIn profile URL to extract comments from (e.g., `https://www.linkedin.com/in/mathieu-brun-picard/`)
* `limit`: Maximum number of comments to extract (minimum: 1)

## Response

The response includes an array of comments with the following fields:

* `id`: Numeric activity ID extracted from the URN
* `comment_url`: Full LinkedIn URL with `commentUrn` query parameter — links directly to the comment
* `author`: Full name of the commenter
* `author_url`: LinkedIn profile URL of the commenter (query params stripped)
* `comment_text`: Text content of the comment
* `commented_at`: ISO 8601 timestamp of when the comment was posted
* `urn`: LinkedIn URN identifying the comment (`urn:li:comment:(parentActivity,commentId)`)

## Example Request

```bash theme={null}
curl --request POST \
  --url https://app.pipecorn.com/api/v2/intents/leads/comments \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: your-api-key' \
  --data '{
    "linkedin_profile_url": "https://www.linkedin.com/in/mathieu-brun-picard/",
    "limit": 10
  }'
```

## Example Response

```json theme={null}
{
  "comments": [
    {
      "id": "7241056783920183297",
      "comment_url": "https://www.linkedin.com/feed/update/urn:li:activity:7241056783920183297?commentUrn=urn%3Ali%3Acomment%3A%28urn%3Ali%3Aactivity%3A7241056783920183297%2C7241089034521346049%29",
      "author": "Mathieu Brun-Picard",
      "author_url": "https://www.linkedin.com/in/mathieu-brun-picard/",
      "comment_text": "Great point — we've been seeing the same pattern at Pipecorn. The signal quality improves significantly once you filter by recency and engagement depth.",
      "commented_at": "2025-11-20T14:17:00Z",
      "urn": "urn:li:comment:(urn:li:activity:7241056783920183297,7241089034521346049)"
    },
    {
      "id": "7238912047563218945",
      "comment_url": "https://www.linkedin.com/feed/update/urn:li:activity:7238912047563218945?commentUrn=urn%3Ali%3Acomment%3A%28urn%3Ali%3Aactivity%3A7238912047563218945%2C7238945301827563521%29",
      "author": "Mathieu Brun-Picard",
      "author_url": "https://www.linkedin.com/in/mathieu-brun-picard/",
      "comment_text": "This is exactly why we built intent signals into Pipecorn. Knowing when a prospect is actively commenting on topics relevant to your product is a game changer for outbound timing.",
      "commented_at": "2025-11-17T10:44:00Z",
      "urn": "urn:li:comment:(urn:li:activity:7238912047563218945,7238945301827563521)"
    }
  ]
}
```

## Notes

* This endpoint returns results synchronously (HTTP 200 OK) — no polling required
* Comments are detected from the profile's feed when the share URL contains `commentUrn` or `/comment/`, or when `parentUrn`/`baseUpdate` fields are present on the feed element
* The service paginates through the feed in pages of 20 until the limit is reached or the feed is exhausted
* `author_url` is returned with tracking query parameters stripped


## OpenAPI

````yaml POST /intents/leads/comments
openapi: 3.0.1
info:
  title: Pipecorn Accounts API
  description: Pipecorn Accounts API
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://app.pipecorn.com/api/v2/
security:
  - defaultApiKey: []
paths:
  /intents/leads/comments:
    post:
      summary: Extract comments from a LinkedIn profile
      description: >-
        Extract comments left by a LinkedIn profile on other posts. Uses the
        voyagerFeedDashProfileUpdates endpoint and paginates until all comments
        are retrieved or the requested limit is reached.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - linkedin_profile_url
                - limit
              properties:
                linkedin_profile_url:
                  type: string
                  format: uri
                  description: LinkedIn profile URL to extract comments from
                  example: https://www.linkedin.com/in/john-doe
                limit:
                  type: integer
                  description: Maximum number of comments to extract
                  minimum: 1
                  example: 10
      responses:
        '200':
          description: Successfully extracted comments
          content:
            application/json:
              schema:
                type: object
                properties:
                  comments:
                    type: array
                    description: Array of comments left by the LinkedIn profile
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Numeric activity ID extracted from the URN
                          example: '1234567890123456789'
                        comment_url:
                          type: string
                          format: uri
                          description: >-
                            Full LinkedIn URL with commentUrn query parameter
                            linking directly to the comment
                          example: >-
                            https://www.linkedin.com/feed/update/urn:li:activity:1234567890123456789?commentUrn=urn%3Ali%3Acomment%3A%28urn%3Ali%3Aactivity%3A1234567890123456789%2C9876543210987654321%29
                        author:
                          type: string
                          description: Full name of the commenter
                          example: John Doe
                        author_url:
                          type: string
                          format: uri
                          description: LinkedIn profile URL of the commenter
                          example: https://www.linkedin.com/in/john-doe
                        comment_text:
                          type: string
                          description: Text content of the comment
                          example: Great point - we've been seeing the same pattern.
                        commented_at:
                          type: string
                          format: date-time
                          description: ISO 8601 timestamp of when the comment was posted
                          example: '2026-03-11T14:17:00Z'
                        urn:
                          type: string
                          description: LinkedIn URN identifying the comment
                          example: >-
                            urn:li:comment:(urn:li:activity:1234567890123456789,9876543210987654321)
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                missing_required:
                  value:
                    error: 400
                    message: 'Missing required keys: linkedin_profile_url, limit'
        '404':
          description: LinkedIn profile not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: integer
                    format: int32
                    example: 404
                  message:
                    type: string
                    example: LinkedIn profile not found
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
  securitySchemes:
    defaultApiKey:
      type: apiKey
      in: header
      name: X-API-KEY

````