cURL
curl --request GET \
--url https://web-scraping-api2.p.rapidapi.com/get-company-posts \
--header 'x-rapidapi-key: <api-key>'import requests
url = "https://web-scraping-api2.p.rapidapi.com/get-company-posts"
headers = {"x-rapidapi-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-rapidapi-key': '<api-key>'}};
fetch('https://web-scraping-api2.p.rapidapi.com/get-company-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/get-company-posts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://web-scraping-api2.p.rapidapi.com/get-company-posts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-rapidapi-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://web-scraping-api2.p.rapidapi.com/get-company-posts")
.header("x-rapidapi-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://web-scraping-api2.p.rapidapi.com/get-company-posts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-rapidapi-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"num_comments": 173,
"poster": {
"linkedin_url": "https://www.linkedin.com/company/example/",
"name": "Amazon"
},
"text": "🏋️♂️ Meet Amazon's very own strongman!",
"images": [
{
"url": "https://media.licdn.com/dms/image/example.png"
}
],
"num_appreciations": 32,
"num_empathy": 139,
"num_interests": 4,
"num_likes": 4084,
"num_praises": 264,
"num_reposts": 68,
"posted": "2024-06-06 14:40:25",
"reshared": false,
"time": "6 days ago",
"url": "https://www.linkedin.com/posts/example_post",
"urn": "7204492333600440320",
"video": {
"duration": 70033,
"stream_url": "https://dms.licdn.com/playlist/vid/example.mp4"
}
}
],
"message": "Request successful.",
"paging": {
"total": 100,
"per_page": 10,
"current_page": 1,
"next_page": 2
}
}{
"data": null,
"message": "Bad request: Invalid linkedin_url."
}{
"data": null,
"message": "The url was not found on Linkedin."
}{
"data": null,
"message": "System error. We will fix it soon!"
}Post Data
Get Company Posts
-
Get posts from a LinkedIn company page. Pagination is supported to fetch all posts.
-
2 credits per call.
GET
/
get-company-posts
cURL
curl --request GET \
--url https://web-scraping-api2.p.rapidapi.com/get-company-posts \
--header 'x-rapidapi-key: <api-key>'import requests
url = "https://web-scraping-api2.p.rapidapi.com/get-company-posts"
headers = {"x-rapidapi-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-rapidapi-key': '<api-key>'}};
fetch('https://web-scraping-api2.p.rapidapi.com/get-company-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/get-company-posts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://web-scraping-api2.p.rapidapi.com/get-company-posts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-rapidapi-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://web-scraping-api2.p.rapidapi.com/get-company-posts")
.header("x-rapidapi-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://web-scraping-api2.p.rapidapi.com/get-company-posts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-rapidapi-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"num_comments": 173,
"poster": {
"linkedin_url": "https://www.linkedin.com/company/example/",
"name": "Amazon"
},
"text": "🏋️♂️ Meet Amazon's very own strongman!",
"images": [
{
"url": "https://media.licdn.com/dms/image/example.png"
}
],
"num_appreciations": 32,
"num_empathy": 139,
"num_interests": 4,
"num_likes": 4084,
"num_praises": 264,
"num_reposts": 68,
"posted": "2024-06-06 14:40:25",
"reshared": false,
"time": "6 days ago",
"url": "https://www.linkedin.com/posts/example_post",
"urn": "7204492333600440320",
"video": {
"duration": 70033,
"stream_url": "https://dms.licdn.com/playlist/vid/example.mp4"
}
}
],
"message": "Request successful.",
"paging": {
"total": 100,
"per_page": 10,
"current_page": 1,
"next_page": 2
}
}{
"data": null,
"message": "Bad request: Invalid linkedin_url."
}{
"data": null,
"message": "The url was not found on Linkedin."
}{
"data": null,
"message": "System error. We will fix it soon!"
}Authorizations
Query Parameters
Required when fetching the next result page. Please use the token from the result of your previous call.
Possible values: top, recent
Available options:
top, recent Example:
"top"
⌘I
