Get Page Posts
curl --request POST \
--url https://public.plai.io/meta/get_page_posts \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"userId": "<string>",
"platform": "<string>",
"pagination": "<string>"
}
'import requests
url = "https://public.plai.io/meta/get_page_posts"
payload = {
"userId": "<string>",
"platform": "<string>",
"pagination": "<string>"
}
headers = {
"x-api-key": "<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': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({userId: '<string>', platform: '<string>', pagination: '<string>'})
};
fetch('https://public.plai.io/meta/get_page_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://public.plai.io/meta/get_page_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([
'userId' => '<string>',
'platform' => '<string>',
'pagination' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-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://public.plai.io/meta/get_page_posts"
payload := strings.NewReader("{\n \"userId\": \"<string>\",\n \"platform\": \"<string>\",\n \"pagination\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-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://public.plai.io/meta/get_page_posts")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"userId\": \"<string>\",\n \"platform\": \"<string>\",\n \"pagination\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://public.plai.io/meta/get_page_posts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"userId\": \"<string>\",\n \"platform\": \"<string>\",\n \"pagination\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"results": {
"success": true,
"posts": [
{
"id": "337703969429296_122169622310329585",
"createdTime": "2025-04-15T19:47:40+0000",
"postUrl": "https://www.facebook.com/reel/465694996566136/",
"mediaType": "video",
"primaryText": "#trend #sensations",
"image": "https://scontent-dfw5-3.xx.fbcdn.net/v/t51.71878-10/487045751_1506048210352677_1460106608139613669_n.jpg?stp=dst-jpg_s720x720_tt6&_nc_cat=109&ccb=1-7&_nc_sid=282d23&_nc_ohc=ltdfzNvKXjgQ7kNvwGfsR5B&_nc_oc=Adn5uL-JBf2W_4feDYpOuc8TtAZdjb6jUSlYkXtZQMfmIYl8jVX1NJx9Of2ofvoN_8h4U4Qiwo4v7UQC6DDRr1hg&_nc_zt=23&_nc_ht=scontent-dfw5-3.xx&edm=AKK4YLsEAAAA&_nc_gid=-kNdEWOVvJgyLYvvE6hG8A&oh=00_AfGeuAqiWfYDlxBGGDpV0TS6JAFnorAimRT6dFwwazhX7A&oe=6813667F",
"height": 720,
"width": 406,
"video": "https://scontent-dfw5-3.xx.fbcdn.net/o1/v/t2/f2/m69/AQNZXVm7EVuCjtwEaGQ-F2u5WZRO0lmiQcvNTaetnRD6ryfyhnR30uBV1Jm9Lgyb-ES3v0VdW_We5G3RmcgJWXxZ.mp4?strext=1&_nc_cat=108&_nc_sid=8bf8fe&_nc_ht=scontent-dfw5-3.xx.fbcdn.net&_nc_ohc=iuKuKOO4sPkQ7kNvwF_1PGG&efg=eyJ2ZW5jb2RlX3RhZyI6Inhwdl9wcm9ncmVzc2l2ZS5GQUNFQk9PSy4uQzMuNzIwLnByb2dyZXNzaXZlX2gyNjQtYmFzaWMtZ2VuMl83MjBwIiwieHB2X2Fzc2V0X2lkIjoxMDY2NDg5MDA4NjU0OTkxLCJ2aV91c2VjYXNlX2lkIjoxMDA5OSwiZHVyYXRpb25fcyI6MzAsInVybGdlbl9zb3VyY2UiOiJ3d3cifQ%3D%3D&ccb=17-1&_nc_zt=28&oh=00_AfHa25qHjWo7n33umOEfOfxK1e8likNXDSyCRuZuvDhT-A&oe=6813874A",
"videoId": "465694996566136"
}
]
}
}
{
"success": true,
"results": {
"success": true,
"posts": [
{
"id": "18107270119498620",
"caption": "😹",
"media_type": "VIDEO",
"thumbnail_url": "https://scontent-dfw5-1.cdninstagram.com/v/t51.75761-15/491502650_18401404012107524_7302255627581481598_n.jpg?stp=dst-jpg_e35_tt6&_nc_cat=105&ccb=1-7&_nc_sid=18de74&_nc_ohc=P-i0qZLn8qUQ7kNvwHDCtm3&_nc_oc=AdlpiNHe0qVRRQ0kxySwwICMSQvwHXTL5uUWYrPscrGMbafrWe_pdSJSVwDeALsc_CQXMZJL4HsaHDxuGNZByR6t&_nc_zt=23&_nc_ht=scontent-dfw5-1.cdninstagram.com&edm=AM6HXa8EAAAA&_nc_gid=cTrDALIyERt3l3IETVjFSg&oh=00_AfFKWdkuLzKA1FyXYXgEVSbITXahmwuJp0H3vzxrnPjVWA&oe=68138A76",
"permalink": "https://www.instagram.com/reel/DIzR1ATNU_0/",
"timestamp": "2025-04-23T19:43:35+0000",
"ig_id": "3617313334953857012",
"boost_eligibility_info": {
"eligible_to_boost": true
},
"media_product_type": "REELS"
}
]
}
}
Media
Get Page Posts
This endpoint is used to get page posts from facebook and instagram. You can use this posts to create boost post ads.
POST
/
meta
/
get_page_posts
Get Page Posts
curl --request POST \
--url https://public.plai.io/meta/get_page_posts \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"userId": "<string>",
"platform": "<string>",
"pagination": "<string>"
}
'import requests
url = "https://public.plai.io/meta/get_page_posts"
payload = {
"userId": "<string>",
"platform": "<string>",
"pagination": "<string>"
}
headers = {
"x-api-key": "<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': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({userId: '<string>', platform: '<string>', pagination: '<string>'})
};
fetch('https://public.plai.io/meta/get_page_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://public.plai.io/meta/get_page_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([
'userId' => '<string>',
'platform' => '<string>',
'pagination' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-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://public.plai.io/meta/get_page_posts"
payload := strings.NewReader("{\n \"userId\": \"<string>\",\n \"platform\": \"<string>\",\n \"pagination\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-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://public.plai.io/meta/get_page_posts")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"userId\": \"<string>\",\n \"platform\": \"<string>\",\n \"pagination\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://public.plai.io/meta/get_page_posts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"userId\": \"<string>\",\n \"platform\": \"<string>\",\n \"pagination\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"results": {
"success": true,
"posts": [
{
"id": "337703969429296_122169622310329585",
"createdTime": "2025-04-15T19:47:40+0000",
"postUrl": "https://www.facebook.com/reel/465694996566136/",
"mediaType": "video",
"primaryText": "#trend #sensations",
"image": "https://scontent-dfw5-3.xx.fbcdn.net/v/t51.71878-10/487045751_1506048210352677_1460106608139613669_n.jpg?stp=dst-jpg_s720x720_tt6&_nc_cat=109&ccb=1-7&_nc_sid=282d23&_nc_ohc=ltdfzNvKXjgQ7kNvwGfsR5B&_nc_oc=Adn5uL-JBf2W_4feDYpOuc8TtAZdjb6jUSlYkXtZQMfmIYl8jVX1NJx9Of2ofvoN_8h4U4Qiwo4v7UQC6DDRr1hg&_nc_zt=23&_nc_ht=scontent-dfw5-3.xx&edm=AKK4YLsEAAAA&_nc_gid=-kNdEWOVvJgyLYvvE6hG8A&oh=00_AfGeuAqiWfYDlxBGGDpV0TS6JAFnorAimRT6dFwwazhX7A&oe=6813667F",
"height": 720,
"width": 406,
"video": "https://scontent-dfw5-3.xx.fbcdn.net/o1/v/t2/f2/m69/AQNZXVm7EVuCjtwEaGQ-F2u5WZRO0lmiQcvNTaetnRD6ryfyhnR30uBV1Jm9Lgyb-ES3v0VdW_We5G3RmcgJWXxZ.mp4?strext=1&_nc_cat=108&_nc_sid=8bf8fe&_nc_ht=scontent-dfw5-3.xx.fbcdn.net&_nc_ohc=iuKuKOO4sPkQ7kNvwF_1PGG&efg=eyJ2ZW5jb2RlX3RhZyI6Inhwdl9wcm9ncmVzc2l2ZS5GQUNFQk9PSy4uQzMuNzIwLnByb2dyZXNzaXZlX2gyNjQtYmFzaWMtZ2VuMl83MjBwIiwieHB2X2Fzc2V0X2lkIjoxMDY2NDg5MDA4NjU0OTkxLCJ2aV91c2VjYXNlX2lkIjoxMDA5OSwiZHVyYXRpb25fcyI6MzAsInVybGdlbl9zb3VyY2UiOiJ3d3cifQ%3D%3D&ccb=17-1&_nc_zt=28&oh=00_AfHa25qHjWo7n33umOEfOfxK1e8likNXDSyCRuZuvDhT-A&oe=6813874A",
"videoId": "465694996566136"
}
]
}
}
{
"success": true,
"results": {
"success": true,
"posts": [
{
"id": "18107270119498620",
"caption": "😹",
"media_type": "VIDEO",
"thumbnail_url": "https://scontent-dfw5-1.cdninstagram.com/v/t51.75761-15/491502650_18401404012107524_7302255627581481598_n.jpg?stp=dst-jpg_e35_tt6&_nc_cat=105&ccb=1-7&_nc_sid=18de74&_nc_ohc=P-i0qZLn8qUQ7kNvwHDCtm3&_nc_oc=AdlpiNHe0qVRRQ0kxySwwICMSQvwHXTL5uUWYrPscrGMbafrWe_pdSJSVwDeALsc_CQXMZJL4HsaHDxuGNZByR6t&_nc_zt=23&_nc_ht=scontent-dfw5-1.cdninstagram.com&edm=AM6HXa8EAAAA&_nc_gid=cTrDALIyERt3l3IETVjFSg&oh=00_AfFKWdkuLzKA1FyXYXgEVSbITXahmwuJp0H3vzxrnPjVWA&oe=68138A76",
"permalink": "https://www.instagram.com/reel/DIzR1ATNU_0/",
"timestamp": "2025-04-23T19:43:35+0000",
"ig_id": "3617313334953857012",
"boost_eligibility_info": {
"eligible_to_boost": true
},
"media_product_type": "REELS"
}
]
}
}
Request Body
string
required
User ID, If not already created, make a user on create user
page first. If already created,
retrieve the user ID from get profile
page.
string
required
The social media platform for the operation.
FACEBOOK or INSTAGRAM.string
Pagination
Response
- Facebook Response
- Instagram Response
boolean
Indicates that the HTTP response was successful (status code 200 OK).
object
Show Results Object
Show Results Object
boolean
Indicates whether the specific operation or API action was
successful.
object[]
Show Posts Array
Show Posts Array
string
The unique identifier for the post.
string
The timestamp when the post was created (ISO 8601
format).
string
The URL to view the post on Facebook.
string
The type of media in the post :
photo or video or albumstring
The main text/content of the post including hashtags.
string
URL of the thumbnail/preview image for the post.
number
Height of the post media in pixels.
number
Width of the post media in pixels.
string
URL of the video content (if mediaType is
VIDEO).string
The unique identifier for the video.
string
Error string if something went wrong
boolean
Indicates that the HTTP response was successful (status code 200 OK).
object
Show Results Object
Show Results Object
boolean
Indicates whether the specific operation or API action was
successful.
object[]
Show Post Object
Show Post Object
string
The unique identifier for the Instagram post.
string
The caption text of the post.
string
Type of media in the post:
VIDEO or IMAGE or CAROUSEL_ALBUMstring
URL of the thumbnail image for the post.
string
Permanent URL to access the post on Instagram.
string
When the post was created (ISO 8601 format).
string
Instagram’s internal ID for the post.
string
The type of Instagram media product (e.g.,
REELS).string
Error string if something went wrong
{
"success": true,
"results": {
"success": true,
"posts": [
{
"id": "337703969429296_122169622310329585",
"createdTime": "2025-04-15T19:47:40+0000",
"postUrl": "https://www.facebook.com/reel/465694996566136/",
"mediaType": "video",
"primaryText": "#trend #sensations",
"image": "https://scontent-dfw5-3.xx.fbcdn.net/v/t51.71878-10/487045751_1506048210352677_1460106608139613669_n.jpg?stp=dst-jpg_s720x720_tt6&_nc_cat=109&ccb=1-7&_nc_sid=282d23&_nc_ohc=ltdfzNvKXjgQ7kNvwGfsR5B&_nc_oc=Adn5uL-JBf2W_4feDYpOuc8TtAZdjb6jUSlYkXtZQMfmIYl8jVX1NJx9Of2ofvoN_8h4U4Qiwo4v7UQC6DDRr1hg&_nc_zt=23&_nc_ht=scontent-dfw5-3.xx&edm=AKK4YLsEAAAA&_nc_gid=-kNdEWOVvJgyLYvvE6hG8A&oh=00_AfGeuAqiWfYDlxBGGDpV0TS6JAFnorAimRT6dFwwazhX7A&oe=6813667F",
"height": 720,
"width": 406,
"video": "https://scontent-dfw5-3.xx.fbcdn.net/o1/v/t2/f2/m69/AQNZXVm7EVuCjtwEaGQ-F2u5WZRO0lmiQcvNTaetnRD6ryfyhnR30uBV1Jm9Lgyb-ES3v0VdW_We5G3RmcgJWXxZ.mp4?strext=1&_nc_cat=108&_nc_sid=8bf8fe&_nc_ht=scontent-dfw5-3.xx.fbcdn.net&_nc_ohc=iuKuKOO4sPkQ7kNvwF_1PGG&efg=eyJ2ZW5jb2RlX3RhZyI6Inhwdl9wcm9ncmVzc2l2ZS5GQUNFQk9PSy4uQzMuNzIwLnByb2dyZXNzaXZlX2gyNjQtYmFzaWMtZ2VuMl83MjBwIiwieHB2X2Fzc2V0X2lkIjoxMDY2NDg5MDA4NjU0OTkxLCJ2aV91c2VjYXNlX2lkIjoxMDA5OSwiZHVyYXRpb25fcyI6MzAsInVybGdlbl9zb3VyY2UiOiJ3d3cifQ%3D%3D&ccb=17-1&_nc_zt=28&oh=00_AfHa25qHjWo7n33umOEfOfxK1e8likNXDSyCRuZuvDhT-A&oe=6813874A",
"videoId": "465694996566136"
}
]
}
}
{
"success": true,
"results": {
"success": true,
"posts": [
{
"id": "18107270119498620",
"caption": "😹",
"media_type": "VIDEO",
"thumbnail_url": "https://scontent-dfw5-1.cdninstagram.com/v/t51.75761-15/491502650_18401404012107524_7302255627581481598_n.jpg?stp=dst-jpg_e35_tt6&_nc_cat=105&ccb=1-7&_nc_sid=18de74&_nc_ohc=P-i0qZLn8qUQ7kNvwHDCtm3&_nc_oc=AdlpiNHe0qVRRQ0kxySwwICMSQvwHXTL5uUWYrPscrGMbafrWe_pdSJSVwDeALsc_CQXMZJL4HsaHDxuGNZByR6t&_nc_zt=23&_nc_ht=scontent-dfw5-1.cdninstagram.com&edm=AM6HXa8EAAAA&_nc_gid=cTrDALIyERt3l3IETVjFSg&oh=00_AfFKWdkuLzKA1FyXYXgEVSbITXahmwuJp0H3vzxrnPjVWA&oe=68138A76",
"permalink": "https://www.instagram.com/reel/DIzR1ATNU_0/",
"timestamp": "2025-04-23T19:43:35+0000",
"ig_id": "3617313334953857012",
"boost_eligibility_info": {
"eligible_to_boost": true
},
"media_product_type": "REELS"
}
]
}
}