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 -->
当前未提供请求参考价格;请使用接口支持的报价功能确认费用。 最终费用以账户适用价格及实际结算为准。
<!-- 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>"
}
}请求规范
- 方法与路径: GET /apis/v1/social/inbox/comments
- 可用状态: enabled
- 请求 URL 模板:
https://api.aisa.one/apis/v1/social/inbox/comments - profileId: query; 可选
- platform: query; 可选
- minComments: query; 可选
- since: query; 可选
- sortBy: query; 可选
- sortOrder: query; 可选
- limit: query; 可选
- cursor: query; 可选
- accountId: query; 可选
- Runtime 事实版本: 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"
}
}
}
}
费用与请求规则
当前未提供请求参考价格;请使用接口支持的报价功能确认费用。 最终费用以账户适用价格及实际结算为准。 公开参考值不是你的账户报价或最终扣费。对于支持 X-AISA-Cost-Mode: quote 的接口,执行前请针对完整请求获取免费报价;执行后通过响应费用元数据和 Usage Logs 核对结算费用。1 USD 等于 1,000,000 个整数 micro-USD。授权
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
查询参数
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.
可用选项:
facebook, instagram, twitter, bluesky, threads, youtube, linkedin, reddit, tiktok, metaads Minimum comment count, applied to each page after pagination
必填范围:
x >= 0Posts created after this date
排序字段
可用选项:
date, comments 排序顺序
可用选项:
asc, desc 必填范围:
1 <= x <= 100One of your social accounts (acc_...).
Pattern:
^acc_[0-9A-Za-z]{22}$