Search Posts
curl --request POST \
--url https://api.linkupapi.com/v1/posts/search \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '
{
"post_type": "<string>",
"sort_by": "<string>",
"country": "<string>",
"keyword": "<string>",
"post_date": "<string>",
"linkedin_url": "<string>",
"total_results": 123,
"start_page": 123,
"end_page": 123,
"login_token": "<string>"
}
'import requests
url = "https://api.linkupapi.com/v1/posts/search"
payload = {
"post_type": "<string>",
"sort_by": "<string>",
"country": "<string>",
"keyword": "<string>",
"post_date": "<string>",
"linkedin_url": "<string>",
"total_results": 123,
"start_page": 123,
"end_page": 123,
"login_token": "<string>"
}
headers = {
"x-api-key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
post_type: '<string>',
sort_by: '<string>',
country: '<string>',
keyword: '<string>',
post_date: '<string>',
linkedin_url: '<string>',
total_results: 123,
start_page: 123,
end_page: 123,
login_token: '<string>'
})
};
fetch('https://api.linkupapi.com/v1/posts/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.linkupapi.com/v1/posts/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'post_type' => '<string>',
'sort_by' => '<string>',
'country' => '<string>',
'keyword' => '<string>',
'post_date' => '<string>',
'linkedin_url' => '<string>',
'total_results' => 123,
'start_page' => 123,
'end_page' => 123,
'login_token' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.linkupapi.com/v1/posts/search"
payload := strings.NewReader("{\n \"post_type\": \"<string>\",\n \"sort_by\": \"<string>\",\n \"country\": \"<string>\",\n \"keyword\": \"<string>\",\n \"post_date\": \"<string>\",\n \"linkedin_url\": \"<string>\",\n \"total_results\": 123,\n \"start_page\": 123,\n \"end_page\": 123,\n \"login_token\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.linkupapi.com/v1/posts/search")
.header("x-api-key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"post_type\": \"<string>\",\n \"sort_by\": \"<string>\",\n \"country\": \"<string>\",\n \"keyword\": \"<string>\",\n \"post_date\": \"<string>\",\n \"linkedin_url\": \"<string>\",\n \"total_results\": 123,\n \"start_page\": 123,\n \"end_page\": 123,\n \"login_token\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.linkupapi.com/v1/posts/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"post_type\": \"<string>\",\n \"sort_by\": \"<string>\",\n \"country\": \"<string>\",\n \"keyword\": \"<string>\",\n \"post_date\": \"<string>\",\n \"linkedin_url\": \"<string>\",\n \"total_results\": 123,\n \"start_page\": 123,\n \"end_page\": 123,\n \"login_token\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"total_results": 1,
"pagination": {
"start_page": 1,
"end_page": 1,
"results_per_page": 50,
"pages_fetched": 1
},
"posts": [
{
"shareAudience": "PUBLIC",
"shareUrl": "https://www.linkedin.com/posts/user_post-activity-123",
"text": "Example post content",
"created_time": "2023-04-01T12:00:00",
"numLikes": 50,
"numComments": 10,
"numShares": 5,
"actor_name": "John Doe",
"actor_description": "Software Engineer at Tech Company",
"actor_image": "https://media.licdn.com/dms/image/profile.jpg",
"actor_profile_url": "https://www.linkedin.com/in/johndoe",
"post_images": [
"https://media.licdn.com/dms/image/post1.jpg"
]
}
]
}
}
Content & Posts
Search Posts
Extract and search LinkedIn posts with various filters
POST
/
v1
/
posts
/
search
Search Posts
curl --request POST \
--url https://api.linkupapi.com/v1/posts/search \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '
{
"post_type": "<string>",
"sort_by": "<string>",
"country": "<string>",
"keyword": "<string>",
"post_date": "<string>",
"linkedin_url": "<string>",
"total_results": 123,
"start_page": 123,
"end_page": 123,
"login_token": "<string>"
}
'import requests
url = "https://api.linkupapi.com/v1/posts/search"
payload = {
"post_type": "<string>",
"sort_by": "<string>",
"country": "<string>",
"keyword": "<string>",
"post_date": "<string>",
"linkedin_url": "<string>",
"total_results": 123,
"start_page": 123,
"end_page": 123,
"login_token": "<string>"
}
headers = {
"x-api-key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
post_type: '<string>',
sort_by: '<string>',
country: '<string>',
keyword: '<string>',
post_date: '<string>',
linkedin_url: '<string>',
total_results: 123,
start_page: 123,
end_page: 123,
login_token: '<string>'
})
};
fetch('https://api.linkupapi.com/v1/posts/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.linkupapi.com/v1/posts/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'post_type' => '<string>',
'sort_by' => '<string>',
'country' => '<string>',
'keyword' => '<string>',
'post_date' => '<string>',
'linkedin_url' => '<string>',
'total_results' => 123,
'start_page' => 123,
'end_page' => 123,
'login_token' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.linkupapi.com/v1/posts/search"
payload := strings.NewReader("{\n \"post_type\": \"<string>\",\n \"sort_by\": \"<string>\",\n \"country\": \"<string>\",\n \"keyword\": \"<string>\",\n \"post_date\": \"<string>\",\n \"linkedin_url\": \"<string>\",\n \"total_results\": 123,\n \"start_page\": 123,\n \"end_page\": 123,\n \"login_token\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.linkupapi.com/v1/posts/search")
.header("x-api-key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"post_type\": \"<string>\",\n \"sort_by\": \"<string>\",\n \"country\": \"<string>\",\n \"keyword\": \"<string>\",\n \"post_date\": \"<string>\",\n \"linkedin_url\": \"<string>\",\n \"total_results\": 123,\n \"start_page\": 123,\n \"end_page\": 123,\n \"login_token\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.linkupapi.com/v1/posts/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"post_type\": \"<string>\",\n \"sort_by\": \"<string>\",\n \"country\": \"<string>\",\n \"keyword\": \"<string>\",\n \"post_date\": \"<string>\",\n \"linkedin_url\": \"<string>\",\n \"total_results\": 123,\n \"start_page\": 123,\n \"end_page\": 123,\n \"login_token\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"total_results": 1,
"pagination": {
"start_page": 1,
"end_page": 1,
"results_per_page": 50,
"pages_fetched": 1
},
"posts": [
{
"shareAudience": "PUBLIC",
"shareUrl": "https://www.linkedin.com/posts/user_post-activity-123",
"text": "Example post content",
"created_time": "2023-04-01T12:00:00",
"numLikes": 50,
"numComments": 10,
"numShares": 5,
"actor_name": "John Doe",
"actor_description": "Software Engineer at Tech Company",
"actor_image": "https://media.licdn.com/dms/image/profile.jpg",
"actor_profile_url": "https://www.linkedin.com/in/johndoe",
"post_images": [
"https://media.licdn.com/dms/image/post1.jpg"
]
}
]
}
}
Search and extract LinkedIn posts with advanced filtering options including post type, sorting, keywords, and date filters.
Credit Usage: 1 credit per 10 results (or fraction thereof). For example:
- 1-10 results = 1 credit
- 11-20 results = 2 credits
- 300 results = 30 credits
Header Parameters
string
required
Your API key
Body Parameters
string
Type of posts to search for: “photos” or “jobs” or “videos”
string
default:"date_posted"
How to sort the results: “date_posted” or “relevance”
string
default:"FR"
Country code for proxy selection. Available: (US, UK, FR, DE, NL, IT, IL, CA, BR, ES, IN)
string
Search keyword for posts
string
Filter posts by date: “past-24h” or “past-week” or “past-month”
string
LinkedIn profile URL to extract posts from
integer
default:"10"
Number of posts to retrieve (used when not in pagination mode)
integer
First page to fetch when using pagination mode (default: 1)
integer
Last page to fetch when using pagination mode (default: same as start_page)
string
required
LinkedIn authentication cookie obtained from the login/verify process
Response
string
Request status (success/error)
object
Show Properties
Show Properties
integer
Number of posts returned
object
array
Show Post Object
Show Post Object
string
Visibility of the post (e.g., “PUBLIC”)
string
URL of the post
string
Content of the post
string
Timestamp when the post was created
integer
Number of likes on the post
integer
Number of comments on the post
integer
Number of shares of the post
string
Name of the post author
string
Description/headline of the post author
string
Profile image URL of the post author
string
LinkedIn profile URL of the post author
array
Array of image URLs included in the post
{
"status": "success",
"data": {
"total_results": 1,
"pagination": {
"start_page": 1,
"end_page": 1,
"results_per_page": 50,
"pages_fetched": 1
},
"posts": [
{
"shareAudience": "PUBLIC",
"shareUrl": "https://www.linkedin.com/posts/user_post-activity-123",
"text": "Example post content",
"created_time": "2023-04-01T12:00:00",
"numLikes": 50,
"numComments": 10,
"numShares": 5,
"actor_name": "John Doe",
"actor_description": "Software Engineer at Tech Company",
"actor_image": "https://media.licdn.com/dms/image/profile.jpg",
"actor_profile_url": "https://www.linkedin.com/in/johndoe",
"post_images": [
"https://media.licdn.com/dms/image/post1.jpg"
]
}
]
}
}
Notes
- Images URLs are direct links to LinkedIn’s media servers
- Text content has special characters normalized
- Social metrics (likes, comments, shares) are included when available
- Post visibility information is included
- Results are paginated with a maximum of 50 posts per page
- Pagination Mode vs. Total Results Mode:
- Total Results Mode: Use the
total_resultsparameter to specify how many posts you want (default) - Pagination Mode: Use
start_pageandend_pageparameters to fetch specific pages of results - Credit usage in pagination mode is based on the number of pages fetched (1 credit per page)
- When using pagination mode,
total_resultsparameter is ignored
- Total Results Mode: Use the
- The API supports:
- Multiple filtering options
- Custom sort orders
- Keyword search
- Date-based filtering
- Profile-specific post extraction
- Post content may be limited based on:
- Privacy settings
- Network connection level
- Content visibility settings
Was this page helpful?