curl --request GET \
--url https://api.xpoz.ai/api/data/reddit/comments/users/{username}/live \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.xpoz.ai/api/data/reddit/comments/users/{username}/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/users/{username}/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/users/{username}/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/users/{username}/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/users/{username}/live")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.xpoz.ai/api/data/reddit/comments/users/{username}/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 a Reddit user's comments (live)
Fetch the comments written by a Reddit user on demand. Fetches directly from the platform and returns one page with a cursor. Not available for trial access keys.
curl --request GET \
--url https://api.xpoz.ai/api/data/reddit/comments/users/{username}/live \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.xpoz.ai/api/data/reddit/comments/users/{username}/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/users/{username}/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/users/{username}/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/users/{username}/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/users/{username}/live")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.xpoz.ai/api/data/reddit/comments/users/{username}/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>.
Path Parameters
Username (without @).
Query Parameters
Listing order. Defaults to new.
new, hot, top, controversial Time window for sort=top or sort=controversial. Defaults to all.
hour, day, week, month, year, all 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 Items per page (1-100). Defaults to 100. Ignored by post search when since/until are set (10 per page).
1 <= x <= 100Opaque cursor from next_page_cursor of the previous page.
Response
One page of results.

