---
title: "Profile"
description: "获取 LinkedIn 会员的公开资料。"
---

```http
GET | POST /v1/linkedin/profile
```

参数可以用 `GET` 的查询字符串发送，也可以用 `POST` 的 JSON 请求体发送，两者等价。

## 传入内容

| 传入 | 读取内容 | 说明 |
|---|---|---|
| `username` | 该资料 | 个性化 handle（`in/…`）或 URL |

每次调用只传一个来源。所有标识符也都接受页面 URL。

## 参数

| Parameter | Type | Required | Notes |
|---|---|---|---|
| `username` | string |  | Person vanity handle (with or without in/, e.g. williamhgates), or the profile URL. |

## 请求

```bash tab="cURL"
curl "https://gateway.apinoa.com/v1/linkedin/profile?username=williamhgates" \
  -H "x-api-key: $APINOA_API_KEY"
```

```js tab="JavaScript"
const params = new URLSearchParams({ username: "williamhgates" });
const res = await fetch(`https://gateway.apinoa.com/v1/linkedin/profile?${params}`, {
  headers: { "x-api-key": process.env.APINOA_API_KEY },
});
const { success, data, error } = await res.json();
```

```python tab="Python"
import os

import requests

res = requests.get(
    "https://gateway.apinoa.com/v1/linkedin/profile",
    params={"username": "williamhgates"},
    headers={"x-api-key": os.environ["APINOA_API_KEY"]},
)
body = res.json()
```

## 响应

在 `data` 中返回 [`Account`](/docs/api-reference/sns/response-schema#account)。 真实响应的节选：数组只保留前几项，长文本已截断。

```json
{
  "success": true,
  "data": {
    "platform": "linkedin",
    "id": "williamhgates",
    "handle": "williamhgates",
    "displayName": "Bill Gates",
    "bio": "Chair of the Gates Foundation. Founder of Breakthrough Energy. Co-founder of Microsoft. Voracious reader. Avid traveler…",
    "url": "https://www.linkedin.com/in/williamhgates",
    "avatarUrl": "https://media.licdn.com/dms/image/v2/D5603AQF-RYZP55jmXA/profile-displayphoto-shrink_200_200/B56ZRi8g.aGsAY-/0/17368268…",
    "bannerUrl": "https://media.licdn.com/dms/image/v2/D5616AQEjhPbTCeblYg/profile-displaybackgroundimage-shrink_200_800/B56ZcytR5SGsAc-/…",
    "counts": {
      "followers": 40747885
    },
    "links": [
      {
        "url": "https://gatesnot.es/sourcecode-li",
        "title": "Blog"
      }
    ],
    "ext": {
      "memberId": "251749025",
      "headline": "Chair, Gates Foundation and Founder, Breakthrough Energy",
      "badges": [
        "Creator",
        "Top Voice"
      ],
      "connections": 8,
      "jobTitles": [
        "Co-chair",
        "Founder"
      ],
      "location": "Seattle, Washington, United States",
      "country": "US",
      "worksFor": [
        {
          "name": "Gates Foundation",
          "url": "https://www.linkedin.com/company/gates-foundation",
          "start": "2000",
          "startYear": 2000
        },
        {
          "name": "Breakthrough Energy",
          "url": "https://www.linkedin.com/company/breakthrough-energy",
          "start": "2015",
          "startYear": 2015
        }
      ],
      "experience": [
        {
          "title": "Co-chair",
          "company": "Gates Foundation",
          "companyUrl": "https://www.linkedin.com/company/gates-foundation",
          "logoUrl": "https://media.licdn.com/dms/image/v2/D560BAQEgMqqFTd40Tg/company-logo_100_100/company-logo_100_100/0/1736784969376/bill…",
          "start": "2000",
          "current": true,
          "duration": "26 years"
        },
        {
          "title": "Founder",
          "company": "Breakthrough Energy",
          "companyUrl": "https://www.linkedin.com/company/breakthrough-energy",
          "logoUrl": "https://media.licdn.com/dms/image/v2/D560BAQFRMYiQN7-2kA/company-logo_100_100/B56ZoI4SGPI0AQ-/0/1761085563539/breakthro…",
          "start": "2015",
          "current": true,
          "duration": "11 years"
        }
      ],
      "education": [
        {
          "school": "Harvard University",
          "url": "https://www.linkedin.com/school/harvard-university",
          "logoUrl": "https://media.licdn.com/dms/image/v2/C4E0BAQF5t62bcL0e9g/company-logo_100_100/company-logo_100_100/0/1631318058235?e=21…",
          "start": "1973",
          "end": "1975"
        },
        {
          "school": "Lakeside School",
          "url": "https://www.linkedin.com/school/lakeside-school",
          "logoUrl": "https://media.licdn.com/dms/image/v2/D560BAQGFmOQmzpxg9A/company-logo_100_100/company-logo_100_100/0/1683732883164/lake…"
        }
      ],
      "recentPosts": [
        {
          "platform": "linkedin",
          "id": "7519788335226302464",
          "url": "https://www.linkedin.com/posts/williamhgates_6-things-you-should-know-on-world-polio-day-activity-7519788335226302464-G…",
          "author": {
            "platform": "linkedin",
            "handle": "williamhgates",
            "displayName": "Bill Gates",
            "url": "https://www.linkedin.com/in/williamhgates",
            "avatarUrl": "https://media.licdn.com/dms/image/v2/D5603AQF-RYZP55jmXA/profile-displayphoto-shrink_200_200/B56ZRi8g.aGsAY-/0/17368268…",
            "ext": {
              "type": "person"
            }
          },
          "text": "In 1988, polio was endemic in 125 countries. Today, on World Polio Day, it's endemic in just two: Afghanistan and Pakis…",
          "createdAt": "2026-10-24T15:54:10.029Z",
          "media": [],
          "metrics": {
            "likes": 201,
            "comments": 41
          }
        }
      ]
    }
  }
}
```

## 错误

| 状态 | 代码 | 含义 |
|---|---|---|
| 400 | `INVALID_PARAMS` | 参数缺失、未知或超出范围。消息中会指出是哪一个。 |
| 401 | `UNAUTHORIZED` | 缺少 `x-api-key` 请求头，或密钥已吊销或未知。 |
| 402 | `INSUFFICIENT_BALANCE` | 余额不足以支付本次调用。请在控制台充值。 |
| 404 | `NOT_FOUND` | 账号、帖子或分组不存在，或为私密、已删除、有年龄限制。 |
| 429 | `MARKETPLACE_SATURATED` | 并发调用过多。请等待 `Retry-After` 秒后重试。 |
| 502 | `UPSTREAM_ERROR` | 平台返回了无法使用的内容。请退避后重试。 |

全部错误代码见 [Errors](/docs/errors)。失败的调用不计费。

## 价格

**Price** $0.001 per call. [List price](https://apinoa.com/en/pricing); the rate steps down above 1,000 calls a day.
