curl \
-H "Authorization: Bearer API_KEY" \
-X GET https://api.ayrshare.com/api/analytics/getInstagramOnlineFollowers?date=2023-12-03
const API_KEY = "API_KEY";
const date = "2023-12-03";
fetch(`https://api.ayrshare.com/api/analytics/getInstagramOnlineFollowers?date=${date}`, {
method: "GET",
headers: {
Authorization: `Bearer ${API_KEY}`
}
})
.then((res) => res.json())
.then((json) => console.log(json))
.catch(console.error);
import requests
headers = {'Authorization': 'Bearer API_KEY'}
r = requests.get('https://api.ayrshare.com/api/analytics/getInstagramOnlineFollowers?date=2023-12-03', headers=headers)
print(r.json())
<?php
// URL and authorization details
$url = 'https://api.ayrshare.com/api/analytics/getInstagramOnlineFollowers?date=2023-12-03';
$apiKey = 'API_KEY'; // Replace 'API_KEY' with your actual API key
// Initialize a cURL session
$curl = curl_init();
// Set cURL options
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'Authorization: Bearer ' . $apiKey
));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
// Execute cURL session and get the response
$response = curl_exec($curl);
// Check if any error occurred
if(curl_errno($curl)){
echo 'Curl error: ' . curl_error($curl);
} else {
// Decode and re-encode the JSON response to pretty print
echo json_encode(json_decode($response), JSON_PRETTY_PRINT);
}
// Close cURL session
curl_close($curl);
using System;
using System.Net.Http;
using System.Threading.Tasks;
namespace InstagramFollowerCountGETRequest_csharp
{
class InstagramFollowerCount
{
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/analytics/getInstagramOnlineFollowers?date=2023-12-03";
client.DefaultRequestHeaders.Add("Authorization", "Bearer " + API_KEY);
try
{
HttpResponseMessage response = await client.GetAsync(url);
response.EnsureSuccessStatusCode();
string responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseBody);
}
catch (HttpRequestException e)
{
Console.WriteLine($"Error: {e.Message}");
}
}
}
}
{
"status": "success",
"onlineFollowersByHour": {
"0": 120, // 12 AM
"1": 113, // 1 AM
"2": 117, // 2 AM
"3": 110, // 3 AM
"4": 129, // 4 AM
"5": 170, // 5 AM
"6": 166, // 6 AM
"7": 173, // 7 AM
"8": 177, // 8 AM
"9": 168, // 9 AM
"10": 178, // 10 AM
"11": 160, // 11 AM
"12": 154, // 12 PM
"13": 153, // 1 PM
"14": 131, // 2 PM
"15": 118, // 3 PM
"16": 109, // 4 PM
"17": 128, // 5 PM
"18": 129, // 6 PM
"19": 134, // 7 PM
"20": 123, // 8 PM
"21": 111, // 9 PM
"22": 102, // 10 PM
"23": 98 // 11 PM
},
"startTime": "2024-03-29T07:00:00.000Z",
"endTime": "2024-03-30T07:00:00.000Z"
}
{
"status": "success",
"onlineFollowersByHour": [
{
"start": "2024-03-29T07:00:00.000Z",
"end": "2024-03-29T07:59:59.999Z",
"onlineFollowers": 33
},
{
"start": "2024-03-29T08:00:00.000Z",
"end": "2024-03-29T08:59:59.999Z",
"onlineFollowers": 90
},
{
"start": "2024-03-29T09:00:00.000Z",
"end": "2024-03-29T09:59:59.999Z",
"onlineFollowers": 21
},
{
"start": "2024-03-29T10:00:00.000Z",
"end": "2024-03-29T10:59:59.999Z",
"onlineFollowers": 109
},
{
"start": "2024-03-29T11:00:00.000Z",
"end": "2024-03-29T11:59:59.999Z",
"onlineFollowers": 99
},
{
"start": "2024-03-29T12:00:00.000Z",
"end": "2024-03-29T12:59:59.999Z",
"onlineFollowers": 10
},
{
"start": "2024-03-29T13:00:00.000Z",
"end": "2024-03-29T13:59:59.999Z",
"onlineFollowers": 82
},
{
"start": "2024-03-29T14:00:00.000Z",
"end": "2024-03-29T14:59:59.999Z",
"onlineFollowers": 101
},
{
"start": "2024-03-29T15:00:00.000Z",
"end": "2024-03-29T15:59:59.999Z",
"onlineFollowers": 91
},
{
"start": "2024-03-29T16:00:00.000Z",
"end": "2024-03-29T16:59:59.999Z",
"onlineFollowers": 12
},
{
"start": "2024-03-29T17:00:00.000Z",
"end": "2024-03-29T17:59:59.999Z",
"onlineFollowers": 93
},
{
"start": "2024-03-29T18:00:00.000Z",
"end": "2024-03-29T18:59:59.999Z",
"onlineFollowers": 21
},
{
"start": "2024-03-29T19:00:00.000Z",
"end": "2024-03-29T19:59:59.999Z",
"onlineFollowers": 95
},
{
"start": "2024-03-29T20:00:00.000Z",
"end": "2024-03-29T20:59:59.999Z",
"onlineFollowers": 97
},
{
"start": "2024-03-29T21:00:00.000Z",
"end": "2024-03-29T21:59:59.999Z",
"onlineFollowers": 101
},
{
"start": "2024-03-29T22:00:00.000Z",
"end": "2024-03-29T22:59:59.999Z",
"onlineFollowers": 74
},
{
"start": "2024-03-29T23:00:00.000Z",
"end": "2024-03-29T23:59:59.999Z",
"onlineFollowers": 61
},
{
"start": "2024-03-30T00:00:00.000Z",
"end": "2024-03-30T00:59:59.999Z",
"onlineFollowers": 31
},
{
"start": "2024-03-30T01:00:00.000Z",
"end": "2024-03-30T01:59:59.999Z",
"onlineFollowers": 28
},
{
"start": "2024-03-30T02:00:00.000Z",
"end": "2024-03-30T02:59:59.999Z",
"onlineFollowers": 19
},
{
"start": "2024-03-30T03:00:00.000Z",
"end": "2024-03-30T03:59:59.999Z",
"onlineFollowers": 21
},
{
"start": "2024-03-30T04:00:00.000Z",
"end": "2024-03-30T04:59:59.999Z",
"onlineFollowers": 23
},
{
"start": "2024-03-30T05:00:00.000Z",
"end": "2024-03-30T05:59:59.999Z",
"onlineFollowers": 92
},
{
"start": "2024-03-30T06:00:00.000Z",
"end": "2024-03-30T06:59:59.999Z",
"onlineFollowers": 32
}
],
"startTime": "2024-03-29T07:00:00.000Z",
"endTime": "2024-03-30T07:00:00.000Z"
}
{
"status": "success",
"onlineFollowersByHour": {}
}
{
"action": "request",
"status": "error",
"code": 101,
"message": "Missing or incorrect parameters. Please verify with the docs. .../ayrshare.com/rest-api/endpoints"
}
Analytics
Contagem de seguidores online do Instagram
Obtenha a contagem histórica total de seguidores do Instagram online
GET
/
analytics
/
getInstagramOnlineFollowers
curl \
-H "Authorization: Bearer API_KEY" \
-X GET https://api.ayrshare.com/api/analytics/getInstagramOnlineFollowers?date=2023-12-03
const API_KEY = "API_KEY";
const date = "2023-12-03";
fetch(`https://api.ayrshare.com/api/analytics/getInstagramOnlineFollowers?date=${date}`, {
method: "GET",
headers: {
Authorization: `Bearer ${API_KEY}`
}
})
.then((res) => res.json())
.then((json) => console.log(json))
.catch(console.error);
import requests
headers = {'Authorization': 'Bearer API_KEY'}
r = requests.get('https://api.ayrshare.com/api/analytics/getInstagramOnlineFollowers?date=2023-12-03', headers=headers)
print(r.json())
<?php
// URL and authorization details
$url = 'https://api.ayrshare.com/api/analytics/getInstagramOnlineFollowers?date=2023-12-03';
$apiKey = 'API_KEY'; // Replace 'API_KEY' with your actual API key
// Initialize a cURL session
$curl = curl_init();
// Set cURL options
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'Authorization: Bearer ' . $apiKey
));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
// Execute cURL session and get the response
$response = curl_exec($curl);
// Check if any error occurred
if(curl_errno($curl)){
echo 'Curl error: ' . curl_error($curl);
} else {
// Decode and re-encode the JSON response to pretty print
echo json_encode(json_decode($response), JSON_PRETTY_PRINT);
}
// Close cURL session
curl_close($curl);
using System;
using System.Net.Http;
using System.Threading.Tasks;
namespace InstagramFollowerCountGETRequest_csharp
{
class InstagramFollowerCount
{
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/analytics/getInstagramOnlineFollowers?date=2023-12-03";
client.DefaultRequestHeaders.Add("Authorization", "Bearer " + API_KEY);
try
{
HttpResponseMessage response = await client.GetAsync(url);
response.EnsureSuccessStatusCode();
string responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseBody);
}
catch (HttpRequestException e)
{
Console.WriteLine($"Error: {e.Message}");
}
}
}
}
{
"status": "success",
"onlineFollowersByHour": {
"0": 120, // 12 AM
"1": 113, // 1 AM
"2": 117, // 2 AM
"3": 110, // 3 AM
"4": 129, // 4 AM
"5": 170, // 5 AM
"6": 166, // 6 AM
"7": 173, // 7 AM
"8": 177, // 8 AM
"9": 168, // 9 AM
"10": 178, // 10 AM
"11": 160, // 11 AM
"12": 154, // 12 PM
"13": 153, // 1 PM
"14": 131, // 2 PM
"15": 118, // 3 PM
"16": 109, // 4 PM
"17": 128, // 5 PM
"18": 129, // 6 PM
"19": 134, // 7 PM
"20": 123, // 8 PM
"21": 111, // 9 PM
"22": 102, // 10 PM
"23": 98 // 11 PM
},
"startTime": "2024-03-29T07:00:00.000Z",
"endTime": "2024-03-30T07:00:00.000Z"
}
{
"status": "success",
"onlineFollowersByHour": [
{
"start": "2024-03-29T07:00:00.000Z",
"end": "2024-03-29T07:59:59.999Z",
"onlineFollowers": 33
},
{
"start": "2024-03-29T08:00:00.000Z",
"end": "2024-03-29T08:59:59.999Z",
"onlineFollowers": 90
},
{
"start": "2024-03-29T09:00:00.000Z",
"end": "2024-03-29T09:59:59.999Z",
"onlineFollowers": 21
},
{
"start": "2024-03-29T10:00:00.000Z",
"end": "2024-03-29T10:59:59.999Z",
"onlineFollowers": 109
},
{
"start": "2024-03-29T11:00:00.000Z",
"end": "2024-03-29T11:59:59.999Z",
"onlineFollowers": 99
},
{
"start": "2024-03-29T12:00:00.000Z",
"end": "2024-03-29T12:59:59.999Z",
"onlineFollowers": 10
},
{
"start": "2024-03-29T13:00:00.000Z",
"end": "2024-03-29T13:59:59.999Z",
"onlineFollowers": 82
},
{
"start": "2024-03-29T14:00:00.000Z",
"end": "2024-03-29T14:59:59.999Z",
"onlineFollowers": 101
},
{
"start": "2024-03-29T15:00:00.000Z",
"end": "2024-03-29T15:59:59.999Z",
"onlineFollowers": 91
},
{
"start": "2024-03-29T16:00:00.000Z",
"end": "2024-03-29T16:59:59.999Z",
"onlineFollowers": 12
},
{
"start": "2024-03-29T17:00:00.000Z",
"end": "2024-03-29T17:59:59.999Z",
"onlineFollowers": 93
},
{
"start": "2024-03-29T18:00:00.000Z",
"end": "2024-03-29T18:59:59.999Z",
"onlineFollowers": 21
},
{
"start": "2024-03-29T19:00:00.000Z",
"end": "2024-03-29T19:59:59.999Z",
"onlineFollowers": 95
},
{
"start": "2024-03-29T20:00:00.000Z",
"end": "2024-03-29T20:59:59.999Z",
"onlineFollowers": 97
},
{
"start": "2024-03-29T21:00:00.000Z",
"end": "2024-03-29T21:59:59.999Z",
"onlineFollowers": 101
},
{
"start": "2024-03-29T22:00:00.000Z",
"end": "2024-03-29T22:59:59.999Z",
"onlineFollowers": 74
},
{
"start": "2024-03-29T23:00:00.000Z",
"end": "2024-03-29T23:59:59.999Z",
"onlineFollowers": 61
},
{
"start": "2024-03-30T00:00:00.000Z",
"end": "2024-03-30T00:59:59.999Z",
"onlineFollowers": 31
},
{
"start": "2024-03-30T01:00:00.000Z",
"end": "2024-03-30T01:59:59.999Z",
"onlineFollowers": 28
},
{
"start": "2024-03-30T02:00:00.000Z",
"end": "2024-03-30T02:59:59.999Z",
"onlineFollowers": 19
},
{
"start": "2024-03-30T03:00:00.000Z",
"end": "2024-03-30T03:59:59.999Z",
"onlineFollowers": 21
},
{
"start": "2024-03-30T04:00:00.000Z",
"end": "2024-03-30T04:59:59.999Z",
"onlineFollowers": 23
},
{
"start": "2024-03-30T05:00:00.000Z",
"end": "2024-03-30T05:59:59.999Z",
"onlineFollowers": 92
},
{
"start": "2024-03-30T06:00:00.000Z",
"end": "2024-03-30T06:59:59.999Z",
"onlineFollowers": 32
}
],
"startTime": "2024-03-29T07:00:00.000Z",
"endTime": "2024-03-30T07:00:00.000Z"
}
{
"status": "success",
"onlineFollowersByHour": {}
}
{
"action": "request",
"status": "error",
"code": 101,
"message": "Missing or incorrect parameters. Please verify with the docs. .../ayrshare.com/rest-api/endpoints"
}
Obtenha a contagem histórica total de seguidores do Instagram online por hora, permitindo otimizar as publicações para maximizar o engajamento.
- Não disponível para usuários do IG com menos de 100 seguidores.
- Dados analíticos disponíveis apenas para os últimos 30 dias.
- O período de tempo para um dia solicitado vai do dia anterior às T07:00:00.000Z até o dia atual
às T06:59:59.999Z em UTC.Por exemplo, use o formato
YYYY-MM-DDThh:mm:ssZe envie como2026-07-08T12:30:00Z. Consulte utctime para mais exemplos.
Parâmetros de cabeçalho
Parâmetros de query
Um dia no formato:
YYYY-MM-DD.Por exemplo, use o formato YYYY-MM-DDThh:mm:ssZ e envie como 2026-07-08T12:30:00Z.
Consulte utctime para mais exemplos.Formata a saída com datas de início e fim em UTC.
curl \
-H "Authorization: Bearer API_KEY" \
-X GET https://api.ayrshare.com/api/analytics/getInstagramOnlineFollowers?date=2023-12-03
const API_KEY = "API_KEY";
const date = "2023-12-03";
fetch(`https://api.ayrshare.com/api/analytics/getInstagramOnlineFollowers?date=${date}`, {
method: "GET",
headers: {
Authorization: `Bearer ${API_KEY}`
}
})
.then((res) => res.json())
.then((json) => console.log(json))
.catch(console.error);
import requests
headers = {'Authorization': 'Bearer API_KEY'}
r = requests.get('https://api.ayrshare.com/api/analytics/getInstagramOnlineFollowers?date=2023-12-03', headers=headers)
print(r.json())
<?php
// URL and authorization details
$url = 'https://api.ayrshare.com/api/analytics/getInstagramOnlineFollowers?date=2023-12-03';
$apiKey = 'API_KEY'; // Replace 'API_KEY' with your actual API key
// Initialize a cURL session
$curl = curl_init();
// Set cURL options
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'Authorization: Bearer ' . $apiKey
));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
// Execute cURL session and get the response
$response = curl_exec($curl);
// Check if any error occurred
if(curl_errno($curl)){
echo 'Curl error: ' . curl_error($curl);
} else {
// Decode and re-encode the JSON response to pretty print
echo json_encode(json_decode($response), JSON_PRETTY_PRINT);
}
// Close cURL session
curl_close($curl);
using System;
using System.Net.Http;
using System.Threading.Tasks;
namespace InstagramFollowerCountGETRequest_csharp
{
class InstagramFollowerCount
{
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/analytics/getInstagramOnlineFollowers?date=2023-12-03";
client.DefaultRequestHeaders.Add("Authorization", "Bearer " + API_KEY);
try
{
HttpResponseMessage response = await client.GetAsync(url);
response.EnsureSuccessStatusCode();
string responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseBody);
}
catch (HttpRequestException e)
{
Console.WriteLine($"Error: {e.Message}");
}
}
}
}
{
"status": "success",
"onlineFollowersByHour": {
"0": 120, // 12 AM
"1": 113, // 1 AM
"2": 117, // 2 AM
"3": 110, // 3 AM
"4": 129, // 4 AM
"5": 170, // 5 AM
"6": 166, // 6 AM
"7": 173, // 7 AM
"8": 177, // 8 AM
"9": 168, // 9 AM
"10": 178, // 10 AM
"11": 160, // 11 AM
"12": 154, // 12 PM
"13": 153, // 1 PM
"14": 131, // 2 PM
"15": 118, // 3 PM
"16": 109, // 4 PM
"17": 128, // 5 PM
"18": 129, // 6 PM
"19": 134, // 7 PM
"20": 123, // 8 PM
"21": 111, // 9 PM
"22": 102, // 10 PM
"23": 98 // 11 PM
},
"startTime": "2024-03-29T07:00:00.000Z",
"endTime": "2024-03-30T07:00:00.000Z"
}
{
"status": "success",
"onlineFollowersByHour": [
{
"start": "2024-03-29T07:00:00.000Z",
"end": "2024-03-29T07:59:59.999Z",
"onlineFollowers": 33
},
{
"start": "2024-03-29T08:00:00.000Z",
"end": "2024-03-29T08:59:59.999Z",
"onlineFollowers": 90
},
{
"start": "2024-03-29T09:00:00.000Z",
"end": "2024-03-29T09:59:59.999Z",
"onlineFollowers": 21
},
{
"start": "2024-03-29T10:00:00.000Z",
"end": "2024-03-29T10:59:59.999Z",
"onlineFollowers": 109
},
{
"start": "2024-03-29T11:00:00.000Z",
"end": "2024-03-29T11:59:59.999Z",
"onlineFollowers": 99
},
{
"start": "2024-03-29T12:00:00.000Z",
"end": "2024-03-29T12:59:59.999Z",
"onlineFollowers": 10
},
{
"start": "2024-03-29T13:00:00.000Z",
"end": "2024-03-29T13:59:59.999Z",
"onlineFollowers": 82
},
{
"start": "2024-03-29T14:00:00.000Z",
"end": "2024-03-29T14:59:59.999Z",
"onlineFollowers": 101
},
{
"start": "2024-03-29T15:00:00.000Z",
"end": "2024-03-29T15:59:59.999Z",
"onlineFollowers": 91
},
{
"start": "2024-03-29T16:00:00.000Z",
"end": "2024-03-29T16:59:59.999Z",
"onlineFollowers": 12
},
{
"start": "2024-03-29T17:00:00.000Z",
"end": "2024-03-29T17:59:59.999Z",
"onlineFollowers": 93
},
{
"start": "2024-03-29T18:00:00.000Z",
"end": "2024-03-29T18:59:59.999Z",
"onlineFollowers": 21
},
{
"start": "2024-03-29T19:00:00.000Z",
"end": "2024-03-29T19:59:59.999Z",
"onlineFollowers": 95
},
{
"start": "2024-03-29T20:00:00.000Z",
"end": "2024-03-29T20:59:59.999Z",
"onlineFollowers": 97
},
{
"start": "2024-03-29T21:00:00.000Z",
"end": "2024-03-29T21:59:59.999Z",
"onlineFollowers": 101
},
{
"start": "2024-03-29T22:00:00.000Z",
"end": "2024-03-29T22:59:59.999Z",
"onlineFollowers": 74
},
{
"start": "2024-03-29T23:00:00.000Z",
"end": "2024-03-29T23:59:59.999Z",
"onlineFollowers": 61
},
{
"start": "2024-03-30T00:00:00.000Z",
"end": "2024-03-30T00:59:59.999Z",
"onlineFollowers": 31
},
{
"start": "2024-03-30T01:00:00.000Z",
"end": "2024-03-30T01:59:59.999Z",
"onlineFollowers": 28
},
{
"start": "2024-03-30T02:00:00.000Z",
"end": "2024-03-30T02:59:59.999Z",
"onlineFollowers": 19
},
{
"start": "2024-03-30T03:00:00.000Z",
"end": "2024-03-30T03:59:59.999Z",
"onlineFollowers": 21
},
{
"start": "2024-03-30T04:00:00.000Z",
"end": "2024-03-30T04:59:59.999Z",
"onlineFollowers": 23
},
{
"start": "2024-03-30T05:00:00.000Z",
"end": "2024-03-30T05:59:59.999Z",
"onlineFollowers": 92
},
{
"start": "2024-03-30T06:00:00.000Z",
"end": "2024-03-30T06:59:59.999Z",
"onlineFollowers": 32
}
],
"startTime": "2024-03-29T07:00:00.000Z",
"endTime": "2024-03-30T07:00:00.000Z"
}
{
"status": "success",
"onlineFollowersByHour": {}
}
{
"action": "request",
"status": "error",
"code": 101,
"message": "Missing or incorrect parameters. Please verify with the docs. .../ayrshare.com/rest-api/endpoints"
}
⌘I
