# Get post comments

Inbound engagement on a post - who commented, with profile stubs.

**POST** `https://api.up2data.ai/v1/posts/engagement/comments`

**Credits:** 1 credit per returned comment - **Mode:** synchronous

Identify the post with `urn` (preferred, from search, enrich, or profile activity results) or `url`. Comments come back newest first. Each page is a live scrape; follow `pagination_token` for the next page.

> **Info:** Inbound engagement on a post. For what a profile commented on elsewhere, use [profile activity](https://up2data.ai/docs/v1/api/profiles-activity/) - that is a separate scrape.

> **Info:** Send many as batch operation items (operation posts.engagement.comments); up to 1,000 comments per item. See the [batch endpoint](https://up2data.ai/docs/v1/api/batch-create/).

## Request

| Field | Type | Notes |
|---|---|---|
| `urn` | `string` | Post activity URN (numeric). Preferred over url. Provide url or urn. |
| `url` | `string` | Public post URL. Provide url or urn. |
| `share_urn` | `string` | Share URN - pass when paginating if returned by a prior page. |
| `page` | `integer` | Default 1. |
| `per_page` | `integer` | Default 25. 1 to 25. |
| `max_results` | `integer` | Caps how many items the first page returns. Defaults to per_page. |
| `pagination_token` | `string` | Required for pages after the first, when returned by a prior response. |

## Call it

**cURL**

```bash
curl -X POST "https://api.up2data.ai/v1/posts/engagement/comments" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "urn": "7267273010393358336",
  "page": 1
}'
```

**Python**

```python
import requests

url = "https://api.up2data.ai/v1/posts/engagement/comments"
headers = {
    "X-API-Key": "YOUR_API_KEY",
    "Content-Type": "application/json",
}
payload = {
    "urn": "7267273010393358336",
    "page": 1
}

response = requests.post(url, headers=headers, json=payload)
print(response.json())
```

**Node**

```javascript
const url = "https://api.up2data.ai/v1/posts/engagement/comments";
const headers = {
  "X-API-Key": "YOUR_API_KEY",
  "Content-Type": "application/json",
};
const body = {
  "urn": "7267273010393358336",
  "page": 1
};

const response = await fetch(url, {
  method: "POST",
  headers,
  body: JSON.stringify(body),
});
const data = await response.json();
console.log(data);
```

**Go**

```go
package main

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

func main() {
	url := "https://api.up2data.ai/v1/posts/engagement/comments"
	body := bytes.NewBufferString(`{
  "urn": "7267273010393358336",
  "page": 1
}`)
	req, err := http.NewRequest("POST", url, body)
	if err != nil {
		panic(err)
	}
	req.Header.Set("X-API-Key", "YOUR_API_KEY")
	req.Header.Set("Content-Type", "application/json")

	client := &http.Client{}
	resp, err := client.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()

	respBody, _ := io.ReadAll(resp.Body)
	fmt.Println(string(respBody))
}
```

## Response

**200**

```json
{
  "data": {
    "comments": [{
      "text": "Great insights on automation!",
      "posted_at": "2026-07-06T19:02:00Z",
      "commenter": { "url": "https://linkedin.com/in/janedoe", "full_name": "Jane Doe", "headline": "VP Marketing at Acme Corp", "urn": "ACoAABOPHB8BM6example" },
      "replies_count": 2
    }],
    "pagination": { "returned": 1, "max_results": 25, "pages_scraped": 1, "page": 1, "per_page": 25, "has_more": true, "total_estimate": 93 },
    "pagination_token": "eyJwYWdlIjoyfQ.signature",
    "urn": "7267273010393358336",
    "share_urn": "7267273010393358336"
  },
  "meta": { "creditsUsed": 1, "creditsRemaining": 98419, "billed": true, "reason": "success", "requestId": "req_example", "latencyMs": 2100 }
}
```

## Errors

| Status | Type | When | Billed |
|---|---|---|---|
| 400 | `invalid_request` | Malformed body, unknown field, bad URL format, or a pagination_token that does not match the request. | No |
| 401 | `invalid_api_key` | Missing, malformed, or revoked key. | No |
| 402 | `insufficient_credits` | Balance can't cover a full page. | No |
| 422 | `unprocessable_target` | Post not found, private, deleted, or unreachable. Billed as 1 credit. | Yes |
| 429 | `rate_limited` | Over the 300 requests/min per-key limit. Honor Retry-After. | No |
| 500 | `internal_error` | Something broke on the server side. | No |
| 504 | `upstream_timeout` | The live scrape didn't complete in time. | No |

See the [Errors guide](https://up2data.ai/docs/v1/guides/errors/) for every error type this version can return.
