# LinkedIn 关键词搜索 API (linkedin.search)

- Canonical page: https://everyinfra.com/linkedin-api/search
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "linkedin", "action": "search", "params": {...}}
- Price: $0.003194 per call ($3.19 per 1,000 requests); failed calls and empty results are not charged
- Returns: list, default 10, max 50 per call
- Mode: sync; add "mode": "async" for slow tasks

## Health

- Live health (24h percent, hourly and daily trends): https://api.everyinfra.com/api/v1/social/availability?platform=linkedin&action=search

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| keyword | not declared | yes | not declared | search 为帖子关键词，profile_search 为当前职位头衔，jobs 为岗位搜索词或完整职位搜索 URL。搜人并不等同于按人物姓名或邮箱精确查询。 |
| date_range | enum: no_filter / past_1_hour / past_24_hours / past_month / past_week | no | not declared | search 帖子发布时间窗：no_filter 不限、past_1_hour 最近 1 小时、past_24_hours 最近 24 小时、past_week 最近 1 周、past_month 最近 1 月。不是职位有效期或个人任职时间。 |
| sort | enum: newest / relevance | no | not declared | search 帖子与 comments 评论均支持 newest 最新、relevance 相关度；两者排序的是不同对象，不代表人物、公司或职位可以用同一参数排序。 |
| limit | integer (1–50) | no | 10 | 这次调用最多返回的条数，整数，1–50；不传按默认值，实际返回可能少于这个数。超过上限会在扣费前返回 422。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | 该记录在原平台上的唯一标识。仅在同一平台内唯一，跨平台可能重复。 |
| url | 该记录在原平台上的可访问链接。 |
| text | 正文内容，已去除 HTML 标签，全文返回、不截断（个别平台的列表结果本身只有摘要，以该平台的字段说明为准）。 |
| author_name | 作者昵称（显示名）。 |
| author_username | 作者用户名（@handle），通常可用于拼 URL。 |
| author_headline | 内容作者的 headline（帖子/评论里用）。 |
| author_id | 帖子作者的数字成员 ID（search）。 |
| author_url | 作者在原平台的主页链接。 |
| author_avatar_url | 帖子作者头像链接（search）。 |
| author_type | 帖子作者类型：profile（个人）/ company（公司）。 |
| reactions | 各类反应数（search）：每项 type（like、appreciation、empathy 等）与 count。 |
| attachment | 帖子附带的卡片（search）：type（如 job、article）、title、description、subtitle、url、image_url。 |
| like_count | 点赞数。null 表示该平台或该接口不公开此数据，不等于 0。 |
| comment_count | 评论数。null 表示不公开，不等于 0。 |
| share_count | 帖子被转发的次数。 |
| hashtags | 公司/帖子的话题标签列表。 |
| is_reshare | 帖子是否为转发。 |
| posted_at | 发布时间，ISO 8601 格式、UTC 时区（如 2026-08-07T12:34:56+00:00）。平台只给非标准字符串时原样透传，解析前建议做容错。null 表示平台未公开。 |
| platform | 数据来源平台标识，与请求里的 platform 一致（如 xiaohongshu、tiktok）。 |

## Example

```bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "linkedin",
  "action": "search",
  "params": {
    "keyword": "data engineer"
  }
}'
```

```python
import os
import requests

response = requests.post(
    "https://api.everyinfra.com/api/v1/social",
    headers={"Authorization": f"Bearer {os.environ['EVERYINFRA_API_KEY']}"},
    json={
        "platform": "linkedin",
        "action": "search",
        "params": {
            "keyword": "data engineer",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

Real response to the example request above, captured 2026-09-26T08:56:04Z. `results` and `count` are real with personal information (names, handles, avatars, profile links, contact details) removed; the list keeps the first 2 of 10. `id`, `billing` and `quota` differ on every call, so only their shape is shown.

```text
{
  "id": "req_…",
  "platform": "linkedin",
  "action": "search",
  "results": [
    {
      "id": "•••",
      "url": "https://www.linkedin.com/posts/triveni-p-186b23245_hiring-immediatejoiners-itjobs-activity-7509276127224463360-gDVu?utm_source=social_share_send&utm_medium=member_desktop_web&rcm=ACoAAG7RZS4Be0lZ9Txw3UPxtvjwYlh3m2T4qFQ",
      "text": "🚀 MULTIPLE IT OPENINGS | NOW HIRING\nHi All! 👋\nWe are looking for immediate to 15-day joiners for the below opportunities:\n📌 Open Positions\n▪️ Full Stack Data Engineer – 6–9 Yrs\n▪️ ETL + Automation Tester – 7–10 Yrs\n▪️ Informatica IDMC / MDM Consultant – 6+ Yrs\n▪️ GCP Data Enginee…",
      "author_name": "•••",
      "author_username": "•••",
      "like_count": 11,
      "comment_count": 0,
      "posted_at": "2026-09-25T17:42:24+00:00",
      "platform": "linkedin"
    },
    {
      "id": "•••",
      "url": "https://www.linkedin.com/posts/swapnilbandgar_dataengineer-hiring-aws-activity-7509255941473841153-s1yJ?utm_source=social_share_send&utm_medium=member_desktop_web&rcm=ACoAAG7RZS4Be0lZ9Txw3UPxtvjwYlh3m2T4qFQ",
      "text": "We’re hiring! Looking for a Data Engineer to join our team.\n📍 Location: Pune (Hybrid - 3 days/week)\n💻 Tech Stack: SQL, Python, AWS\n📈 Experience: 4+ years hands-on\n\nInterested? Shoot me a DM or tag someone who might be a great fit!\n\n#DataEngineer #Hiring #AWS #Python #SQL",
      "author_name": "•••",
      "author_username": "•••",
      "like_count": 19,
      "comment_count": 3,
      "posted_at": "2026-09-25T16:22:11+00:00",
      "platform": "linkedin"
    }
  ],
  "count": 10,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## Also

- Capability catalog (no key): https://api.everyinfra.com/api/v1/social/catalog?platform=linkedin
- OpenAPI: https://everyinfra.com/openapi.json · Agents guide: https://everyinfra.com/agents.md
