curl \
-H "Authorization: Bearer API_KEY" \
-X GET https://api.ayrshare.com/api/history/104923907983682_108329000309742?searchPlatformId=true&platform=facebook
const url = "https://api.ayrshare.com/api/history/104923907983682_108329000309742?searchPlatformId=true&platform=facebook";
const response = await fetch(url, {
headers: {
'Authorization': 'Bearer API_KEY'
}
});
import requests
url = 'https://api.ayrshare.com/api/history/104923907983682_108329000309742?searchPlatformId=true&platform=facebook'
headers = {'Authorization': 'Bearer API_KEY'}
response = requests.get(url, headers=headers)
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.ayrshare.com/api/history/104923907983682_108329000309742?searchPlatformId=true&platform=facebook');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: Bearer API_KEY'));
$response = curl_exec($ch);
curl_close($ch);
using System;
using System.Net.Http;
using System.Threading.Tasks;
namespace HistorySocialIdGETRequest_csharp
{
class HistorySocialId
{
private static readonly HttpClient client = new HttpClient();
static async Task Main(string[] args)
{
string API_KEY = "API_KEY";
string url = "https://api.ayrshare.com/api/history/104923907983682_108329000309742?searchPlatformId=true&platform=facebook";
client.DefaultRequestHeaders.Add("Authorization", "Bearer " + API_KEY);
try
{
var response = await client.GetStringAsync(url);
Console.WriteLine(response);
}
catch (HttpRequestException e)
{
Console.WriteLine($"Error: {e.Message}");
}
}
}
}
client := &http.Client{}
req, err := http.NewRequest("GET", "https://api.ayrshare.com/api/history/104923907983682_108329000309742?searchPlatformId=true&platform=facebook", nil)
req.Header.Add("Authorization", "Bearer API_KEY")
resp, err := client.Do(req)
require 'net/http'
require 'uri'
uri = URI.parse("https://api.ayrshare.com/api/history/104923907983682_108329000309742?searchPlatformId=true&platform=facebook")
request = Net::HTTP::Get.new(uri)
request['Authorization'] = 'Bearer API_KEY'
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
http.request(request)
end
[
{
"commentsCount": 0,
"created": "2024-01-25T23:01:23Z",
"from": {
"name": "Ayrshare",
"id": "18930271191"
},
"id": "18930271191_39392923",
"mediaUrls": [
{
"media": {
"image": {
"height": 720,
"src": "https://scontent-lga3-2.xx.fbcdn.net/v/...",
"width": 405
},
"source": "https://video-lga3-2.xx.fbcdn.net/o1/..."
},
"title": "🔥 Sneaker time!"
}
],
"messageTags": [
{
"id": "434786466522",
"name": "#sneakerswap365",
"offset": 242,
"length": 15
}
],
"post": "🔥 Sneaker Time for all!",
"postUrl": "https://www.facebook.com/reel/72681340799/",
"lastUpdated": "2024-01-25T23:29:58.014Z",
"nextUpdate": "2024-01-25T23:40:58.014Z"
}
]
{
"action": "get",
"status": "error",
"code": 221,
"message": "The ID was not found. Please verify the id, API or Profile Keys, and required parameters.",
"id": "7268134079",
"lastUpdated": "2024-01-25T23:45:14.311Z",
"nextUpdate": "2024-01-25T23:56:14.311Z"
}
History
Lịch sử bài đăng theo Social ID
Truy xuất lịch sử cho một bài đăng không bắt nguồn từ Ayrshare.
GET
/
history
/
:socialId
curl \
-H "Authorization: Bearer API_KEY" \
-X GET https://api.ayrshare.com/api/history/104923907983682_108329000309742?searchPlatformId=true&platform=facebook
const url = "https://api.ayrshare.com/api/history/104923907983682_108329000309742?searchPlatformId=true&platform=facebook";
const response = await fetch(url, {
headers: {
'Authorization': 'Bearer API_KEY'
}
});
import requests
url = 'https://api.ayrshare.com/api/history/104923907983682_108329000309742?searchPlatformId=true&platform=facebook'
headers = {'Authorization': 'Bearer API_KEY'}
response = requests.get(url, headers=headers)
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.ayrshare.com/api/history/104923907983682_108329000309742?searchPlatformId=true&platform=facebook');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: Bearer API_KEY'));
$response = curl_exec($ch);
curl_close($ch);
using System;
using System.Net.Http;
using System.Threading.Tasks;
namespace HistorySocialIdGETRequest_csharp
{
class HistorySocialId
{
private static readonly HttpClient client = new HttpClient();
static async Task Main(string[] args)
{
string API_KEY = "API_KEY";
string url = "https://api.ayrshare.com/api/history/104923907983682_108329000309742?searchPlatformId=true&platform=facebook";
client.DefaultRequestHeaders.Add("Authorization", "Bearer " + API_KEY);
try
{
var response = await client.GetStringAsync(url);
Console.WriteLine(response);
}
catch (HttpRequestException e)
{
Console.WriteLine($"Error: {e.Message}");
}
}
}
}
client := &http.Client{}
req, err := http.NewRequest("GET", "https://api.ayrshare.com/api/history/104923907983682_108329000309742?searchPlatformId=true&platform=facebook", nil)
req.Header.Add("Authorization", "Bearer API_KEY")
resp, err := client.Do(req)
require 'net/http'
require 'uri'
uri = URI.parse("https://api.ayrshare.com/api/history/104923907983682_108329000309742?searchPlatformId=true&platform=facebook")
request = Net::HTTP::Get.new(uri)
request['Authorization'] = 'Bearer API_KEY'
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
http.request(request)
end
[
{
"commentsCount": 0,
"created": "2024-01-25T23:01:23Z",
"from": {
"name": "Ayrshare",
"id": "18930271191"
},
"id": "18930271191_39392923",
"mediaUrls": [
{
"media": {
"image": {
"height": 720,
"src": "https://scontent-lga3-2.xx.fbcdn.net/v/...",
"width": 405
},
"source": "https://video-lga3-2.xx.fbcdn.net/o1/..."
},
"title": "🔥 Sneaker time!"
}
],
"messageTags": [
{
"id": "434786466522",
"name": "#sneakerswap365",
"offset": 242,
"length": 15
}
],
"post": "🔥 Sneaker Time for all!",
"postUrl": "https://www.facebook.com/reel/72681340799/",
"lastUpdated": "2024-01-25T23:29:58.014Z",
"nextUpdate": "2024-01-25T23:40:58.014Z"
}
]
{
"action": "get",
"status": "error",
"code": 221,
"message": "The ID was not found. Please verify the id, API or Profile Keys, and required parameters.",
"id": "7268134079",
"lastUpdated": "2024-01-25T23:45:14.311Z",
"nextUpdate": "2024-01-25T23:56:14.311Z"
}
Truy xuất lịch sử cho các bài đăng không bắt nguồn từ Ayrshare bằng cách cung cấp Social post ID cấp thấp. Social Post ID này được trả về trong trường
postIds của endpoint post hoặc trường id từ endpoint get all history hoặc ID từ URL của một bài đăng, chẳng hạn như từ bài đăng Facebook này.
Tài khoản được liên kết phải là chủ sở hữu của bài đăng để có thể truy xuất lịch sử.
Các nền tảng được hỗ trợ: Facebook, Instagram, LinkedIn, Threads, TikTok, Twitter và YouTube với các giá trị platform sau: facebook, instagram, linkedin, threads, tiktok, twitter, youtube.
Header Parameters
Path Parameters
Social Post ID của bài đăng.
Vui lòng xem endpoint /post Response 200 để có thêm một ví dụ về Facebook
Social Post ID
104923907983682_108329000309742Query Parameters
Luôn bằng
trueGiá trị:
facebook, instagram, linkedin, threads, tiktok, twitter, youtubecurl \
-H "Authorization: Bearer API_KEY" \
-X GET https://api.ayrshare.com/api/history/104923907983682_108329000309742?searchPlatformId=true&platform=facebook
const url = "https://api.ayrshare.com/api/history/104923907983682_108329000309742?searchPlatformId=true&platform=facebook";
const response = await fetch(url, {
headers: {
'Authorization': 'Bearer API_KEY'
}
});
import requests
url = 'https://api.ayrshare.com/api/history/104923907983682_108329000309742?searchPlatformId=true&platform=facebook'
headers = {'Authorization': 'Bearer API_KEY'}
response = requests.get(url, headers=headers)
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.ayrshare.com/api/history/104923907983682_108329000309742?searchPlatformId=true&platform=facebook');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: Bearer API_KEY'));
$response = curl_exec($ch);
curl_close($ch);
using System;
using System.Net.Http;
using System.Threading.Tasks;
namespace HistorySocialIdGETRequest_csharp
{
class HistorySocialId
{
private static readonly HttpClient client = new HttpClient();
static async Task Main(string[] args)
{
string API_KEY = "API_KEY";
string url = "https://api.ayrshare.com/api/history/104923907983682_108329000309742?searchPlatformId=true&platform=facebook";
client.DefaultRequestHeaders.Add("Authorization", "Bearer " + API_KEY);
try
{
var response = await client.GetStringAsync(url);
Console.WriteLine(response);
}
catch (HttpRequestException e)
{
Console.WriteLine($"Error: {e.Message}");
}
}
}
}
client := &http.Client{}
req, err := http.NewRequest("GET", "https://api.ayrshare.com/api/history/104923907983682_108329000309742?searchPlatformId=true&platform=facebook", nil)
req.Header.Add("Authorization", "Bearer API_KEY")
resp, err := client.Do(req)
require 'net/http'
require 'uri'
uri = URI.parse("https://api.ayrshare.com/api/history/104923907983682_108329000309742?searchPlatformId=true&platform=facebook")
request = Net::HTTP::Get.new(uri)
request['Authorization'] = 'Bearer API_KEY'
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
http.request(request)
end
[
{
"commentsCount": 0,
"created": "2024-01-25T23:01:23Z",
"from": {
"name": "Ayrshare",
"id": "18930271191"
},
"id": "18930271191_39392923",
"mediaUrls": [
{
"media": {
"image": {
"height": 720,
"src": "https://scontent-lga3-2.xx.fbcdn.net/v/...",
"width": 405
},
"source": "https://video-lga3-2.xx.fbcdn.net/o1/..."
},
"title": "🔥 Sneaker time!"
}
],
"messageTags": [
{
"id": "434786466522",
"name": "#sneakerswap365",
"offset": 242,
"length": 15
}
],
"post": "🔥 Sneaker Time for all!",
"postUrl": "https://www.facebook.com/reel/72681340799/",
"lastUpdated": "2024-01-25T23:29:58.014Z",
"nextUpdate": "2024-01-25T23:40:58.014Z"
}
]
{
"action": "get",
"status": "error",
"code": 221,
"message": "The ID was not found. Please verify the id, API or Profile Keys, and required parameters.",
"id": "7268134079",
"lastUpdated": "2024-01-25T23:45:14.311Z",
"nextUpdate": "2024-01-25T23:56:14.311Z"
}
⌘I
