Get Reddit posts by IDs (live)
curl --request GET \
--url https://api.xpoz.ai/api/data/reddit/posts/ids/live \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.xpoz.ai/api/data/reddit/posts/ids/live"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.xpoz.ai/api/data/reddit/posts/ids/live', 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.xpoz.ai/api/data/reddit/posts/ids/live",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api.xpoz.ai/api/data/reddit/posts/ids/live"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.xpoz.ai/api/data/reddit/posts/ids/live")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.xpoz.ai/api/data/reddit/posts/ids/live")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"results": [
{}
],
"count": 123,
"dataSource": "database",
"has_more": true,
"next_page_cursor": "<string>"
}{
"success": false,
"message": "<string>"
}{
"success": false,
"message": "<string>"
}{
"success": false,
"code": "on_demand_not_available_in_trial",
"message": "<string>"
}{
"success": false,
"message": "<string>",
"error": "<string>"
}Reddit (live)
Get Reddit posts by IDs (live)
Fetch up to 100 Reddit posts by ID in one call. IDs Reddit does not return are omitted from the results. Always returns has_more: false. Fetches directly from the platform. Not available for trial access keys.
GET
/
api
/
data
/
reddit
/
posts
/
ids
/
live
Get Reddit posts by IDs (live)
curl --request GET \
--url https://api.xpoz.ai/api/data/reddit/posts/ids/live \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.xpoz.ai/api/data/reddit/posts/ids/live"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.xpoz.ai/api/data/reddit/posts/ids/live', 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.xpoz.ai/api/data/reddit/posts/ids/live",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api.xpoz.ai/api/data/reddit/posts/ids/live"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.xpoz.ai/api/data/reddit/posts/ids/live")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.xpoz.ai/api/data/reddit/posts/ids/live")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"results": [
{}
],
"count": 123,
"dataSource": "database",
"has_more": true,
"next_page_cursor": "<string>"
}{
"success": false,
"message": "<string>"
}{
"success": false,
"message": "<string>"
}{
"success": false,
"code": "on_demand_not_available_in_trial",
"message": "<string>"
}{
"success": false,
"message": "<string>",
"error": "<string>"
}Authorizations
Query Parameters
Reddit post fields to return. Comma-separated. Allowed values: id, title, selftext, url, permalink, postUrl, thumbnail, authorId, authorUsername, subredditName, subredditId, score, upvotes, downvotes, upvoteRatio, commentsCount, crosspostsCount, isSelf, isVideo, isOriginalContent, over18, spoiler, locked, stickied, archived, linkFlairText, postHint, domain, crosspostParent, createdAt, createdAtTimestamp, createdAtDate, selftextHtml, editedAt, removal.
Available options:
id, title, selftext, url, permalink, postUrl, thumbnail, authorId, authorUsername, subredditName, subredditId, score, upvotes, downvotes, upvoteRatio, commentsCount, crosspostsCount, isSelf, isVideo, isOriginalContent, over18, spoiler, locked, stickied, archived, linkFlairText, postHint, domain, crosspostParent, createdAt, createdAtTimestamp, createdAtDate, selftextHtml, editedAt, removal 
