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 公司或个人。
此端点常用于社交媒体帖子中的 @提及 输入自动补全(typeahead)。
要执行搜索,已绑定的账户必须是 LinkedIn 公司主页。 个人 LinkedIn 账户无法用于执行搜索。
- 在帖子中提及:在实现 @提及 时,请结合 typeahead 功能使用此端点。
- 公司搜索:必须提供完整精确的公司自定义名称。
- 个人搜索:至少输入姓名的前 3 个字符以获得最佳结果。
- 速率限制:此端点遵循标准的 API 速率限制。
搜索限制
- 公司:你可以搜索任意 LinkedIn 公司主页
- 个人:你只能搜索关注了你 LinkedIn 账户的用户,且 Ayrshare 已绑定的账户必须是 LinkedIn 公司主页才能执行搜索。如果某人将其 LinkedIn 的可见性设置为私密,则不会出现在搜索结果中。
Header Parameters
Query Parameters
用于查找 LinkedIn 公司或个人的搜索查询。要求:
- 最小长度:个人为 3 个字符,公司为 1 个字符。
- 最大长度:个人和公司均为 100 个字符。
- 公司:使用公司的自定义名称(可在 LinkedIn URL 中找到)。仅返回完全匹配自定义名称的结果。
- 示例:对于
linkedin.com/company/ayrshare,搜索 “ayrshare”。 - 搜索 “ayrsh” 之类的部分名称将不会返回结果。
- 示例:对于
- 个人:使用名字和/或姓氏。支持部分姓名匹配。
- 示例:“John Smith” 将查找名为 John Smith 的人。请务必对空格进行 URL 编码。
- “Joh” 或 “Smi” 等部分匹配也将返回结果。
- 请记住:只能查找到你的 LinkedIn 关注者,且 Ayrshare 已绑定的账户必须是 LinkedIn 公司主页才能执行搜索。
控制搜索范围:-
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": []
}
⌘I
