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

# Get Post's Comments

> - Get comments of a post. 

 - 1 credit per call.

```bash cURL theme={null}
curl --request GET \
	--url 'https://live-fetch.p.rapidapi.com/get-post-comments?urn=7267273010393358336&share_urn=7315779815297421316&sort_by=Most+relevant&page=1' \
	--header 'x-rapidapi-host: live-fetch.p.rapidapi.com' \
	--header 'x-rapidapi-key: YOUR_RAPIDAPI_KEY'
```

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

url = "https://live-fetch.p.rapidapi.com/get-post-comments"

querystring = {
    "urn": "7267273010393358336",
    "share_urn": "7315779815297421316",
    "sort_by": "Most relevant",
    "page": "1"
}

headers = {
    "x-rapidapi-key": "YOUR_RAPIDAPI_KEY",
    "x-rapidapi-host": "live-fetch.p.rapidapi.com"
}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript JavaScript theme={null}
const params = new URLSearchParams({
	urn: "7267273010393358336",
	share_urn: "7315779815297421316",
	sort_by: "Most relevant",
	page: "1"
});

const url = `https://live-fetch.p.rapidapi.com/get-post-comments?${params}`;
const options = {
	method: 'GET',
	headers: {
		'x-rapidapi-key': 'YOUR_RAPIDAPI_KEY',
		'x-rapidapi-host': 'live-fetch.p.rapidapi.com'
	}
};

try {
	const response = await fetch(url, options);
	const result = await response.json();
	console.log(result);
} catch (error) {
	console.error(error);
}
```

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

$query = http_build_query([
	'urn' => "7267273010393358336",
	'share_urn' => "7315779815297421316",
	'sort_by' => "Most relevant",
	'page' => "1"
]);

$curl = curl_init();

curl_setopt_array($curl, [
	CURLOPT_URL => "https://live-fetch.p.rapidapi.com/get-post-comments" . "?" . $query,
	CURLOPT_RETURNTRANSFER => true,
	CURLOPT_CUSTOMREQUEST => "GET",
	CURLOPT_HTTPHEADER => [
		"x-rapidapi-host: live-fetch.p.rapidapi.com",
		"x-rapidapi-key: YOUR_RAPIDAPI_KEY"
	],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
	echo "cURL Error #:" . $err;
} else {
	echo $response;
}
```

```go Go theme={null}
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
)

func main() {
	params := url.Values{}
	params.Add("urn", "7267273010393358336")
	params.Add("share_urn", "7315779815297421316")
	params.Add("sort_by", "Most relevant")
	params.Add("page", "1")

	req, _ := http.NewRequest("GET", "https://live-fetch.p.rapidapi.com/get-post-comments?"+params.Encode(), nil)

	req.Header.Add("x-rapidapi-key", "YOUR_RAPIDAPI_KEY")
	req.Header.Add("x-rapidapi-host", "live-fetch.p.rapidapi.com")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))
}
```

```java Java theme={null}
HttpRequest request = HttpRequest.newBuilder()
		.uri(URI.create("https://live-fetch.p.rapidapi.com/get-post-comments?urn=7267273010393358336&share_urn=7315779815297421316&sort_by=Most+relevant&page=1"))
		.header("x-rapidapi-key", "YOUR_RAPIDAPI_KEY")
		.header("x-rapidapi-host", "live-fetch.p.rapidapi.com")
		.method("GET", HttpRequest.BodyPublishers.noBody())
		.build();
HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
```


## OpenAPI

````yaml GET /get-post-comments
openapi: 3.0.1
info:
  title: OpenAPI Plant Store
  description: >-
    A sample API that uses a plant store as an example to demonstrate features
    in the OpenAPI specification
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://live-fetch.p.rapidapi.com
security:
  - ApiKeyAuth: []
paths:
  /get-post-comments:
    get:
      description: |-
        - Get comments of a post. 

         - 1 credit per call.
      parameters:
        - name: urn
          in: query
          description: The URN of the post. Either urn or share_urn is required.
          required: false
          schema:
            type: string
            default: '7267273010393358336'
        - name: share_urn
          in: query
          description: The share URN of the post. Can be used as an alternative to urn.
          required: false
          schema:
            type: string
            default: '7315779815297421316'
        - name: sort_by
          in: query
          required: false
          description: >-
            Default value: Most relevant. Possible values: Most relevant, Most
            recent.
          schema:
            type: string
            enum:
              - Most relevant
              - Most recent
            default: Most relevant
        - name: page
          in: query
          required: false
          description: ''
          schema:
            type: integer
            default: 1
        - name: pagination_token
          in: query
          required: false
          description: >-
            Required when fetching the next result page with sort_by=Most
            relevant. Use the token from the result of your previous call. Not
            needed when sort_by=Most recent — use the page parameter instead to
            get subsequent pages.
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostComments'
        '400':
          description: 'Bad request: Invalid urn.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    nullable: true
                    example: null
                  message:
                    type: string
                    example: 'Bad request: Invalid urn.'
        '503':
          description: System error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SystemError'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    PostComments:
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              annotation:
                type: string
                nullable: true
                example: null
              commenter:
                type: object
                properties:
                  headline:
                    type: string
                    example: >-
                      Procurement | Certified Functional Analyst | Product
                      Design & Engineering
                  linkedin_url:
                    type: string
                    format: uri
                    example: https://www.linkedin.com/in/ssgoh
                  name:
                    type: string
                    example: Goh Swee Siong
                  image_url:
                    type: string
                    example: >-
                      https://media.licdn.com/dms/image/v2/D5603AQEJqtVUnnxbnw/profile-displayphoto-shrink_100_100/B56ZNp39shGkAU-/0/1732648099135?e=1795651200&v=beta&t=P2OvtIPapb1SZLkkX68xllUq8_IF5C5VRrFVvPGBT3c
                  urn:
                    type: string
                    example: ACoAAAVRCsEBuy-uzvc61779lB-qNXG8crFwka8
              created_at:
                type: integer
                example: 1732656234066
              created_datetime:
                type: string
                example: 11/26/2024, 1:23:54 PM
              permalink:
                type: string
                format: uri
                example: >-
                  https://www.linkedin.com/feed/update/urn:li:activity:7267273010393358336?commentUrn=urn%3Ali%3Acomment%3A%28activity%3A7267273010393358336%2C7267286973164187649%29&dashCommentUrn=urn%3Ali%3Afsd_comment%3A%287267286973164187649%2Curn%3Ali%3Aactivity%3A7267273010393358336%29
              pinned:
                type: boolean
                example: false
              replies:
                type: array
                items: {}
              text:
                type: string
                example: >-
                  This happened all the time in high performance culture
                  nowadays. Nothing new. As the doer, we need to seek
                  clarification and pin down to do or not to do even at the
                  expense of irking the manager.
              thread_urn:
                type: string
                nullable: true
                example: null
        message:
          type: string
          example: ok
        pagination_token:
          type: string
          example: 1388203668-1733209092407-fec4cb84fb5d80c384f61dba04a4f290
        total:
          type: integer
          example: 10
      required:
        - data
        - message
        - pagination_token
        - total
    SystemError:
      type: object
      properties:
        data:
          type: object
          nullable: true
          example: null
        message:
          type: string
          example: >-
            System error. You will not be charged for this request. We will fix
            it soon!
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-rapidapi-key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.