Enqueue posts by URL
Scrape individual LinkedIn posts from their own permalinks.
https://api.up2data.ai/api/open-refresh/post-by-urlScrape individual LinkedIn posts from their own permalinks - the post does not have to belong to a profile you have ever enriched. Both LinkedIn post URL shapes are accepted: linkedin.com/feed/update/urn:li:activity:<id> (raw or URL-encoded, and share and ugcPost URNs work the same way) and linkedin.com/posts/<slug>, whose slug ends in the post id. Query strings and trailing slashes are stripped for you.
Ensure you have sufficient credits before making requests - see the credit pill above.
De-duplication is on the post itself, not on the string you sent: the same post submitted twice through two different URL shapes is charged once and counted under skipped.duplicates. A URL with no readable post id counts as skipped.invalid.
A post-by-url queue's results belong to the queue itself. Read them back with queues-list or wait for the webhook callback, and see PostByUrl for the shape.
#Request
| Field | Type | Notes |
|---|---|---|
postsrequired | string[] | LinkedIn post URLs. |
name | string | Optional. |
priority | number | Optional, 1 = High, 2 = Normal, 3 = Low, defaults to 2. |
webhookTags | string[] | Optional, defaults to every webhook on the team. Send [] to switch callbacks off - see the Webhooks guide. |
#Call it
curl -X POST "https://api.up2data.ai/api/open-refresh/post-by-url" \
-H "Authorization: YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Competitor Launch Posts",
"posts": [
"https://www.linkedin.com/feed/update/urn:li:activity:7245678901234567890",
"https://www.linkedin.com/posts/johndoe_were-hiring-activity-7245678901234567891-Ab1c",
"https://www.linkedin.com/feed/update/urn%3Ali%3Ashare%3A7245678901234567892"
],
"priority": 2
}'import requests
url = "https://api.up2data.ai/api/open-refresh/post-by-url"
headers = {
"Authorization": "YOUR_ACCESS_TOKEN",
"Content-Type": "application/json",
}
payload = {
"name": "Competitor Launch Posts",
"posts": [
"https://www.linkedin.com/feed/update/urn:li:activity:7245678901234567890",
"https://www.linkedin.com/posts/johndoe_were-hiring-activity-7245678901234567891-Ab1c",
"https://www.linkedin.com/feed/update/urn%3Ali%3Ashare%3A7245678901234567892"
],
"priority": 2
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())const url = "https://api.up2data.ai/api/open-refresh/post-by-url";
const headers = {
"Authorization": "YOUR_ACCESS_TOKEN",
"Content-Type": "application/json",
};
const body = {
"name": "Competitor Launch Posts",
"posts": [
"https://www.linkedin.com/feed/update/urn:li:activity:7245678901234567890",
"https://www.linkedin.com/posts/johndoe_were-hiring-activity-7245678901234567891-Ab1c",
"https://www.linkedin.com/feed/update/urn%3Ali%3Ashare%3A7245678901234567892"
],
"priority": 2
};
const response = await fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
});
const data = await response.json();
console.log(data);package main
import (
"bytes"
"fmt"
"io"
"net/http"
)
func main() {
url := "https://api.up2data.ai/api/open-refresh/post-by-url"
body := bytes.NewBufferString(`{
"name": "Competitor Launch Posts",
"posts": [
"https://www.linkedin.com/feed/update/urn:li:activity:7245678901234567890",
"https://www.linkedin.com/posts/johndoe_were-hiring-activity-7245678901234567891-Ab1c",
"https://www.linkedin.com/feed/update/urn%3Ali%3Ashare%3A7245678901234567892"
],
"priority": 2
}`)
req, err := http.NewRequest("POST", url, body)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "YOUR_ACCESS_TOKEN")
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
{
"message": "3 post-by-url items have been enqueued (3 credits).",
"queueId": "507f1f77bcf86cd799439011",
"enqueued": 3,
"skipped": {
"invalid": 0,
"duplicates": 0
},
"webhooks": [
{
"_id": "6512c1a4f1b2c3d4e5f60789",
"name": "Production",
"url": "https://api.example.com/hooks/up2data"
}
]
}{
"message": "No valid post urls to enqueue: of 4 submitted, 1 were invalid and 3 were duplicates."
}#Webhook payload
{
"queueId": "507f1f77bcf86cd799439011",
"name": "Competitor Launch Posts",
"url": "https://www.linkedin.com/feed/update/urn:li:activity:7245678901234567890",
"type": "PostByUrl",
"status": 200,
"_id": "8f14e45fceea167a5a36dedd4bea254a",
"result": { ... }
}#Errors
| Status | Type | When |
|---|---|---|
| 400 | No valid post urls to enqueue | Every entry in posts was invalid or a duplicate after normalization, so no queue was created. |
| 400 | No webhook matches webhookTags | One or more webhookTags do not match any webhook on the team. |
See the Errors guide for every error type this version can return.