# LinkedIn

> LinkedIn。10 个工具，附参数和调用示例。

Source: https://piqline.com/zh/docs/api/reference/linkedin

LinkedIn 智能体的工具：实时读取公开帖子、公司主页和广告。从不读取联系方式。

每次调用都是一个 `POST` 请求，密钥放在 `Authorization: Bearer` 中。JSON 请求体是工具的输入，响应形如 `{ "tool": "nom", "output": … }`。示例中只包含必填参数。参数说明与智能体读到的相同。

### `searchLinkedinPosts`

按关键词实时搜索公开帖子，最新的在前（结果中会标明只读取了一部分）；当帖子为招聘时，附作者的头衔和职位，并包含由代码计算的信号：招聘、融资、发布、扩张、重组、可用状态、离职。

`POST https://piqline.com/api/v1/tools/searchLinkedinPosts`

类型：实时读取。Scope：`explore`。

| 参数 | 类型 | 必填 | 说明 |
| --- | --- | --- | --- |
| `query` | `string` | 是 | One exact phrase in double quotes as the post would say it, plus at most one or two plain words, e.g. '"je recrute" développeur'. No OR, no parentheses. |
| `datePosted` | `last-hour \| last-day \| last-week \| last-month \| last-year` | 否 |  |
| `focus` | `all \| people \| hiring \| signals` | 否 | people = only posts carrying a person pointer, hiring = hiring posts, signals = any signal |
| `moreQueries` | `array<string>` | 否 | Up to 3 other exact phrases searched together with `query`, same writing rule, e.g. ['"nous recrutons"', '"on recrute"']. They share `depth`. |
| `depth` | `integer` | 否 | Posts read at most, all formulas together: 15, 50, 100 or 200. One credit per post read. 15 for a quick look; 100 is the Auto value of a broad search. |
| `intent` | `string` | 否 | What sets the wanted posts apart, in the user's language: the job families or the topic, with a few concrete words, e.g. 'Métiers de la tech, de l'IT et de la vente : développeur, data, devops, produit, commercial, account executive, SDR'. Do NOT write what… |
| `relevance` | `wide \| balanced \| strict` | 否 | How close to `intent` a post must be: wide keeps more, strict keeps few. Ignored without `intent`. |
| `author` | `all \| recruiter \| founder \| manager` | 否 | Keep only posts whose author's title reads as recruiter, founder or manager. Titles exist on hiring posts only. |
| `order` | `recent \| closest` | 否 | recent = newest first; closest = closest in meaning to `intent` first. |
| `place` | `string` | 否 | Place the user cares about, e.g. 'France' or 'Lyon'. It weighs in the closeness score; it is not a hard filter. |
| `tuning` | `auto \| manual` | 否 | auto = these values were chosen by you; the card sets manual when the user changed them. |
| `cursor` | `string` | 否 | nextCursor from a previous call |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/searchLinkedinPosts \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"levée de fonds"}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/searchLinkedinPosts", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "query": "levée de fonds"
  }),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/searchLinkedinPosts",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={
        "query": "levée de fonds",
    },
)
output = response.json()["output"]
```

### `probeLinkedinWatch`

在订阅 LinkedIn 监控之前，试探 1 到 3 个查询变体，并返回要附加到订阅上的调查票据。

`POST https://piqline.com/api/v1/tools/probeLinkedinWatch`

类型：实时读取。Scope：`explore`。

| 参数 | 类型 | 必填 | 说明 |
| --- | --- | --- | --- |
| `intent` | `string` | 是 | User ask in natural language, e.g. « Suis les levées série A fintech chaque semaine » |
| `variants` | `array<object>` | 是 | Candidate keyword formulations as the market writes them |
| `detectionEvent` | `hiring \| funding \| launch \| expansion \| reorg \| open_to_work \| leaving \| interested_comment \| …` | 否 |  |
| `detectionRounds` | `array<pre_seed \| seed \| series_a \| series_b \| series_c \| series_d \| bridge \| extension \| …>` | 否 |  |
| `detectionSectors` | `array<string>` | 否 |  |
| `detectionGeos` | `array<string>` | 否 |  |
| `detectionVocabulary` | `array<string>` | 否 |  |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/probeLinkedinWatch \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"intent":"texte","variants":[{"query":"levée de fonds"}]}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/probeLinkedinWatch", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "intent": "texte",
    "variants": [
      {
        "query": "levée de fonds"
      }
    ]
  }),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/probeLinkedinWatch",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={
        "intent": "texte",
        "variants": [
            {
                "query": "levée de fonds",
            },
        ],
    },
)
output = response.json()["output"]
```

### `getLinkedinPost`

读取公开帖子或文章：文本、作者、日期、互动、带信号的评论。

`POST https://piqline.com/api/v1/tools/getLinkedinPost`

类型：实时读取。Scope：`explore`。

| 参数 | 类型 | 必填 | 说明 |
| --- | --- | --- | --- |
| `url` | `string` | 是 | linkedin.com/posts/…, /feed/update/… or /pulse/… |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/getLinkedinPost \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://exemple.fr/article"}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/getLinkedinPost", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "url": "https://exemple.fr/article"
  }),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/getLinkedinPost",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={
        "url": "https://exemple.fr/article",
    },
)
output = response.json()["output"]
```

### `getLinkedinPostTranscript`

公开帖子中视频的转写，仅在转写存在时才计费。

`POST https://piqline.com/api/v1/tools/getLinkedinPostTranscript`

类型：实时读取。Scope：`explore`。

| 参数 | 类型 | 必填 | 说明 |
| --- | --- | --- | --- |
| `url` | `string` | 是 | URL of the LinkedIn video post |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/getLinkedinPostTranscript \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://exemple.fr/article"}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/getLinkedinPostTranscript", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "url": "https://exemple.fr/article"
  }),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/getLinkedinPostTranscript",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={
        "url": "https://exemple.fr/article",
    },
)
output = response.json()["output"]
```

### `getLinkedinCompany`

公开的公司主页：简介、人数、行业、融资、最新帖子及其信号。

`POST https://piqline.com/api/v1/tools/getLinkedinCompany`

类型：实时读取。Scope：`explore`。

| 参数 | 类型 | 必填 | 说明 |
| --- | --- | --- | --- |
| `company` | `string` | 是 | URL linkedin.com/company/… ou handle (ex. shopify) |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/getLinkedinCompany \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"company":"texte"}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/getLinkedinCompany", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "company": "texte"
  }),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/getLinkedinCompany",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={
        "company": "texte",
    },
)
output = response.json()["output"]
```

### `getLinkedinCompanyPosts`

公司主页的较早帖子，附信号摘要（招聘、融资、发布）。

`POST https://piqline.com/api/v1/tools/getLinkedinCompanyPosts`

类型：实时读取。Scope：`explore`。

| 参数 | 类型 | 必填 | 说明 |
| --- | --- | --- | --- |
| `company` | `string` | 是 | URL linkedin.com/company/… ou handle |
| `page` | `integer` | 否 |  |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/getLinkedinCompanyPosts \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"company":"texte"}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/getLinkedinCompanyPosts", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "company": "texte"
  }),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/getLinkedinCompanyPosts",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={
        "company": "texte",
    },
)
output = response.json()["output"]
```

### `searchLinkedinAds`

搜索广告库：广告主、形式、日期、展示量。

`POST https://piqline.com/api/v1/tools/searchLinkedinAds`

类型：实时读取。Scope：`explore`。

| 参数 | 类型 | 必填 | 说明 |
| --- | --- | --- | --- |
| `company` | `string` | 否 | Nom d’entreprise, ex. Shopify |
| `companyId` | `string` | 否 | Id numérique LinkedIn de l’entreprise |
| `keyword` | `string` | 否 | Mot-clé secteur |
| `countries` | `string` | 否 | Codes pays ISO séparés par des virgules, ex. FR,ES |
| `startDate` | `string` | 否 |  |
| `endDate` | `string` | 否 |  |
| `paginationToken` | `string` | 否 |  |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/searchLinkedinAds \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/searchLinkedinAds", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({}),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/searchLinkedinAds",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={},
)
output = response.json()["output"]
```

### `getLinkedinAd`

广告库中某条广告的详情：定向、各国展示量、投放时长。

`POST https://piqline.com/api/v1/tools/getLinkedinAd`

类型：实时读取。Scope：`explore`。

| 参数 | 类型 | 必填 | 说明 |
| --- | --- | --- | --- |
| `url` | `string` | 是 | linkedin.com/ad-library/detail/… URL |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/getLinkedinAd \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://exemple.fr/article"}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/getLinkedinAd", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "url": "https://exemple.fr/article"
  }),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/getLinkedinAd",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={
        "url": "https://exemple.fr/article",
    },
)
output = response.json()["output"]
```

### `matchLinkedinPosts`

依据公开帖子，把可用的人员与机会匹配（两次搜索）。

`POST https://piqline.com/api/v1/tools/matchLinkedinPosts`

类型：实时读取。Scope：`explore`。

| 参数 | 类型 | 必填 | 说明 |
| --- | --- | --- | --- |
| `peopleQuery` | `string` | 是 |  |
| `opportunityQuery` | `string` | 是 |  |
| `datePosted` | `last-hour \| last-day \| last-week \| last-month \| last-year` | 否 |  |
| `semantic` | `boolean` | 否 | Re-rank by closeness in meaning when available |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/matchLinkedinPosts \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"peopleQuery":"texte","opportunityQuery":"texte"}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/matchLinkedinPosts", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "peopleQuery": "texte",
    "opportunityQuery": "texte"
  }),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/matchLinkedinPosts",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={
        "peopleQuery": "texte",
        "opportunityQuery": "texte",
    },
)
output = response.json()["output"]
```

### `getLinkedinProfile`

有边界地读取公开的 `/in/` 个人主页，仅限从点名该人的公开帖子出发。仅限已开启此选项的工作区使用。

`POST https://piqline.com/api/v1/tools/getLinkedinProfile`

类型：实时读取。Scope：`explore`。

| 参数 | 类型 | 必填 | 说明 |
| --- | --- | --- | --- |
| `url` | `string` | 是 | linkedin.com/in/… URL from a pointer or pasted by the user |
| `basis` | `pointer \| pasted` | 是 |  |
| `postUrl` | `string` | 否 | Required with basis='pointer': the public post carrying the signal |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/getLinkedinProfile \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://exemple.fr/article","basis":"pointer"}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/getLinkedinProfile", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "url": "https://exemple.fr/article",
    "basis": "pointer"
  }),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/getLinkedinProfile",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={
        "url": "https://exemple.fr/article",
        "basis": "pointer",
    },
)
output = response.json()["output"]
```
