cURL
curl --request POST \
--url https://web-scraping-api2.p.rapidapi.com/search-posts \
--header 'Content-Type: application/json' \
--header 'x-rapidapi-key: <api-key>' \
--data '
{
"search_keywords": "marketing",
"sort_by": "Top match",
"date_posted": "Past week",
"content_type": "Images",
"from_member": [
"ACoAAAGafwYBi3pXOoVVwIyAFc453DuIv50jfTA"
],
"from_company": [
1035,
1586
],
"mentioning_member": [
"ACoAAAGafwYBi3pXOoVVwIyAFc453DuIv50jfTA"
],
"mentioning_company": [
1035,
1586
],
"author_company": [
1035,
1586
],
"author_industry": [
3,
4
],
"author_keyword": "marketing manager",
"page": 1
}
'import requests
url = "https://web-scraping-api2.p.rapidapi.com/search-posts"
payload = {
"search_keywords": "marketing",
"sort_by": "Top match",
"date_posted": "Past week",
"content_type": "Images",
"from_member": ["ACoAAAGafwYBi3pXOoVVwIyAFc453DuIv50jfTA"],
"from_company": [1035, 1586],
"mentioning_member": ["ACoAAAGafwYBi3pXOoVVwIyAFc453DuIv50jfTA"],
"mentioning_company": [1035, 1586],
"author_company": [1035, 1586],
"author_industry": [3, 4],
"author_keyword": "marketing manager",
"page": 1
}
headers = {
"x-rapidapi-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-rapidapi-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
search_keywords: 'marketing',
sort_by: 'Top match',
date_posted: 'Past week',
content_type: 'Images',
from_member: ['ACoAAAGafwYBi3pXOoVVwIyAFc453DuIv50jfTA'],
from_company: [1035, 1586],
mentioning_member: ['ACoAAAGafwYBi3pXOoVVwIyAFc453DuIv50jfTA'],
mentioning_company: [1035, 1586],
author_company: [1035, 1586],
author_industry: [3, 4],
author_keyword: 'marketing manager',
page: 1
})
};
fetch('https://web-scraping-api2.p.rapidapi.com/search-posts', 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://web-scraping-api2.p.rapidapi.com/search-posts",
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([
'search_keywords' => 'marketing',
'sort_by' => 'Top match',
'date_posted' => 'Past week',
'content_type' => 'Images',
'from_member' => [
'ACoAAAGafwYBi3pXOoVVwIyAFc453DuIv50jfTA'
],
'from_company' => [
1035,
1586
],
'mentioning_member' => [
'ACoAAAGafwYBi3pXOoVVwIyAFc453DuIv50jfTA'
],
'mentioning_company' => [
1035,
1586
],
'author_company' => [
1035,
1586
],
'author_industry' => [
3,
4
],
'author_keyword' => 'marketing manager',
'page' => 1
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-rapidapi-key: <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://web-scraping-api2.p.rapidapi.com/search-posts"
payload := strings.NewReader("{\n \"search_keywords\": \"marketing\",\n \"sort_by\": \"Top match\",\n \"date_posted\": \"Past week\",\n \"content_type\": \"Images\",\n \"from_member\": [\n \"ACoAAAGafwYBi3pXOoVVwIyAFc453DuIv50jfTA\"\n ],\n \"from_company\": [\n 1035,\n 1586\n ],\n \"mentioning_member\": [\n \"ACoAAAGafwYBi3pXOoVVwIyAFc453DuIv50jfTA\"\n ],\n \"mentioning_company\": [\n 1035,\n 1586\n ],\n \"author_company\": [\n 1035,\n 1586\n ],\n \"author_industry\": [\n 3,\n 4\n ],\n \"author_keyword\": \"marketing manager\",\n \"page\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-rapidapi-key", "<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://web-scraping-api2.p.rapidapi.com/search-posts")
.header("x-rapidapi-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"search_keywords\": \"marketing\",\n \"sort_by\": \"Top match\",\n \"date_posted\": \"Past week\",\n \"content_type\": \"Images\",\n \"from_member\": [\n \"ACoAAAGafwYBi3pXOoVVwIyAFc453DuIv50jfTA\"\n ],\n \"from_company\": [\n 1035,\n 1586\n ],\n \"mentioning_member\": [\n \"ACoAAAGafwYBi3pXOoVVwIyAFc453DuIv50jfTA\"\n ],\n \"mentioning_company\": [\n 1035,\n 1586\n ],\n \"author_company\": [\n 1035,\n 1586\n ],\n \"author_industry\": [\n 3,\n 4\n ],\n \"author_keyword\": \"marketing manager\",\n \"page\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://web-scraping-api2.p.rapidapi.com/search-posts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-rapidapi-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"search_keywords\": \"marketing\",\n \"sort_by\": \"Top match\",\n \"date_posted\": \"Past week\",\n \"content_type\": \"Images\",\n \"from_member\": [\n \"ACoAAAGafwYBi3pXOoVVwIyAFc453DuIv50jfTA\"\n ],\n \"from_company\": [\n 1035,\n 1586\n ],\n \"mentioning_member\": [\n \"ACoAAAGafwYBi3pXOoVVwIyAFc453DuIv50jfTA\"\n ],\n \"mentioning_company\": [\n 1035,\n 1586\n ],\n \"author_company\": [\n 1035,\n 1586\n ],\n \"author_industry\": [\n 3,\n 4\n ],\n \"author_keyword\": \"marketing manager\",\n \"page\": 1\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"post_type": "photo",
"post_url": "https://www.linkedin.com/feed/update/urn:li:activity:7206932158031003648/",
"posted": "2024-06-13 08:15:24",
"poster_name": "Ron Bar El",
"urn": "7206932158031003648",
"num_comments": null,
"num_likes": null,
"num_shares": null,
"poster_linkedin_url": "https://www.linkedin.com/in/ACoAAAJcHacBGQdA-cxEAGl5Q1swIHXwixZMAK4?miniProfileUrn=urn%3Ali%3Afs_miniProfile%3AACoAAAJcHacBGQdA-cxEAGl5Q1swIHXwixZMAK4",
"poster_title": "Chief TechStoryteller Officer | Founder of turba, Tech storytelling & Brand strategy agency | Speaker",
"text": "The #AI #Narrative War: Beyond the technological battle for AI supremacy among the tech giants..."
}
],
"message": "ok",
"total": 397
}{
"data": null,
"message": "Bad request: Invalid payload."
}{
"data": null,
"message": "System error. We will fix it soon!"
}Post Data
Search Posts
-
Simulates LinkedIn’s Post Search Function with most important filters.
-
2 credits per call.
POST
/
search-posts
cURL
curl --request POST \
--url https://web-scraping-api2.p.rapidapi.com/search-posts \
--header 'Content-Type: application/json' \
--header 'x-rapidapi-key: <api-key>' \
--data '
{
"search_keywords": "marketing",
"sort_by": "Top match",
"date_posted": "Past week",
"content_type": "Images",
"from_member": [
"ACoAAAGafwYBi3pXOoVVwIyAFc453DuIv50jfTA"
],
"from_company": [
1035,
1586
],
"mentioning_member": [
"ACoAAAGafwYBi3pXOoVVwIyAFc453DuIv50jfTA"
],
"mentioning_company": [
1035,
1586
],
"author_company": [
1035,
1586
],
"author_industry": [
3,
4
],
"author_keyword": "marketing manager",
"page": 1
}
'import requests
url = "https://web-scraping-api2.p.rapidapi.com/search-posts"
payload = {
"search_keywords": "marketing",
"sort_by": "Top match",
"date_posted": "Past week",
"content_type": "Images",
"from_member": ["ACoAAAGafwYBi3pXOoVVwIyAFc453DuIv50jfTA"],
"from_company": [1035, 1586],
"mentioning_member": ["ACoAAAGafwYBi3pXOoVVwIyAFc453DuIv50jfTA"],
"mentioning_company": [1035, 1586],
"author_company": [1035, 1586],
"author_industry": [3, 4],
"author_keyword": "marketing manager",
"page": 1
}
headers = {
"x-rapidapi-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-rapidapi-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
search_keywords: 'marketing',
sort_by: 'Top match',
date_posted: 'Past week',
content_type: 'Images',
from_member: ['ACoAAAGafwYBi3pXOoVVwIyAFc453DuIv50jfTA'],
from_company: [1035, 1586],
mentioning_member: ['ACoAAAGafwYBi3pXOoVVwIyAFc453DuIv50jfTA'],
mentioning_company: [1035, 1586],
author_company: [1035, 1586],
author_industry: [3, 4],
author_keyword: 'marketing manager',
page: 1
})
};
fetch('https://web-scraping-api2.p.rapidapi.com/search-posts', 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://web-scraping-api2.p.rapidapi.com/search-posts",
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([
'search_keywords' => 'marketing',
'sort_by' => 'Top match',
'date_posted' => 'Past week',
'content_type' => 'Images',
'from_member' => [
'ACoAAAGafwYBi3pXOoVVwIyAFc453DuIv50jfTA'
],
'from_company' => [
1035,
1586
],
'mentioning_member' => [
'ACoAAAGafwYBi3pXOoVVwIyAFc453DuIv50jfTA'
],
'mentioning_company' => [
1035,
1586
],
'author_company' => [
1035,
1586
],
'author_industry' => [
3,
4
],
'author_keyword' => 'marketing manager',
'page' => 1
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-rapidapi-key: <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://web-scraping-api2.p.rapidapi.com/search-posts"
payload := strings.NewReader("{\n \"search_keywords\": \"marketing\",\n \"sort_by\": \"Top match\",\n \"date_posted\": \"Past week\",\n \"content_type\": \"Images\",\n \"from_member\": [\n \"ACoAAAGafwYBi3pXOoVVwIyAFc453DuIv50jfTA\"\n ],\n \"from_company\": [\n 1035,\n 1586\n ],\n \"mentioning_member\": [\n \"ACoAAAGafwYBi3pXOoVVwIyAFc453DuIv50jfTA\"\n ],\n \"mentioning_company\": [\n 1035,\n 1586\n ],\n \"author_company\": [\n 1035,\n 1586\n ],\n \"author_industry\": [\n 3,\n 4\n ],\n \"author_keyword\": \"marketing manager\",\n \"page\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-rapidapi-key", "<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://web-scraping-api2.p.rapidapi.com/search-posts")
.header("x-rapidapi-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"search_keywords\": \"marketing\",\n \"sort_by\": \"Top match\",\n \"date_posted\": \"Past week\",\n \"content_type\": \"Images\",\n \"from_member\": [\n \"ACoAAAGafwYBi3pXOoVVwIyAFc453DuIv50jfTA\"\n ],\n \"from_company\": [\n 1035,\n 1586\n ],\n \"mentioning_member\": [\n \"ACoAAAGafwYBi3pXOoVVwIyAFc453DuIv50jfTA\"\n ],\n \"mentioning_company\": [\n 1035,\n 1586\n ],\n \"author_company\": [\n 1035,\n 1586\n ],\n \"author_industry\": [\n 3,\n 4\n ],\n \"author_keyword\": \"marketing manager\",\n \"page\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://web-scraping-api2.p.rapidapi.com/search-posts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-rapidapi-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"search_keywords\": \"marketing\",\n \"sort_by\": \"Top match\",\n \"date_posted\": \"Past week\",\n \"content_type\": \"Images\",\n \"from_member\": [\n \"ACoAAAGafwYBi3pXOoVVwIyAFc453DuIv50jfTA\"\n ],\n \"from_company\": [\n 1035,\n 1586\n ],\n \"mentioning_member\": [\n \"ACoAAAGafwYBi3pXOoVVwIyAFc453DuIv50jfTA\"\n ],\n \"mentioning_company\": [\n 1035,\n 1586\n ],\n \"author_company\": [\n 1035,\n 1586\n ],\n \"author_industry\": [\n 3,\n 4\n ],\n \"author_keyword\": \"marketing manager\",\n \"page\": 1\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"post_type": "photo",
"post_url": "https://www.linkedin.com/feed/update/urn:li:activity:7206932158031003648/",
"posted": "2024-06-13 08:15:24",
"poster_name": "Ron Bar El",
"urn": "7206932158031003648",
"num_comments": null,
"num_likes": null,
"num_shares": null,
"poster_linkedin_url": "https://www.linkedin.com/in/ACoAAAJcHacBGQdA-cxEAGl5Q1swIHXwixZMAK4?miniProfileUrn=urn%3Ali%3Afs_miniProfile%3AACoAAAJcHacBGQdA-cxEAGl5Q1swIHXwixZMAK4",
"poster_title": "Chief TechStoryteller Officer | Founder of turba, Tech storytelling & Brand strategy agency | Speaker",
"text": "The #AI #Narrative War: Beyond the technological battle for AI supremacy among the tech giants..."
}
],
"message": "ok",
"total": 397
}{
"data": null,
"message": "Bad request: Invalid payload."
}{
"data": null,
"message": "System error. We will fix it soon!"
}Authorizations
Body
application/json
Example:
"marketing"
Available options:
Latest, Top match Filter posts by a specific date or date range.
Available options:
Past 24 hours, Past week, Past month, past-year, past-2y, past-3y Example:
"Past week"
Available options:
Videos, Images, Job posts, Live videos, Documents, Collaborative articles Example:
"Images"
List of LinkedIn URNs.
Example:
["ACoAAAGafwYBi3pXOoVVwIyAFc453DuIv50jfTA"]
List of LinkedIn URNs.
Example:
["ACoAAAGafwYBi3pXOoVVwIyAFc453DuIv50jfTA"]
Author title keywords.
Example:
"marketing manager"
Example:
1
⌘I
