> ## Documentation Index
> Fetch the complete documentation index at: https://docs.brightdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 向每个 LinkedIn 端点发送第一个请求

> 通过复制粘贴代码示例向所有四个 Bright Data LinkedIn Scraper API 端点发送同步请求。

本教程将引导您向每个 Bright Data LinkedIn Scraper API 端点发送同步请求。完成后，您将获得用于个人资料、公司、职位和帖子的工作示例。

## 前置条件

* 一个 [Bright Data 账户](https://www.bright.cn/cp/start)，具有有效的 API 密钥
* 已完成 [快速入门](/cn/datasets/scrapers/linkedin/quickstart)

## 请求结构

每个同步请求都遵循相同的模式：

```
POST https://api.brightdata.com/datasets/v3/scrape?dataset_id={DATASET_ID}&format=json
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

[{"url": "https://www.linkedin.com/..."}]
```

端点之间唯一改变的是 `dataset_id` 和输入 URL 格式。

<Note>
  同步请求最多支持 20 个 URL，超时时间为 1 分钟。如果请求耗时较长，API 将自动返回 `snapshot_id`。请参阅[异步请求](/cn/datasets/scrapers/linkedin/async-requests)。
</Note>

## 个人资料

**数据集 ID：** `gd_l1viktl72bvl7bjuj0`

```bash theme={null}
curl -X POST \
  "https://api.brightdata.com/datasets/v3/scrape?dataset_id=gd_l1viktl72bvl7bjuj0&format=json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[{"url": "https://www.linkedin.com/in/satyanadella"}]'
```

您应该看到 `200` 响应。这需要 10-30 秒。

<Accordion title="示例响应">
  ```json theme={null}
  [
    {
      "name": "Satya Nadella",
      "city": "Redmond",
      "country_code": "US",
      "position": "Chairman and CEO at Microsoft",
      "current_company": {
        "name": "Microsoft",
        "company_id": "microsoft",
        "link": "https://www.linkedin.com/company/microsoft"
      },
      "about": "Chairman and CEO at Microsoft...",
      "followers": 10842560,
      "connections": 500
    }
  ]
  ```
</Accordion>

[完整个人资料响应模式](/api-reference/scrapers/social-media-apis/linkedin-profiles-collect-by-url)

## 公司

**数据集 ID：** `gd_l1vikfnt1wgvvqz95w`

```bash theme={null}
curl -X POST \
  "https://api.brightdata.com/datasets/v3/scrape?dataset_id=gd_l1vikfnt1wgvvqz95w&format=json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[{"url": "https://www.linkedin.com/company/microsoft"}]'
```

<Accordion title="示例响应">
  ```json theme={null}
  [
    {
      "name": "Microsoft",
      "followers": 23000000,
      "employees_in_linkedin": 290000,
      "about": "Every company has a mission...",
      "industries": ["Software Development"],
      "company_size": "10,001+ employees",
      "headquarters": "Redmond, Washington",
      "website": "https://www.microsoft.com",
      "founded": "1975"
    }
  ]
  ```
</Accordion>

[完整公司响应模式](/api-reference/scrapers/social-media-apis/linkedin-companies-collect-by-url)

## 职位

**数据集 ID：** `gd_lpfll7v5hcqtkxl6l`

```bash theme={null}
curl -X POST \
  "https://api.brightdata.com/datasets/v3/scrape?dataset_id=gd_lpfll7v5hcqtkxl6l&format=json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[{"url": "https://www.linkedin.com/jobs/view/3986111804"}]'
```

<Accordion title="示例响应">
  ```json theme={null}
  [
    {
      "job_title": "Software Engineer",
      "company_name": "Epic",
      "job_location": "Verona, WI",
      "job_seniority_level": "Entry level",
      "job_employment_type": "Full-time",
      "job_industries": ["Software Development"],
      "job_summary": "Work on healthcare software that impacts millions...",
      "apply_link": "https://www.linkedin.com/jobs/view/3986111804/apply",
      "is_easy_apply": true
    }
  ]
  ```
</Accordion>

[完整职位响应模式](/api-reference/scrapers/social-media-apis/linkedin-jobs-collect-by-url)

## 帖子

**数据集 ID：** `gd_lyy3tktm25m4avu764`

```bash theme={null}
curl -X POST \
  "https://api.brightdata.com/datasets/v3/scrape?dataset_id=gd_lyy3tktm25m4avu764&format=json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[{"url": "https://www.linkedin.com/posts/satyanadella_activity-7180537307521769472"}]'
```

<Accordion title="示例响应">
  ```json theme={null}
  [
    {
      "post_text": "Excited to share our latest AI innovations...",
      "num_likes": 45230,
      "num_comments": 1250,
      "date_posted": "2024-04-03T14:30:00.000Z",
      "hashtags": ["AI", "Innovation"],
      "user_followers": 10842560,
      "post_type": "original"
    }
  ]
  ```
</Accordion>

[完整帖子响应模式](/api-reference/scrapers/social-media-apis/linkedin-posts-collect-by-url)

## 快速参考：数据集 ID

| 端点   | 数据集 ID                  | URL 模式                        |
| :--- | :---------------------- | :---------------------------- |
| 个人资料 | `gd_l1viktl72bvl7bjuj0` | `linkedin.com/in/{username}`  |
| 公司   | `gd_l1vikfnt1wgvvqz95w` | `linkedin.com/company/{slug}` |
| 职位   | `gd_lpfll7v5hcqtkxl6l`  | `linkedin.com/jobs/view/{id}` |
| 帖子   | `gd_lyy3tktm25m4avu764` | `linkedin.com/posts/{slug}`   |

## 输出格式

使用 `format` 查询参数控制响应格式：

| 值        | 描述                |
| :------- | :---------------- |
| `json`   | JSON 数组（默认）       |
| `ndjson` | 换行分隔的 JSON，每行一条记录 |
| `csv`    | 逗号分隔值             |

## 后续步骤

<CardGroup cols={2}>
  <Card title="异步批处理请求" icon="layer-group" href="/cn/datasets/scrapers/linkedin/async-requests">
    在单个批处理作业中抓取数百个 URL。
  </Card>

  <Card title="API 参考" icon="code" href="/api-reference/scrapers/social-media-apis/linkedin-profiles-collect-by-url">
    完整的参数和响应字段参考。
  </Card>
</CardGroup>
