帖子评论
curl --request GET \
--url https://api.aisa.one/apis/v1/unipile/linkedin/posts/{post_id}/comments \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/unipile/linkedin/posts/{post_id}/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/unipile/linkedin/posts/{post_id}/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/unipile/linkedin/posts/{post_id}/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/unipile/linkedin/posts/{post_id}/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/unipile/linkedin/posts/{post_id}/comments")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/unipile/linkedin/posts/{post_id}/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{
"cursor": "<string>",
"items": [
{
"author": "<string>",
"author_details": {
"headline": "<string>",
"id": "<string>",
"network_distance": "FIRST_DEGREE",
"profile_picture_url": "<string>",
"profile_url": "<string>"
},
"date": "<string>",
"id": "<string>",
"object": "Comment",
"post_id": "<string>",
"post_urn": "<string>",
"reaction_counter": 123,
"reply_counter": 123,
"text": "<string>",
"impressions_counter": 123,
"picture_url": "<string>",
"thread_id": "<string>",
"user_reacted": "LIKE"
}
],
"object": "CommentList",
"paging": {
"page_count": 123,
"start": 123,
"total_count": 123
},
"total_items": 123
}帖子
帖子评论
列出某条 LinkedIn 帖子的全部评论。
GET
https://api.aisa.one
/
apis
/
v1
/
unipile
/
linkedin
/
posts
/
{post_id}
/
comments
帖子评论
curl --request GET \
--url https://api.aisa.one/apis/v1/unipile/linkedin/posts/{post_id}/comments \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/unipile/linkedin/posts/{post_id}/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/unipile/linkedin/posts/{post_id}/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/unipile/linkedin/posts/{post_id}/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/unipile/linkedin/posts/{post_id}/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/unipile/linkedin/posts/{post_id}/comments")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/unipile/linkedin/posts/{post_id}/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{
"cursor": "<string>",
"items": [
{
"author": "<string>",
"author_details": {
"headline": "<string>",
"id": "<string>",
"network_distance": "FIRST_DEGREE",
"profile_picture_url": "<string>",
"profile_url": "<string>"
},
"date": "<string>",
"id": "<string>",
"object": "Comment",
"post_id": "<string>",
"post_urn": "<string>",
"reaction_counter": 123,
"reply_counter": 123,
"text": "<string>",
"impressions_counter": 123,
"picture_url": "<string>",
"thread_id": "<string>",
"user_reacted": "LIKE"
}
],
"object": "CommentList",
"paging": {
"page_count": 123,
"start": 123,
"total_count": 123
},
"total_items": 123
}按 post_id 返回帖子的全部评论。
当前价格请查看费用说明;支持报价的接口可按实际请求获取报价。
请求规范
- 方法与路径: GET /apis/v1/unipile/linkedin/posts/{post_id}/comments
- 可用状态: enabled
- 请求 URL 模板:
https://api.aisa.one/apis/v1/unipile/linkedin/posts/{post_id}/comments - post_id: path; 必填
- account_id: query; 必填
- comment_id: query; 可选
- cursor: query; 可选
- limit: query; 可选
- sort_by: query; 可选
{
"operationId": "get_unipile_linkedin_post_comments",
"method": "GET",
"path": "/apis/v1/unipile/linkedin/posts/{post_id}/comments",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [
{
"description": "The ID of the associated post. <br> `Linkedin`: use the `social_id` from the post object (GET post or list posts). The post id visible in url will not work in all case, you can refer here for more details : https://developer.unipile.com/docs/posts-and-comments <br> `Instagram`: Need to use the **provider_id**. Short code cannot be used here (***www.instagram.com/p/SHORTCODE***)",
"in": "path",
"name": "post_id",
"required": true,
"schema": {
"type": "string"
}
},
{
"description": "The id of the account to perform the request from.",
"in": "query",
"name": "account_id",
"required": true,
"schema": {
"type": "string"
}
},
{
"description": "The id of the comment to get replies from. <br> `Linkedin`: use the comment `id` returned by the comments list.",
"in": "query",
"name": "comment_id",
"required": false,
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "cursor",
"required": false,
"schema": {
"description": "A cursor for pagination purposes. To get the next page of entries, you need to make a new request and fulfill this field with the cursor received in the preceding request. This process should be repeated until all entries have been retrieved.",
"minLength": 1,
"title": "CursorParam",
"type": "string"
}
},
{
"in": "query",
"name": "limit",
"required": false,
"schema": {
"description": "A limit for the number of items returned in the response. The value can be set between 1 and 100.",
"example": 100,
"maximum": 100,
"minimum": 1,
"type": "integer"
}
},
{
"description": "The sort method for the post comments. Default is MOST_RECENT.",
"in": "query",
"name": "sort_by",
"required": false,
"schema": {
"enum": [
"MOST_RECENT",
"MOST_RELEVANT"
],
"type": "string"
}
}
],
"security": [
{
"bearerAuth": []
}
],
"x-aisa-status": "enabled",
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
费用与请求规则
公开参考价格:每次成功请求 $0.005 USD。 账户适用价格可能不同;支持报价的接口可按实际请求获取报价。授权
路径参数
The ID of the associated post.
Linkedin: use the social_id from the post object (GET post or list posts). The post id visible in url will not work in all case, you can refer here for more details : https://developer.unipile.com/docs/posts-and-comments
Instagram: Need to use the provider_id. Short code cannot be used here (www.instagram.com/p/SHORTCODE)