Links

brand

Brand API Endpoint: Get brand information on users and companies public social media accounts.

Brand API Endpoint

Look up users' or companies' social media public information, such as followers, profiles image, and websites. These users and companies do not need to be a linked Ayrshare user.
If your users have connected their social accounts, user the /analytics endpoint for more detailed information.
The account must be public to access the data. Private social accounts are not available.
Location data is only available for business with public locations. Tagging a location in Facebook or Instagram requires an available location.
Available for Business Plans
Click the in the endpoint to view details.
get
https://app.ayrshare.com/api/brand
/byUser
Get a social account information by a user name.

Request Examples

cURL
Node.js
Python
PHP
C#
curl \
-H "Authorization: Bearer API_KEY" \
-X GET https://app.ayrshare.com/api/brand/byUser?platforms[0]=instagram&platforms[1]=twitter&twitterUser=ayrshare&instagramUser=nygiants
const API_KEY = "API_KEY";
fetch("https://app.ayrshare.com/api/brand/byUser?platforms[0]=instagram&platforms[1]=twitter&twitterUser=ayrshare&instagramUser=nygiants", {
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://app.ayrshare.com/api/brand/byUser?platforms[0]=instagram&platforms[1]=twitter&twitterUser=ayrshare&instagramUser=nygiants', headers=headers)
print(r.json())
<?php
$apiUrl = 'https://app.ayrshare.com/api/brand/byUser?platforms[0]=instagram&platforms[1]=twitter&twitterUser=ayrshare&instagramUser=nygiants';
$apiKey = 'API_KEY'; // Replace 'API_KEY' with your actual API key
$headers = [
'Content-Type: application/json',
'Authorization: Bearer ' . $apiKey,
];
$curl = curl_init($apiUrl);
curl_setopt_array($curl, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => $headers
]);
$response = curl_exec($curl);
if ($response === false) {
echo 'Curl error: ' . curl_error($curl);
} else {
echo json_encode(json_decode($response), JSON_PRETTY_PRINT);
}
curl_close($curl);
using System;
using System.Net;
using System.IO;
namespace HistoryGETRequest_charp
{
class History
{
static void Main(string[] args)
{
string API_KEY = "API_KEY";
string url = "https://app.ayrshare.com/api/brand/byUser?platforms[0]=instagram&platforms[1]=twitter&twitterUser=ayrshare&instagramUser=nygiants";
var httpWebRequest = WebRequest.CreateHttp(url);
httpWebRequest.ContentType = "application/json";
httpWebRequest.Headers.Add("Authorization", "Bearer " + API_KEY);
var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
var response = streamReader.ReadToEnd();
Console.WriteLine(response);
}
}
}
}

get
https://app.ayrshare.com/api/brand
/facebookPages
Search Facebook Pages

Request Examples

cURL
Node.js
Python
curl \
-H "Authorization: Bearer API_KEY" \
-X GET https://app.ayrshare.com/api/brand/facebookPages?search=facebook
const API_KEY = "API_KEY";
fetch("https://app.ayrshare.com/api/brand/facebookPages?search=facebook", {
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://app.ayrshare.com/api/brand/facebookPages?search=facebook', headers=headers)
print(r.json())
Last modified 19h ago