curl \
-H "Authorization: Bearer API_KEY" \
-X GET https://api.ayrshare.com/api/brand/byUser?platforms[0]=instagram&platforms[1]=twitter&twitterUser=ayrshare&instagramUser=nygiants
const API_KEY = "API_KEY";
fetch(
"https://api.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://api.ayrshare.com/api/brand/byUser?platforms[0]=instagram&platforms[1]=twitter&twitterUser=ayrshare&instagramUser=nygiants', headers=headers)
print(r.json())
$apiUrl = 'https://api.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.Http;
using System.Threading.Tasks;
namespace BrandByUserGETRequest_csharp
{
class BrandByUser
{
static async Task Main(string[] args)
{
string API_KEY = "API_KEY";
string url = "https://api.ayrshare.com/api/brand/byUser?platforms[0]=instagram&platforms[1]=twitter&twitterUser=ayrshare&instagramUser=nygiants";
using (var client = new HttpClient())
{
client.DefaultRequestHeaders.Add("Authorization", "Bearer " + API_KEY);
try
{
var response = await client.GetStringAsync(url);
Console.WriteLine(response);
}
catch (HttpRequestException ex)
{
Console.WriteLine($"Error: {ex.Message}");
}
}
}
}
}
{
"bluesky": {
"avatar": "https://cdn.bsky.app/img/avatar/plain/did:plc:62musrcyanhro2lydyhlw7ci/bafkreiegtpqhpwgu6tww2ejsdil4ew3blmt6jh3wlq6zhanxo3wj2ib4du@jpeg",
"description": "Ayrshare's Social APIs provide the core infrastructure for social media posting, management, and analytics.",
"displayName": "Ayrshare",
"handle": "ayrshare.com",
"id": "did:plc:62musrcyanhro2lydyhlw7ci",
"indexedAt": "2024-11-29T21:13:18.046Z"
},
"facebook": {
"about": "We invite you to wonder. ",
"description": "Frank Lloyd Wright's architectural masterpiece home to a world-renowned collection of modern and contemporary art.",
"fanCount": 845048,
"followersCount": 874337,
"id": "7640348500",
"isUnclaimed": false, // whether a Facebook Page that was automatically generated has been claimed by the business it represents.
"link": "https://www.facebook.com/7640348500",
"location": {
"city": "New York",
"country": "United States",
"latitude": 40.782910059774,
"longitude": -73.959075808525,
"state": "NY",
"street": "1071 5th Ave",
"zip": "10128"
},
"name": "Solomon R. Guggenheim Museum",
"picture": {
"data": {
"height": 50,
"isSilhouette": false,
"url": "https://scontent.ford4-1.fna.fbcdn.net/v/t39.30808-1/352122020_2000703126929355_7618417261219676343_n.jpg?stp=cp0_dst-jpg_p50x50&_nc_cat=104&ccb=1-7&_nc_sid=4da83f&_nc_ohc=Y1AlQn-HyvwAX8NzExq&_nc_ht=scontent.ford4-1.fna&edm=AJdBtusEAAAA&oh=00_AfD7ms2Nv0b5x1jr_uJKZsXnngQP3dmDrjQDNz_4aaBrCg&oe=65D3ACAE",
"width": 50
}
},
"username": "guggenheimmuseum",
"verificationStatus": "blue_verified", // The verification status of the Facebook Page that represents a business, blue_verified or not_verified.
"website": "http://www.guggenheim.org/"
},
"instagram": {
"biography": "4x Super Bowl Champions #TogetherBlue",
"followersCount": 2278171,
"followsCount": 228,
"id": "17841400118294090", // Instagram Id
"igId": 261763943,
"mediaCount": 8965,
"name": "New York Giants",
"profilePictureUrl": "https://scontent-lga3-2.xx.fbcdn.net/v/t51.2885-15/209249968_563247608171409_1254577321735891919_n.jpg?_nc_cat=1&ccb=1-5&_nc_sid=86c713&_nc_ohc=T673IyEiuasAX_Jj7xu&_nc_ht=scontent-lga3-2.xx&edm=AL-3X8kEAAAA&oh=00_AT8GNdOos4riN7NhrI06a6TkVKgOf5p_RUlsOQUwPRW3VQ&oe=6247F2F0",
"username": "nygiants",
"website": "http://nygnt.co/vgle2"
},
// LinkedIn using the username or handle
"linkedin": {
"localizedName": "LinkedIn",
"name": {
"localized": {
"it_IT": "LinkedIn",
"ru_RU": "LinkedIn",
"pl_PL": "LinkedIn",
"ro_RO": "LinkedIn",
"sv_SE": "LinkedIn"
},
"preferredLocale": {
"country": "US",
"language": "en"
}
},
"id": 1337,
"vanityName": "linkedin",
"organizationType": "PUBLIC_COMPANY",
"locations": [
{
"locationType": "HEADQUARTERS",
"address": {
"geographicArea": "CA",
"country": "US",
"city": "Sunnyvale",
"line1": "1000 W Maude",
"postalCode": "94085"
},
"streetAddressFieldState": "UNSET_OPT_OUT",
"geoLocation": "urn:li:geo:106316449",
"staffCountRange": "SIZE_1"
},
{
"locationType": "OTHER",
"address": {
"geographicArea": "Community of Madrid",
"country": "ES",
"city": "Madrid",
"postalCode": "28046"
},
"streetAddressFieldState": "OPT_OUT",
"geoLocation": "urn:li:geo:106809575",
"staffCountRange": "SIZE_1"
},
{
"locationType": "OTHER",
"address": {
"geographicArea": "ON",
"country": "CA",
"city": "Toronto",
"postalCode": "M5J 2Z2"
},
"streetAddressFieldState": "OPT_OUT",
"geoLocation": "urn:li:geo:108528311",
"staffCountRange": "SIZE_1"
}
],
"specialties": [
{
"locale": {
"country": "US",
"language": "en"
},
"tags": [
"Online Professional Network",
"Jobs",
"People Search",
"Company Search",
"Address Book",
"Advertising",
"Professional Identity",
"Group Collaboration",
"Recruiting"
]
}
],
"website": "https://careers.linkedin.com",
"description": "Founded in 2003, LinkedIn connects the world's professionals to make them more productive and successful. With more than 1 billion members worldwide, including executives from every Fortune 500 company, LinkedIn is the world's largest professional network. The company has a diversified business model with revenue coming from Talent Solutions, Marketing Solutions, Sales Solutions and Premium Subscriptions products. Headquartered in Silicon Valley, LinkedIn has offices across the globe..",
"media": {
"mediaUrl": "https://media.licdn.com/dms/image/C560BAQHaVYd13rRz3A/company-logo_400_400/0/1638831590218/linkedin_logo?e=1723680000&v=beta&t=gOk8XZWklJyh3O7qcgWRluAgbt8whoV8Kr9B0E74xYI",
"id": "urn:li:digitalmediaAsset:C560BAQHaVYd13rRz3A",
"mediaExpiresSeconds": 1723680000000
},
"lastUpdated": "2024-05-15T20:42:09.417Z",
"nextUpdate": "2024-05-15T20:53:09.417Z"
},
// LinkedIn using a person ID.
"linkedin": {
"from": {
"name": "John Doe",
"id": "Z_yXaxh",
"url": "https://www.linkedin.com/in/johndoe",
"description": "Founder"
},
"media": {
"id": "urn:li:image:C5103AQHORT70jVfKVA",
"mediaExpiresSeconds": 1728518400000,
"url": "https://media.licdn.com/dms/image/v2/C5103AQHORT70jVfKVA/profile"
},
"platform": "linkedin",
"profileImageUrl": "https://media.licdn.com/dms/image/v2/C5103AQHORT70jVfKVA/profile",
"userName": "johndoe"
},
"twitter": {
"createdAt": "2017-10-04T15:26:17.000Z",
"description": "Ayrshare's APIs provide the core infrastructure for social media posting, management, and analytics. https://t.co/UlcRGcg1X9",
"id": "92839209304423",
"location": "New York, NY",
"name": "Ayrshare",
"profileImageUrl": "https://pbs.twimg.com/profile_images/1423334467389767680/ochnivwr_normal.jpg",
"publicMetrics": {
"followersCount": 5361,
"followingCount": 39,
"tweetCount": 844,
"listedCount": 5
},
"url": "https://t.co/UlcRGcg1X9",
"username": "Ayrshare"
},
"youtube": {
"created": "2009-05-12T05:28:43Z",
"description": "",
"hiddenSubscriberCount": false,
"isLinked": true,
"longUploadsStatus": "longUploadsUnspecified",
"madeForKids": false,
"playlistId": "UU-0dv2mN6SeXwkEKtfKXJnQ",
"privacyStatus": "public",
"subscriberCount": "28200",
"thumbnailUrl": "https://yt3.ggpht.com/OwargtIRcXzB7jlHWgCmitNo-6JX2wbZGdOMg5K7rd5BnX4bSJX1WPaD2Bi4RN3X9SJi4D4h4g=s88-c-k-c0x00ffffff-no-nd-rj",
"title": "MelissaEtheridgeVEVO",
"url": "https://www.youtube.com/c/@MelissaEtheridgeVEVO",
"videoCount": "43",
"viewCount": "29872467"
}
}
{
"status": "error",
"code": 187,
"instagram": {
"action": "analytics",
"status": "error",
"code": 294,
"message": "Error getting analytics. The user with username: whoblhablah cannot be found.",
"platform": "instagram"
},
"twitter": {
"action": "analytics",
"status": "error",
"code": 294,
"message": "Error getting analytics. Could not find user with username: [NoDonkdfjkd]."
},
"linkedin": {
"action": "analytics",
"status": "error",
"code": 294,
"message": "Error getting analytics.",
"details": "No LinkedIn organization found for linkedinfdfd"
}
}
Listening
الحصول على بيانات العلامة التجارية
الحصول على معلومات حساب اجتماعي عن طريق اسم المستخدم
GET
/
brand
/
byUser
curl \
-H "Authorization: Bearer API_KEY" \
-X GET https://api.ayrshare.com/api/brand/byUser?platforms[0]=instagram&platforms[1]=twitter&twitterUser=ayrshare&instagramUser=nygiants
const API_KEY = "API_KEY";
fetch(
"https://api.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://api.ayrshare.com/api/brand/byUser?platforms[0]=instagram&platforms[1]=twitter&twitterUser=ayrshare&instagramUser=nygiants', headers=headers)
print(r.json())
$apiUrl = 'https://api.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.Http;
using System.Threading.Tasks;
namespace BrandByUserGETRequest_csharp
{
class BrandByUser
{
static async Task Main(string[] args)
{
string API_KEY = "API_KEY";
string url = "https://api.ayrshare.com/api/brand/byUser?platforms[0]=instagram&platforms[1]=twitter&twitterUser=ayrshare&instagramUser=nygiants";
using (var client = new HttpClient())
{
client.DefaultRequestHeaders.Add("Authorization", "Bearer " + API_KEY);
try
{
var response = await client.GetStringAsync(url);
Console.WriteLine(response);
}
catch (HttpRequestException ex)
{
Console.WriteLine($"Error: {ex.Message}");
}
}
}
}
}
{
"bluesky": {
"avatar": "https://cdn.bsky.app/img/avatar/plain/did:plc:62musrcyanhro2lydyhlw7ci/bafkreiegtpqhpwgu6tww2ejsdil4ew3blmt6jh3wlq6zhanxo3wj2ib4du@jpeg",
"description": "Ayrshare's Social APIs provide the core infrastructure for social media posting, management, and analytics.",
"displayName": "Ayrshare",
"handle": "ayrshare.com",
"id": "did:plc:62musrcyanhro2lydyhlw7ci",
"indexedAt": "2024-11-29T21:13:18.046Z"
},
"facebook": {
"about": "We invite you to wonder. ",
"description": "Frank Lloyd Wright's architectural masterpiece home to a world-renowned collection of modern and contemporary art.",
"fanCount": 845048,
"followersCount": 874337,
"id": "7640348500",
"isUnclaimed": false, // whether a Facebook Page that was automatically generated has been claimed by the business it represents.
"link": "https://www.facebook.com/7640348500",
"location": {
"city": "New York",
"country": "United States",
"latitude": 40.782910059774,
"longitude": -73.959075808525,
"state": "NY",
"street": "1071 5th Ave",
"zip": "10128"
},
"name": "Solomon R. Guggenheim Museum",
"picture": {
"data": {
"height": 50,
"isSilhouette": false,
"url": "https://scontent.ford4-1.fna.fbcdn.net/v/t39.30808-1/352122020_2000703126929355_7618417261219676343_n.jpg?stp=cp0_dst-jpg_p50x50&_nc_cat=104&ccb=1-7&_nc_sid=4da83f&_nc_ohc=Y1AlQn-HyvwAX8NzExq&_nc_ht=scontent.ford4-1.fna&edm=AJdBtusEAAAA&oh=00_AfD7ms2Nv0b5x1jr_uJKZsXnngQP3dmDrjQDNz_4aaBrCg&oe=65D3ACAE",
"width": 50
}
},
"username": "guggenheimmuseum",
"verificationStatus": "blue_verified", // The verification status of the Facebook Page that represents a business, blue_verified or not_verified.
"website": "http://www.guggenheim.org/"
},
"instagram": {
"biography": "4x Super Bowl Champions #TogetherBlue",
"followersCount": 2278171,
"followsCount": 228,
"id": "17841400118294090", // Instagram Id
"igId": 261763943,
"mediaCount": 8965,
"name": "New York Giants",
"profilePictureUrl": "https://scontent-lga3-2.xx.fbcdn.net/v/t51.2885-15/209249968_563247608171409_1254577321735891919_n.jpg?_nc_cat=1&ccb=1-5&_nc_sid=86c713&_nc_ohc=T673IyEiuasAX_Jj7xu&_nc_ht=scontent-lga3-2.xx&edm=AL-3X8kEAAAA&oh=00_AT8GNdOos4riN7NhrI06a6TkVKgOf5p_RUlsOQUwPRW3VQ&oe=6247F2F0",
"username": "nygiants",
"website": "http://nygnt.co/vgle2"
},
// LinkedIn using the username or handle
"linkedin": {
"localizedName": "LinkedIn",
"name": {
"localized": {
"it_IT": "LinkedIn",
"ru_RU": "LinkedIn",
"pl_PL": "LinkedIn",
"ro_RO": "LinkedIn",
"sv_SE": "LinkedIn"
},
"preferredLocale": {
"country": "US",
"language": "en"
}
},
"id": 1337,
"vanityName": "linkedin",
"organizationType": "PUBLIC_COMPANY",
"locations": [
{
"locationType": "HEADQUARTERS",
"address": {
"geographicArea": "CA",
"country": "US",
"city": "Sunnyvale",
"line1": "1000 W Maude",
"postalCode": "94085"
},
"streetAddressFieldState": "UNSET_OPT_OUT",
"geoLocation": "urn:li:geo:106316449",
"staffCountRange": "SIZE_1"
},
{
"locationType": "OTHER",
"address": {
"geographicArea": "Community of Madrid",
"country": "ES",
"city": "Madrid",
"postalCode": "28046"
},
"streetAddressFieldState": "OPT_OUT",
"geoLocation": "urn:li:geo:106809575",
"staffCountRange": "SIZE_1"
},
{
"locationType": "OTHER",
"address": {
"geographicArea": "ON",
"country": "CA",
"city": "Toronto",
"postalCode": "M5J 2Z2"
},
"streetAddressFieldState": "OPT_OUT",
"geoLocation": "urn:li:geo:108528311",
"staffCountRange": "SIZE_1"
}
],
"specialties": [
{
"locale": {
"country": "US",
"language": "en"
},
"tags": [
"Online Professional Network",
"Jobs",
"People Search",
"Company Search",
"Address Book",
"Advertising",
"Professional Identity",
"Group Collaboration",
"Recruiting"
]
}
],
"website": "https://careers.linkedin.com",
"description": "Founded in 2003, LinkedIn connects the world's professionals to make them more productive and successful. With more than 1 billion members worldwide, including executives from every Fortune 500 company, LinkedIn is the world's largest professional network. The company has a diversified business model with revenue coming from Talent Solutions, Marketing Solutions, Sales Solutions and Premium Subscriptions products. Headquartered in Silicon Valley, LinkedIn has offices across the globe..",
"media": {
"mediaUrl": "https://media.licdn.com/dms/image/C560BAQHaVYd13rRz3A/company-logo_400_400/0/1638831590218/linkedin_logo?e=1723680000&v=beta&t=gOk8XZWklJyh3O7qcgWRluAgbt8whoV8Kr9B0E74xYI",
"id": "urn:li:digitalmediaAsset:C560BAQHaVYd13rRz3A",
"mediaExpiresSeconds": 1723680000000
},
"lastUpdated": "2024-05-15T20:42:09.417Z",
"nextUpdate": "2024-05-15T20:53:09.417Z"
},
// LinkedIn using a person ID.
"linkedin": {
"from": {
"name": "John Doe",
"id": "Z_yXaxh",
"url": "https://www.linkedin.com/in/johndoe",
"description": "Founder"
},
"media": {
"id": "urn:li:image:C5103AQHORT70jVfKVA",
"mediaExpiresSeconds": 1728518400000,
"url": "https://media.licdn.com/dms/image/v2/C5103AQHORT70jVfKVA/profile"
},
"platform": "linkedin",
"profileImageUrl": "https://media.licdn.com/dms/image/v2/C5103AQHORT70jVfKVA/profile",
"userName": "johndoe"
},
"twitter": {
"createdAt": "2017-10-04T15:26:17.000Z",
"description": "Ayrshare's APIs provide the core infrastructure for social media posting, management, and analytics. https://t.co/UlcRGcg1X9",
"id": "92839209304423",
"location": "New York, NY",
"name": "Ayrshare",
"profileImageUrl": "https://pbs.twimg.com/profile_images/1423334467389767680/ochnivwr_normal.jpg",
"publicMetrics": {
"followersCount": 5361,
"followingCount": 39,
"tweetCount": 844,
"listedCount": 5
},
"url": "https://t.co/UlcRGcg1X9",
"username": "Ayrshare"
},
"youtube": {
"created": "2009-05-12T05:28:43Z",
"description": "",
"hiddenSubscriberCount": false,
"isLinked": true,
"longUploadsStatus": "longUploadsUnspecified",
"madeForKids": false,
"playlistId": "UU-0dv2mN6SeXwkEKtfKXJnQ",
"privacyStatus": "public",
"subscriberCount": "28200",
"thumbnailUrl": "https://yt3.ggpht.com/OwargtIRcXzB7jlHWgCmitNo-6JX2wbZGdOMg5K7rd5BnX4bSJX1WPaD2Bi4RN3X9SJi4D4h4g=s88-c-k-c0x00ffffff-no-nd-rj",
"title": "MelissaEtheridgeVEVO",
"url": "https://www.youtube.com/c/@MelissaEtheridgeVEVO",
"videoCount": "43",
"viewCount": "29872467"
}
}
{
"status": "error",
"code": 187,
"instagram": {
"action": "analytics",
"status": "error",
"code": 294,
"message": "Error getting analytics. The user with username: whoblhablah cannot be found.",
"platform": "instagram"
},
"twitter": {
"action": "analytics",
"status": "error",
"code": 294,
"message": "Error getting analytics. Could not find user with username: [NoDonkdfjkd]."
},
"linkedin": {
"action": "analytics",
"status": "error",
"code": 294,
"message": "Error getting analytics.",
"details": "No LinkedIn organization found for linkedinfdfd"
}
}
تتيح لك نقطة النهاية هذه استرجاع معلومات عن أي ملف تعريف عام على وسائل التواصل الاجتماعي، حتى إن لم يكن هذا
الملف مرتبطًا بحسابك في Ayrshare. هذه الميزة متاحة لـ Bluesky وFacebook وInstagram وLinkedIn
وX وYouTube.
بالنسبة للملفات المرتبطة بحسابك في Ayrshare، نوصي باستخدام نقطة النهاية /analytics بدلًا من ذلك، لأنها توفر تحليلات أكثر تفصيلًا.
هام: للبحث عن ملف تعريف على منصة اجتماعية معينة، يجب أن تكون تلك الشبكة الاجتماعية مرتبطة بحسابك في Ayrshare.
على سبيل المثال، للبحث عن أي ملف تعريف على إنستجرام، مثل
@taylorswift، يجب أن تكون إنستجرام مرتبطة بحسابك في Ayrshare.
يجب أن يكون الحساب الذي يتم البحث عنه عامًا للوصول إلى بياناته. الحسابات الاجتماعية الخاصة غير متاحة.بيانات الموقع متاحة فقط للأعمال ذات مواقع عامة.
يتطلب وسم موقع في فيسبوك أو إنستجرام موقعًا متاحًا.
معاملات الترويسة
معاملات الاستعلام
array
مطلوب
مصفوفة نصية للمنصات:
bluesky أو instagram أو facebook أو linkedin أو twitter أو
youtube.string
معرّف Bluesky مُشفَّرًا لـ URL. على سبيل المثال: “@ayrshare” أو “ayrshare”. مطلوب إذا كانت “bluesky” ضمن
مصفوفة
platforms.string
اسم صفحة فيسبوك مُشفَّرًا لـ URL. على سبيل المثال “@newyorkgiants” أو “newyorkgiants”.
حسابات فيسبوك الشخصية غير مسموح بها من فيسبوك.مطلوب إذا كانت “facebook” ضمن مصفوفة
platforms.string
معرّف إنستجرام مُشفَّرًا لـ URL. على سبيل المثال: “@nygiants” أو “nygiants”.
ملاحظة: لا يمكن إرجاع سوى حسابات Instagram Business وCreator.مطلوب إذا كانت “instagram” ضمن مصفوفة
platforms.string
اسم شركة (منظمة) LinkedIn المميّز مثل
Linkedin أو linkedin-marketing-solutions.يمكنك أيضًا البحث عن شخص باستخدام معرّف شخصه على LinkedIn الذي تم استرجاعه من نقطة نهاية السجل، أي الأشخاص الذين أعجبوا
بمنشور. مثال على المعرّف: urn:li:person:Z_yXaxh_Etمطلوب إذا كانت “linkedin” ضمن مصفوفة platforms.string
معرّف تويتر مُشفَّرًا لـ URL. على سبيل المثال: “@ayrshare” أو “ayrshare”.مطلوب إذا كانت “twitter” ضمن مصفوفة
platforms.string
اسم مستخدم YouTube مُشفَّرًا لـ URL، أو معرّف قناة، أو معرّف قائمة تشغيل. لاحظ أن معرّفات القنوات تبدأ عادةً
بـ “UC” ومعرّفات قوائم التشغيل تبدأ بـ “PL”. على سبيل المثال، أرسل اسم المستخدم “MelissaEtheridgeVEVO” أو
معرّف القناة “UCpSUQewzOXg1F0zLmieKCqQ”.يمكنك أيضًا استخدام معرّف (handle) YouTube الموجود في رابط YouTube.
مثال: المعرّف لـ https://www.youtube.com/@mkbhd هو “@mkbhd”.
تأكّد من الاحتفاظ برمز
@ لتعريف المعرّف.مطلوب إذا كانت “youtube” ضمن مصفوفة platforms.curl \
-H "Authorization: Bearer API_KEY" \
-X GET https://api.ayrshare.com/api/brand/byUser?platforms[0]=instagram&platforms[1]=twitter&twitterUser=ayrshare&instagramUser=nygiants
const API_KEY = "API_KEY";
fetch(
"https://api.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://api.ayrshare.com/api/brand/byUser?platforms[0]=instagram&platforms[1]=twitter&twitterUser=ayrshare&instagramUser=nygiants', headers=headers)
print(r.json())
$apiUrl = 'https://api.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.Http;
using System.Threading.Tasks;
namespace BrandByUserGETRequest_csharp
{
class BrandByUser
{
static async Task Main(string[] args)
{
string API_KEY = "API_KEY";
string url = "https://api.ayrshare.com/api/brand/byUser?platforms[0]=instagram&platforms[1]=twitter&twitterUser=ayrshare&instagramUser=nygiants";
using (var client = new HttpClient())
{
client.DefaultRequestHeaders.Add("Authorization", "Bearer " + API_KEY);
try
{
var response = await client.GetStringAsync(url);
Console.WriteLine(response);
}
catch (HttpRequestException ex)
{
Console.WriteLine($"Error: {ex.Message}");
}
}
}
}
}
{
"bluesky": {
"avatar": "https://cdn.bsky.app/img/avatar/plain/did:plc:62musrcyanhro2lydyhlw7ci/bafkreiegtpqhpwgu6tww2ejsdil4ew3blmt6jh3wlq6zhanxo3wj2ib4du@jpeg",
"description": "Ayrshare's Social APIs provide the core infrastructure for social media posting, management, and analytics.",
"displayName": "Ayrshare",
"handle": "ayrshare.com",
"id": "did:plc:62musrcyanhro2lydyhlw7ci",
"indexedAt": "2024-11-29T21:13:18.046Z"
},
"facebook": {
"about": "We invite you to wonder. ",
"description": "Frank Lloyd Wright's architectural masterpiece home to a world-renowned collection of modern and contemporary art.",
"fanCount": 845048,
"followersCount": 874337,
"id": "7640348500",
"isUnclaimed": false, // whether a Facebook Page that was automatically generated has been claimed by the business it represents.
"link": "https://www.facebook.com/7640348500",
"location": {
"city": "New York",
"country": "United States",
"latitude": 40.782910059774,
"longitude": -73.959075808525,
"state": "NY",
"street": "1071 5th Ave",
"zip": "10128"
},
"name": "Solomon R. Guggenheim Museum",
"picture": {
"data": {
"height": 50,
"isSilhouette": false,
"url": "https://scontent.ford4-1.fna.fbcdn.net/v/t39.30808-1/352122020_2000703126929355_7618417261219676343_n.jpg?stp=cp0_dst-jpg_p50x50&_nc_cat=104&ccb=1-7&_nc_sid=4da83f&_nc_ohc=Y1AlQn-HyvwAX8NzExq&_nc_ht=scontent.ford4-1.fna&edm=AJdBtusEAAAA&oh=00_AfD7ms2Nv0b5x1jr_uJKZsXnngQP3dmDrjQDNz_4aaBrCg&oe=65D3ACAE",
"width": 50
}
},
"username": "guggenheimmuseum",
"verificationStatus": "blue_verified", // The verification status of the Facebook Page that represents a business, blue_verified or not_verified.
"website": "http://www.guggenheim.org/"
},
"instagram": {
"biography": "4x Super Bowl Champions #TogetherBlue",
"followersCount": 2278171,
"followsCount": 228,
"id": "17841400118294090", // Instagram Id
"igId": 261763943,
"mediaCount": 8965,
"name": "New York Giants",
"profilePictureUrl": "https://scontent-lga3-2.xx.fbcdn.net/v/t51.2885-15/209249968_563247608171409_1254577321735891919_n.jpg?_nc_cat=1&ccb=1-5&_nc_sid=86c713&_nc_ohc=T673IyEiuasAX_Jj7xu&_nc_ht=scontent-lga3-2.xx&edm=AL-3X8kEAAAA&oh=00_AT8GNdOos4riN7NhrI06a6TkVKgOf5p_RUlsOQUwPRW3VQ&oe=6247F2F0",
"username": "nygiants",
"website": "http://nygnt.co/vgle2"
},
// LinkedIn using the username or handle
"linkedin": {
"localizedName": "LinkedIn",
"name": {
"localized": {
"it_IT": "LinkedIn",
"ru_RU": "LinkedIn",
"pl_PL": "LinkedIn",
"ro_RO": "LinkedIn",
"sv_SE": "LinkedIn"
},
"preferredLocale": {
"country": "US",
"language": "en"
}
},
"id": 1337,
"vanityName": "linkedin",
"organizationType": "PUBLIC_COMPANY",
"locations": [
{
"locationType": "HEADQUARTERS",
"address": {
"geographicArea": "CA",
"country": "US",
"city": "Sunnyvale",
"line1": "1000 W Maude",
"postalCode": "94085"
},
"streetAddressFieldState": "UNSET_OPT_OUT",
"geoLocation": "urn:li:geo:106316449",
"staffCountRange": "SIZE_1"
},
{
"locationType": "OTHER",
"address": {
"geographicArea": "Community of Madrid",
"country": "ES",
"city": "Madrid",
"postalCode": "28046"
},
"streetAddressFieldState": "OPT_OUT",
"geoLocation": "urn:li:geo:106809575",
"staffCountRange": "SIZE_1"
},
{
"locationType": "OTHER",
"address": {
"geographicArea": "ON",
"country": "CA",
"city": "Toronto",
"postalCode": "M5J 2Z2"
},
"streetAddressFieldState": "OPT_OUT",
"geoLocation": "urn:li:geo:108528311",
"staffCountRange": "SIZE_1"
}
],
"specialties": [
{
"locale": {
"country": "US",
"language": "en"
},
"tags": [
"Online Professional Network",
"Jobs",
"People Search",
"Company Search",
"Address Book",
"Advertising",
"Professional Identity",
"Group Collaboration",
"Recruiting"
]
}
],
"website": "https://careers.linkedin.com",
"description": "Founded in 2003, LinkedIn connects the world's professionals to make them more productive and successful. With more than 1 billion members worldwide, including executives from every Fortune 500 company, LinkedIn is the world's largest professional network. The company has a diversified business model with revenue coming from Talent Solutions, Marketing Solutions, Sales Solutions and Premium Subscriptions products. Headquartered in Silicon Valley, LinkedIn has offices across the globe..",
"media": {
"mediaUrl": "https://media.licdn.com/dms/image/C560BAQHaVYd13rRz3A/company-logo_400_400/0/1638831590218/linkedin_logo?e=1723680000&v=beta&t=gOk8XZWklJyh3O7qcgWRluAgbt8whoV8Kr9B0E74xYI",
"id": "urn:li:digitalmediaAsset:C560BAQHaVYd13rRz3A",
"mediaExpiresSeconds": 1723680000000
},
"lastUpdated": "2024-05-15T20:42:09.417Z",
"nextUpdate": "2024-05-15T20:53:09.417Z"
},
// LinkedIn using a person ID.
"linkedin": {
"from": {
"name": "John Doe",
"id": "Z_yXaxh",
"url": "https://www.linkedin.com/in/johndoe",
"description": "Founder"
},
"media": {
"id": "urn:li:image:C5103AQHORT70jVfKVA",
"mediaExpiresSeconds": 1728518400000,
"url": "https://media.licdn.com/dms/image/v2/C5103AQHORT70jVfKVA/profile"
},
"platform": "linkedin",
"profileImageUrl": "https://media.licdn.com/dms/image/v2/C5103AQHORT70jVfKVA/profile",
"userName": "johndoe"
},
"twitter": {
"createdAt": "2017-10-04T15:26:17.000Z",
"description": "Ayrshare's APIs provide the core infrastructure for social media posting, management, and analytics. https://t.co/UlcRGcg1X9",
"id": "92839209304423",
"location": "New York, NY",
"name": "Ayrshare",
"profileImageUrl": "https://pbs.twimg.com/profile_images/1423334467389767680/ochnivwr_normal.jpg",
"publicMetrics": {
"followersCount": 5361,
"followingCount": 39,
"tweetCount": 844,
"listedCount": 5
},
"url": "https://t.co/UlcRGcg1X9",
"username": "Ayrshare"
},
"youtube": {
"created": "2009-05-12T05:28:43Z",
"description": "",
"hiddenSubscriberCount": false,
"isLinked": true,
"longUploadsStatus": "longUploadsUnspecified",
"madeForKids": false,
"playlistId": "UU-0dv2mN6SeXwkEKtfKXJnQ",
"privacyStatus": "public",
"subscriberCount": "28200",
"thumbnailUrl": "https://yt3.ggpht.com/OwargtIRcXzB7jlHWgCmitNo-6JX2wbZGdOMg5K7rd5BnX4bSJX1WPaD2Bi4RN3X9SJi4D4h4g=s88-c-k-c0x00ffffff-no-nd-rj",
"title": "MelissaEtheridgeVEVO",
"url": "https://www.youtube.com/c/@MelissaEtheridgeVEVO",
"videoCount": "43",
"viewCount": "29872467"
}
}
{
"status": "error",
"code": 187,
"instagram": {
"action": "analytics",
"status": "error",
"code": 294,
"message": "Error getting analytics. The user with username: whoblhablah cannot be found.",
"platform": "instagram"
},
"twitter": {
"action": "analytics",
"status": "error",
"code": 294,
"message": "Error getting analytics. Could not find user with username: [NoDonkdfjkd]."
},
"linkedin": {
"action": "analytics",
"status": "error",
"code": 294,
"message": "Error getting analytics.",
"details": "No LinkedIn organization found for linkedinfdfd"
}
}
واجهة برمجة تطبيقات الاستماع: مراقبة وسائل التواصل الاجتماعي والإشارات | مستندات Ayrshareالبحث في صفحات فيسبوك
⌘I
