curl \
-H "Authorization: Bearer API_KEY" \
-X GET "https://api.ayrshare.com/api/brand/search/linkedin?search=ayrshare"
curl \
-H "Authorization: Bearer API_KEY" \
-X GET "https://api.ayrshare.com/api/brand/search/linkedin?search=John%20Smith&personOnly=true"
const API_KEY = "API_KEY";
// Search for company or person
fetch("https://api.ayrshare.com/api/brand/search/linkedin?search=ayrshare", {
method: "GET",
headers: {
Authorization: `Bearer ${API_KEY}`
}
})
.then((res) => res.json())
.then((json) => console.log(json))
.catch(console.error);
// Search for person only
fetch("https://api.ayrshare.com/api/brand/search/linkedin?search=John%20Smith&personOnly=true", {
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'}
# Search for company or person
r = requests.get('https://api.ayrshare.com/api/brand/search/linkedin?search=ayrshare', headers=headers)
print(r.json())
# Search for person only
r = requests.get('https://api.ayrshare.com/api/brand/search/linkedin?search=john&personOnly=true', headers=headers)
print(r.json())
{
"linkedin": [
{
"vanityName": "ayrshare",
"website": "https://www.ayrshare.com",
"groups": [],
"description": "Ayrshare's APIs provide the core infrastructure for social media posting, management, and analytics.\n\nThe Ayrshare API takes care of the social media infrastructure so you don't have to. Your team can focus on building your product instead of stitching together and maintaining multiple social media platforms.\n\nPost to Facebook, Twitter, Instagram, LinkedIn, Reddit, Telegram, TikTok, Google My Business, and YouTube.\n",
"defaultLocale": {
"country": "US",
"language": "en"
},
"organizationType": "PARTNERSHIP",
"alternativeNames": [],
"specialties": [
"social media",
"api",
"saas",
"social networks",
"tiktok",
"facebook",
"instagram"
],
"staffCountRange": "SIZE_10_TO_100",
"name": "Ayrshare",
"primaryOrganizationType": "NONE",
"locations": [
{
"description": {
"localized": {
"en_US": "Headquarters"
},
"preferredLocale": {
"country": "US",
"language": "en"
}
},
"locationType": "HEADQUARTERS",
"address": {
"geographicArea": "New York",
"country": "US",
"city": "New York",
"line1": "142 W 57th St",
"postalCode": "10019"
},
"localizedDescription": "Headquarters",
"streetAddressFieldState": "UNSET_OPT_OUT",
"geoLocation": "urn:li:geo:103963738"
}
],
"id": 66755333
}
]
}
{
"linkedin": [
{
"lastName": "Smith",
"firstName": "John",
"headline": "CTO at Ayrshare",
"id": "urn:li:person:WBwF1C23L"
}
]
}
{
"linkedin": {
"action": "request",
"status": "error",
"code": 101,
"message": "Missing or incorrect parameters. Please verify with the docs. https://www.ayrshare.com/docs/apis",
"details": "The search must be a string between 3 and 100 characters."
}
}
{
"linkedin": []
}
Search
Пошук у LinkedIn
Пошук компаній або людей у LinkedIn
GET
/
brand
/
search
/
linkedin
curl \
-H "Authorization: Bearer API_KEY" \
-X GET "https://api.ayrshare.com/api/brand/search/linkedin?search=ayrshare"
curl \
-H "Authorization: Bearer API_KEY" \
-X GET "https://api.ayrshare.com/api/brand/search/linkedin?search=John%20Smith&personOnly=true"
const API_KEY = "API_KEY";
// Search for company or person
fetch("https://api.ayrshare.com/api/brand/search/linkedin?search=ayrshare", {
method: "GET",
headers: {
Authorization: `Bearer ${API_KEY}`
}
})
.then((res) => res.json())
.then((json) => console.log(json))
.catch(console.error);
// Search for person only
fetch("https://api.ayrshare.com/api/brand/search/linkedin?search=John%20Smith&personOnly=true", {
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'}
# Search for company or person
r = requests.get('https://api.ayrshare.com/api/brand/search/linkedin?search=ayrshare', headers=headers)
print(r.json())
# Search for person only
r = requests.get('https://api.ayrshare.com/api/brand/search/linkedin?search=john&personOnly=true', headers=headers)
print(r.json())
{
"linkedin": [
{
"vanityName": "ayrshare",
"website": "https://www.ayrshare.com",
"groups": [],
"description": "Ayrshare's APIs provide the core infrastructure for social media posting, management, and analytics.\n\nThe Ayrshare API takes care of the social media infrastructure so you don't have to. Your team can focus on building your product instead of stitching together and maintaining multiple social media platforms.\n\nPost to Facebook, Twitter, Instagram, LinkedIn, Reddit, Telegram, TikTok, Google My Business, and YouTube.\n",
"defaultLocale": {
"country": "US",
"language": "en"
},
"organizationType": "PARTNERSHIP",
"alternativeNames": [],
"specialties": [
"social media",
"api",
"saas",
"social networks",
"tiktok",
"facebook",
"instagram"
],
"staffCountRange": "SIZE_10_TO_100",
"name": "Ayrshare",
"primaryOrganizationType": "NONE",
"locations": [
{
"description": {
"localized": {
"en_US": "Headquarters"
},
"preferredLocale": {
"country": "US",
"language": "en"
}
},
"locationType": "HEADQUARTERS",
"address": {
"geographicArea": "New York",
"country": "US",
"city": "New York",
"line1": "142 W 57th St",
"postalCode": "10019"
},
"localizedDescription": "Headquarters",
"streetAddressFieldState": "UNSET_OPT_OUT",
"geoLocation": "urn:li:geo:103963738"
}
],
"id": 66755333
}
]
}
{
"linkedin": [
{
"lastName": "Smith",
"firstName": "John",
"headline": "CTO at Ayrshare",
"id": "urn:li:person:WBwF1C23L"
}
]
}
{
"linkedin": {
"action": "request",
"status": "error",
"code": 101,
"message": "Missing or incorrect parameters. Please verify with the docs. https://www.ayrshare.com/docs/apis",
"details": "The search must be a string between 3 and 100 characters."
}
}
{
"linkedin": []
}
Пошук компаній або людей у LinkedIn на основі пошукового запиту.
Цей endpoint зазвичай використовується для typeahead-доповнення згадок у постах у соціальних мережах.
Підключений обліковий запис має бути LinkedIn company page для виконання пошуку. Особисті облікові записи LinkedIn не можна використовувати для пошуку.
- Для згадок у постах: При реалізації @mentions використовуйте цей endpoint з функціональністю typeahead.
- Пошук компаній: Потрібна точна vanity name компанії.
- Пошук людей: Почніть щонайменше з 3 символів імені для найкращих результатів.
- Rate limiting: Цей endpoint дотримується стандартних обмежень API rate limits.
Обмеження пошуку
- Компанії: Ви можете шукати будь-яку сторінку компанії LinkedIn
- Люди: Ви можете шукати лише людей, які є підписниками вашого облікового запису LinkedIn, і підключений обліковий запис Ayrshare має бути LinkedIn company page для виконання пошуку. Якщо у людини встановлено приватну видимість LinkedIn, її не буде знайдено в результатах пошуку.
Параметри заголовків
Параметри запиту (Query)
string
обов'язково
Пошуковий запит для пошуку компаній або людей у LinkedIn.Вимоги:
- Мінімальна довжина: 3 символи для людей і 1 символ для компаній.
- Максимальна довжина: 100 символів як для людей, так і для компаній.
- Для компаній: Використовуйте vanity name компанії (знаходиться в URL LinkedIn). Повертаються лише точні збіги vanity name.
- Приклад: Для
linkedin.com/company/ayrshareшукайте “ayrshare”. - Пошук за частковими іменами, як-от “ayrsh”, НЕ поверне результатів.
- Приклад: Для
- Для людей: Використовуйте ім’я та/або прізвище. Часткові збіги імен підтримуються.
- Приклад: “John Smith” знайде людей на ім’я John Smith. Обов’язково закодуйте пробіл у URL.
- Часткові збіги, як-от “Joh” або “Smi”, також повертатимуть результати.
- Пам’ятайте: можна знайти лише ваших підписників LinkedIn, і підключений обліковий запис Ayrshare має бути LinkedIn company page для виконання пошуку
boolean
за замовчуванням:false
Контролює область пошуку: -
false (за замовчуванням): Спочатку шукає компанії, потім людей, якщо компаній не знайдено. - true: Шукає лише людей (повністю пропускає пошук компаній).Приклади
curl \
-H "Authorization: Bearer API_KEY" \
-X GET "https://api.ayrshare.com/api/brand/search/linkedin?search=ayrshare"
curl \
-H "Authorization: Bearer API_KEY" \
-X GET "https://api.ayrshare.com/api/brand/search/linkedin?search=John%20Smith&personOnly=true"
const API_KEY = "API_KEY";
// Search for company or person
fetch("https://api.ayrshare.com/api/brand/search/linkedin?search=ayrshare", {
method: "GET",
headers: {
Authorization: `Bearer ${API_KEY}`
}
})
.then((res) => res.json())
.then((json) => console.log(json))
.catch(console.error);
// Search for person only
fetch("https://api.ayrshare.com/api/brand/search/linkedin?search=John%20Smith&personOnly=true", {
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'}
# Search for company or person
r = requests.get('https://api.ayrshare.com/api/brand/search/linkedin?search=ayrshare', headers=headers)
print(r.json())
# Search for person only
r = requests.get('https://api.ayrshare.com/api/brand/search/linkedin?search=john&personOnly=true', headers=headers)
print(r.json())
{
"linkedin": [
{
"vanityName": "ayrshare",
"website": "https://www.ayrshare.com",
"groups": [],
"description": "Ayrshare's APIs provide the core infrastructure for social media posting, management, and analytics.\n\nThe Ayrshare API takes care of the social media infrastructure so you don't have to. Your team can focus on building your product instead of stitching together and maintaining multiple social media platforms.\n\nPost to Facebook, Twitter, Instagram, LinkedIn, Reddit, Telegram, TikTok, Google My Business, and YouTube.\n",
"defaultLocale": {
"country": "US",
"language": "en"
},
"organizationType": "PARTNERSHIP",
"alternativeNames": [],
"specialties": [
"social media",
"api",
"saas",
"social networks",
"tiktok",
"facebook",
"instagram"
],
"staffCountRange": "SIZE_10_TO_100",
"name": "Ayrshare",
"primaryOrganizationType": "NONE",
"locations": [
{
"description": {
"localized": {
"en_US": "Headquarters"
},
"preferredLocale": {
"country": "US",
"language": "en"
}
},
"locationType": "HEADQUARTERS",
"address": {
"geographicArea": "New York",
"country": "US",
"city": "New York",
"line1": "142 W 57th St",
"postalCode": "10019"
},
"localizedDescription": "Headquarters",
"streetAddressFieldState": "UNSET_OPT_OUT",
"geoLocation": "urn:li:geo:103963738"
}
],
"id": 66755333
}
]
}
{
"linkedin": [
{
"lastName": "Smith",
"firstName": "John",
"headline": "CTO at Ayrshare",
"id": "urn:li:person:WBwF1C23L"
}
]
}
{
"linkedin": {
"action": "request",
"status": "error",
"code": 101,
"message": "Missing or incorrect parameters. Please verify with the docs. https://www.ayrshare.com/docs/apis",
"details": "The search must be a string between 3 and 100 characters."
}
}
{
"linkedin": []
}