List commented posts
curl --request GET \
--url https://api.aisa.one/apis/v1/social/inbox/comments \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/social/inbox/comments"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aisa.one/apis/v1/social/inbox/comments', 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.aisa.one/apis/v1/social/inbox/comments",
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.aisa.one/apis/v1/social/inbox/comments"
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.aisa.one/apis/v1/social/inbox/comments")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/social/inbox/comments")
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{
"data": [
{
"accountId": "<string>",
"accountUsername": "<string>",
"adId": "<string>",
"cid": "<string>",
"commentCount": 123,
"content": "<string>",
"createdTime": "2023-11-07T05:31:56Z",
"id": "<string>",
"isAd": true,
"likeCount": 123,
"permalink": "<string>",
"picture": "<string>",
"placement": "facebook",
"platform": "<string>",
"subreddit": "<string>"
}
],
"meta": {
"accountsFailed": 123,
"accountsQueried": 123,
"accountsSkipped": [
{
"accountId": "<string>",
"platform": "<string>"
}
],
"failedAccounts": [
{
"accountId": "<string>",
"accountUsername": "<string>",
"code": "<string>",
"error": "<string>",
"platform": "<string>",
"retryAfter": 123
}
],
"lastUpdated": "2023-11-07T05:31:56Z"
},
"pagination": {
"hasMore": true,
"nextCursor": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"param": "<string>",
"retryHint": "never",
"retryable": true,
"type": "<string>"
}
}AIsa Social
List commented posts
Comments. Read only; needs social:read. Ids are yours: accounts acc_..., profiles prf_..., posts pst_...; every other object id is checked against your accounts before the call. Without profileId or accountId it reads your default profile. On a profile with an X account, pass accountId or a platform other than twitter: X bills each read.
Returns posts with comment counts from all connected accounts. Aggregates data across multiple accounts.
### Caching
Responses are cached for up to 10 minutes, so the feed may lag new comments by that window.
Do not poll this endpoint for real-time updates. Subscribe to the `comment.received` webhook, which fires for every new comment across your posts and carries the post reference needed to keep this list current.
### Meta ads
For users with the Ads add-on (accounts on usage-based billing always qualify), the user's Meta ads (boosted/dark posts) are included too.
There's one row per (ad, placement-with-comments). An ad that runs on both Facebook feed and Instagram feed produces up to two rows, since the Page dark post and the IG media have separate comment threads.
Each ad row is flagged `isAd: true` with `adId` and `placement` (`id` is `{adId}:{placement}`). Filter with `platform`:
- `?platform=metaads`: *only* ad rows.
- `facebook`/`instagram`: *organic* posts only (no ads).
- Omitted: both.
Fetch a row's thread from GET /apis/v1/ads/{adId}/comments?placement={placement}.
Ad comment counts are read with the Marketing API token (Facebook side) or the connected Instagram account's token (Instagram side). A row whose count can't be read is omitted.
### Pagination
Pagination walks each account's platform listing. Following `nextCursor` reaches past the first page on Facebook, Instagram, Threads, LinkedIn and YouTube, the platforms that support a server-side date window. On the others the listing stops at its first page.
Cursor pagination is only coherent for the default sort (`sortBy=date`, `sortOrder=desc`). With `sortOrder=asc`, or with `sortBy=comments`, the cursor filter does not match the sort order and the second page is unreliable.
`minComments` is applied to each page after pagination. A page can hold fewer than `limit` posts, even none, while `hasMore` is true; keep following `nextCursor`.
`nextCursor` is opaque: pass it back verbatim, never construct or parse it, its composition may change without notice. Because each page re-queries a live window, results can still shift between requests, so dedupe by `id` on the client.
### Comment counts
`commentCount` semantics differ by platform:
- YouTube's includes replies.
- Facebook's counts top-level comments only.
<!-- aisa-pricing:start -->
A request reference price is not currently available; use a request quote where supported. Account-specific pricing and final settlement may differ.
<!-- aisa-pricing:end -->
GET
https://api.aisa.one
/
apis
/
v1
/
social
/
inbox
/
comments
List commented posts
curl --request GET \
--url https://api.aisa.one/apis/v1/social/inbox/comments \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/social/inbox/comments"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aisa.one/apis/v1/social/inbox/comments', 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.aisa.one/apis/v1/social/inbox/comments",
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.aisa.one/apis/v1/social/inbox/comments"
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.aisa.one/apis/v1/social/inbox/comments")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/social/inbox/comments")
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{
"data": [
{
"accountId": "<string>",
"accountUsername": "<string>",
"adId": "<string>",
"cid": "<string>",
"commentCount": 123,
"content": "<string>",
"createdTime": "2023-11-07T05:31:56Z",
"id": "<string>",
"isAd": true,
"likeCount": 123,
"permalink": "<string>",
"picture": "<string>",
"placement": "facebook",
"platform": "<string>",
"subreddit": "<string>"
}
],
"meta": {
"accountsFailed": 123,
"accountsQueried": 123,
"accountsSkipped": [
{
"accountId": "<string>",
"platform": "<string>"
}
],
"failedAccounts": [
{
"accountId": "<string>",
"accountUsername": "<string>",
"code": "<string>",
"error": "<string>",
"platform": "<string>",
"retryAfter": 123
}
],
"lastUpdated": "2023-11-07T05:31:56Z"
},
"pagination": {
"hasMore": true,
"nextCursor": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"param": "<string>",
"retryHint": "never",
"retryable": true,
"type": "<string>"
}
}Request contract
- Method and path: GET /apis/v1/social/inbox/comments
- Availability: enabled
- Request URL template:
https://api.aisa.one/apis/v1/social/inbox/comments - profileId: query; optional
- platform: query; optional
- minComments: query; optional
- since: query; optional
- sortBy: query; optional
- sortOrder: query; optional
- limit: query; optional
- cursor: query; optional
- accountId: query; optional
- Runtime facts: 99acb5bddbedc8d3352e7c4fef86c3e6d8852c14772bcd18dbcf415237a642bd
{
"operationId": "get_aisa_social_apis_v1_social_inbox_comments",
"method": "GET",
"path": "/apis/v1/social/inbox/comments",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [
{
"description": "One of your profiles (prf_...). Defaults to your default profile when neither profileId nor accountId is sent.",
"in": "query",
"name": "profileId",
"required": false,
"schema": {
"pattern": "^prf_[0-9A-Za-z]{22}$",
"type": "string"
}
},
{
"description": "Filter by platform. `metaads` is a synthetic value meaning the user's ads (boosted/dark posts) only; `facebook`/`instagram` return organic posts only. `tiktok` covers accounts connected through the TikTok Business app only; developer-app TikTok accounts are returned under `meta.accountsSkipped`.",
"in": "query",
"name": "platform",
"required": false,
"schema": {
"enum": [
"facebook",
"instagram",
"twitter",
"bluesky",
"threads",
"youtube",
"linkedin",
"reddit",
"tiktok",
"metaads"
],
"type": "string"
}
},
{
"description": "Minimum comment count, applied to each page after pagination",
"in": "query",
"name": "minComments",
"required": false,
"schema": {
"minimum": 0,
"type": "integer"
}
},
{
"description": "Posts created after this date",
"in": "query",
"name": "since",
"required": false,
"schema": {
"format": "date-time",
"type": "string"
}
},
{
"description": "Sort field",
"in": "query",
"name": "sortBy",
"required": false,
"schema": {
"default": "date",
"enum": [
"date",
"comments"
],
"type": "string"
}
},
{
"description": "Sort order",
"in": "query",
"name": "sortOrder",
"required": false,
"schema": {
"default": "desc",
"enum": [
"asc",
"desc"
],
"type": "string"
}
},
{
"in": "query",
"name": "limit",
"required": false,
"schema": {
"default": 50,
"maximum": 100,
"minimum": 1,
"type": "integer"
}
},
{
"in": "query",
"name": "cursor",
"required": false,
"schema": {
"type": "string"
}
},
{
"description": "One of your social accounts (acc_...).",
"in": "query",
"name": "accountId",
"required": false,
"schema": {
"pattern": "^acc_[0-9A-Za-z]{22}$",
"type": "string"
}
}
],
"security": [
{
"bearerAuth": []
}
],
"x-aisa-status": "enabled",
"x-aisa-pricing": {
"description": "Included with your connected social accounts: AIsa does not charge per call.",
"kind": "no_customer_charge"
},
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
Cost and request rules
A request reference price is not currently available; use a request quote where supported. Account-specific pricing and final settlement may differ. Published reference values are not an account-specific quote or a settled charge. For endpoints supporting X-AISA-Cost-Mode: quote, obtain a free quote for your exact request before execution; reconcile the settled cost with response metadata and Usage Logs. USD amounts use 1,000,000 integer micro-USD per dollar.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
One of your profiles (prf_...). Defaults to your default profile when neither profileId nor accountId is sent.
Pattern:
^prf_[0-9A-Za-z]{22}$Filter by platform. metaads is a synthetic value meaning the user's ads (boosted/dark posts) only; facebook/instagram return organic posts only. tiktok covers accounts connected through the TikTok Business app only; developer-app TikTok accounts are returned under meta.accountsSkipped.
Available options:
facebook, instagram, twitter, bluesky, threads, youtube, linkedin, reddit, tiktok, metaads Minimum comment count, applied to each page after pagination
Required range:
x >= 0Posts created after this date
Sort field
Available options:
date, comments Sort order
Available options:
asc, desc Required range:
1 <= x <= 100One of your social accounts (acc_...).
Pattern:
^acc_[0-9A-Za-z]{22}$