# Enrich a post

Fetch one LinkedIn post by URL: full text plus live engagement.

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

**Credits:** 1 credit - **Mode:** synchronous

Identify the post with `url` or `urn`; provide exactly one.

> **Info:** Send many as batch items at 1 credit each. See the [batch endpoint](https://up2data.ai/docs/v1/api/batch-create/).

## Request

| Field | Type | Notes |
|---|---|---|
| `url` | `string` | Public post URL. Provide url or urn. |
| `urn` | `string` | Post activity URN (numeric). Preferred when available. Provide url or urn. |

## Call it

**cURL**

```bash
curl -X POST "https://api.up2data.ai/v1/posts/enrich" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "url": "https://linkedin.com/posts/ceo_launch-activity-7215"
}'
```

**Python**

```python
import requests

url = "https://api.up2data.ai/v1/posts/enrich"
headers = {
    "X-API-Key": "YOUR_API_KEY",
    "Content-Type": "application/json",
}
payload = {
    "url": "https://linkedin.com/posts/ceo_launch-activity-7215"
}

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

**Node**

```javascript
const url = "https://api.up2data.ai/v1/posts/enrich";
const headers = {
  "X-API-Key": "YOUR_API_KEY",
  "Content-Type": "application/json",
};
const body = {
  "url": "https://linkedin.com/posts/ceo_launch-activity-7215"
};

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/enrich"
	body := bytes.NewBufferString(`{
  "url": "https://linkedin.com/posts/ceo_launch-activity-7215"
}`)
	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": {
    "url": "https://linkedin.com/posts/ceo_launch-activity-7215",
    "urn": "7267273010393358336",
    "share_urn": "urn:li:share:7315779815297421316",
    "author": { "name": "Jane Doe", "url": "https://www.linkedin.com/in/janedoe?miniProfileUrn=urn%3Ali%3Afsd_profile%3AACoAABOPHB8BM6example", "headline": "CEO at Example" },
    "text": "Today we're launching...",
    "posted_at": "2026-07-06T18:45:00Z",
    "reactions_count": 1204,
    "comments_count": 187,
    "reposts_count": 96,
    "scraped_at": "2026-07-07T14:00:02Z",
    "media": [{ "type": "image", "url": "https://media.licdn.com/..." }]
  },
  "meta": { "creditsUsed": 1, "creditsRemaining": 98418, "billed": true, "reason": "post_found", "requestId": "req_pe73mm1q", "latencyMs": 2100 }
}
```

## Errors

| Status | Type | When | Billed |
|---|---|---|---|
| 400 | `invalid_request` | Malformed body, unknown field, or bad URL format. | No |
| 401 | `invalid_api_key` | Missing, malformed, or revoked key. | No |
| 402 | `insufficient_credits` | Balance can't cover the call. | No |
| 422 | `unprocessable_target` | Target not found, private, deleted, or unreachable. | 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.
