curl --request GET \
--url https://api.xpoz.ai/api/data/reddit/comments/ids/live \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.xpoz.ai/api/data/reddit/comments/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/comments/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/comments/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/comments/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/comments/ids/live")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.xpoz.ai/api/data/reddit/comments/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>"
}Get Reddit comments by IDs or permalink (live)
Fetch up to 100 Reddit comments by ID, or one comment by permalink. Pass exactly one of ids or url. 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.
curl --request GET \
--url https://api.xpoz.ai/api/data/reddit/comments/ids/live \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.xpoz.ai/api/data/reddit/comments/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/comments/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/comments/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/comments/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/comments/ids/live")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.xpoz.ai/api/data/reddit/comments/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
XPOZ API access key, created from the dashboard or POST /api/tokens. Send as Authorization: Bearer <access key>.
Query Parameters
Comma-separated comment IDs (base-36, without the t1_ prefix), up to 100.
100Comment permalink. Share links (/s/...) are not accepted; resolve them with /api/data/reddit/resolve/live first.
Reddit comment fields to return. Comma-separated. Allowed values: id, body, parentPostId, parentId, authorId, authorUsername, postSubredditName, postSubredditId, score, upvotes, downvotes, controversiality, depth, isSubmitter, stickied, collapsed, edited, distinguished, createdAt, createdAtTimestamp, createdAtDate, collapsedReasonCode, collapsedReason, removal, rank, topLevelRank.
id, body, parentPostId, parentId, authorId, authorUsername, postSubredditName, postSubredditId, score, upvotes, downvotes, controversiality, depth, isSubmitter, stickied, collapsed, edited, distinguished, createdAt, createdAtTimestamp, createdAtDate, collapsedReasonCode, collapsedReason, removal, rank, topLevelRank 
