工具参考
操作
对来源和规则执行操作。12 个工具,附参数和调用示例。
Piqline 智能体的操作工具。在聊天中,每个工具都会请求确认。通过 API 时,带有 act scope 的直接调用即视为确认:只有在相关人员同意之后,才调用这些工具。
每次调用都是一个 POST 请求,密钥放在 Authorization: Bearer 中。JSON 请求体是工具的输入,响应形如 { "tool": "nom", "output": … }。示例中只包含必填参数。参数说明与智能体读到的相同。
subscribeSource#
订阅一个新来源。会启动真正的采集(读取任务、平台配额)。
POSThttps://piqline.com/api/v1/tools/subscribeSource
类型:操作。Scope:act。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
platform | instagram | tiktok | youtube | twitter | x | threads | linkedin | reddit | … | 是 | |
target | string | 否 | Handle, URL, mot-clé Marketplace, ou communauté. Une recherche LinkedIn peut s’appuyer sur query. |
title | string | 否 | |
facebookKind | page | group | marketplace | 否 | Facebook : page publique, groupe public, ou recherche Marketplace. |
tiktokKind | profile | live | 否 | TikTok only. live = /v1/tiktok/user/live probe, not profile posts. |
linkedinKind | company | search | 否 | LinkedIn only. search = recurring public-post search on query. |
location | string | 否 | Marketplace : ville ou zone. |
lat | number | 否 | |
lng | number | 否 | |
radiusKm | number | 否 | |
minPrice | number | 否 | |
maxPrice | number | 否 | |
sortBy | string | 否 | |
condition | string | 否 | |
dateListed | string | 否 | |
categoryId | string | 否 | |
delivery | string | 否 | |
availability | string | 否 | |
datePosted | last-hour | last-day | last-week | last-month | last-year | 否 | LinkedIn search only. Window of each run, default last-week. |
query | string | 否 | Marketplace keyword or LinkedIn search query. |
intent | string | 否 | LinkedIn search: the user's ask, kept on the source. |
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> | 否 | |
moreQueries | array<string> | 否 | LinkedIn search only. Up to 3 other phrases followed together with query, one per job family, each probed by probeLinkedinWatch with at least one relevant post. |
maxPosts | integer | 否 | LinkedIn search only. Posts read at most per run: 15, 50, 100 or 200 (default 50). Each post read uses credits; a run reads only posts newer than the last one stored. |
detectionAuthors | array<recruiter | founder | manager> | 否 | LinkedIn search only. Keep only posts whose author's title reads as one of these roles (recruiter, founder, manager). Empty = every author. |
rhythm | hourly | every_6h | daily | weekly | 否 | LinkedIn search only. Run rhythm chosen by the user (hourly, every_6h, daily, weekly). Omit to keep the rhythm suggested by the probe. |
investigation | object | 否 | Lot 7: pass the investigation object from probeLinkedinWatch unchanged. |
trackItemVariations | boolean | 否 | Marketplace / listing only. True only if the user explicitly asked to follow price, text or presence on the same item (T8). Default false: new items only. |
enrichFromUrl | boolean | 否 | Listing / web only. Open each item URL to read the page text. Default false. Each opened page uses credits. Set true only if the user explicitly asked. |
curl -s https://piqline.com/api/v1/tools/subscribeSource \
-H "Authorization: Bearer $PIQLINE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"platform":"instagram"}'const response = await fetch("https://piqline.com/api/v1/tools/subscribeSource", {
method: "POST",
headers: {
Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
"platform": "instagram"
}),
});
const { output } = await response.json();import os
import requests
response = requests.post(
"https://piqline.com/api/v1/tools/subscribeSource",
headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
json={
"platform": "instagram",
},
)
output = response.json()["output"]subscribeSources#
一次调用订阅多个来源,并为每个来源返回一个结果。
POSThttps://piqline.com/api/v1/tools/subscribeSources
类型:操作。Scope:act。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
sources | array<object> | 是 |
curl -s https://piqline.com/api/v1/tools/subscribeSources \
-H "Authorization: Bearer $PIQLINE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"sources":[{"platform":"instagram"}]}'const response = await fetch("https://piqline.com/api/v1/tools/subscribeSources", {
method: "POST",
headers: {
Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
"sources": [
{
"platform": "instagram"
}
]
}),
});
const { output } = await response.json();import os
import requests
response = requests.post(
"https://piqline.com/api/v1/tools/subscribeSources",
headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
json={
"sources": [
{
"platform": "instagram",
},
],
},
)
output = response.json()["output"]unsubscribeSource#
停止关注某个来源。已采集的条目保留在语料库中。
POSThttps://piqline.com/api/v1/tools/unsubscribeSource
类型:操作。Scope:act。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
sourceId | string | 是 | |
label | string | 否 | Nom lisible de la source (celui de listSources). Obligatoire pour la carte de confirmation. |
curl -s https://piqline.com/api/v1/tools/unsubscribeSource \
-H "Authorization: Bearer $PIQLINE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"sourceId":"5a0e9c1f-2b7d-4e63-8f14-d3c8a6b92e70"}'const response = await fetch("https://piqline.com/api/v1/tools/unsubscribeSource", {
method: "POST",
headers: {
Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
"sourceId": "5a0e9c1f-2b7d-4e63-8f14-d3c8a6b92e70"
}),
});
const { output } = await response.json();import os
import requests
response = requests.post(
"https://piqline.com/api/v1/tools/unsubscribeSource",
headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
json={
"sourceId": "5a0e9c1f-2b7d-4e63-8f14-d3c8a6b92e70",
},
)
output = response.json()["output"]setHomeDashboard#
把一个已保存的看板设为工作区首页。
POSThttps://piqline.com/api/v1/tools/setHomeDashboard
类型:操作。Scope:act。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
dashboardId | string | 是 | |
title | string | 否 | Titre du tableau, pour la carte de confirmation. Jamais l’identifiant seul. |
curl -s https://piqline.com/api/v1/tools/setHomeDashboard \
-H "Authorization: Bearer $PIQLINE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"dashboardId":"5a0e9c1f-2b7d-4e63-8f14-d3c8a6b92e70"}'const response = await fetch("https://piqline.com/api/v1/tools/setHomeDashboard", {
method: "POST",
headers: {
Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
"dashboardId": "5a0e9c1f-2b7d-4e63-8f14-d3c8a6b92e70"
}),
});
const { output } = await response.json();import os
import requests
response = requests.post(
"https://piqline.com/api/v1/tools/setHomeDashboard",
headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
json={
"dashboardId": "5a0e9c1f-2b7d-4e63-8f14-d3c8a6b92e70",
},
)
output = response.json()["output"]upsertSignalRule#
创建或更新持续性信号规则:当条目在线时间超过阈值时触发。
POSThttps://piqline.com/api/v1/tools/upsertSignalRule
类型:操作。Scope:act。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
ruleId | string | 否 | |
thresholdDays | integer | 否 | |
staleGraceDays | integer | 否 | |
itemTypes | array<post | video | article | listing | job_offer> | 否 | |
enabled | boolean | 否 |
curl -s https://piqline.com/api/v1/tools/upsertSignalRule \
-H "Authorization: Bearer $PIQLINE_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'const response = await fetch("https://piqline.com/api/v1/tools/upsertSignalRule", {
method: "POST",
headers: {
Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({}),
});
const { output } = await response.json();import os
import requests
response = requests.post(
"https://piqline.com/api/v1/tools/upsertSignalRule",
headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
json={},
)
output = response.json()["output"]upsertQuestionRule#
创建或更新常设问题:一句用日常语言写的话,Jev 会对工作区来源中的每个新条目提出这个问题。概率阈值决定信号。
POSThttps://piqline.com/api/v1/tools/upsertQuestionRule
类型:操作。Scope:act。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
ruleId | string | 否 | |
question | string | 是 | |
minProbability | number | 否 | |
itemTypes | array<post | video | article | listing | job_offer> | 否 | |
enabled | boolean | 否 |
curl -s https://piqline.com/api/v1/tools/upsertQuestionRule \
-H "Authorization: Bearer $PIQLINE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"question":"texte"}'const response = await fetch("https://piqline.com/api/v1/tools/upsertQuestionRule", {
method: "POST",
headers: {
Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
"question": "texte"
}),
});
const { output } = await response.json();import os
import requests
response = requests.post(
"https://piqline.com/api/v1/tools/upsertQuestionRule",
headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
json={
"question": "texte",
},
)
output = response.json()["output"]startInvestigation#
为此工作区把一项后台 Edge 调查加入队列(所有者或管理员)。
POSThttps://piqline.com/api/v1/tools/startInvestigation
类型:操作。Scope:act。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
intent | string | 是 | Need in one sentence, from sujets / zones / langues already noted |
perimeter | object | 否 | Optional sectors, geos, accounts, seed URLs from the need profile |
curl -s https://piqline.com/api/v1/tools/startInvestigation \
-H "Authorization: Bearer $PIQLINE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"intent":"texte"}'const response = await fetch("https://piqline.com/api/v1/tools/startInvestigation", {
method: "POST",
headers: {
Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
"intent": "texte"
}),
});
const { output } = await response.json();import os
import requests
response = requests.post(
"https://piqline.com/api/v1/tools/startInvestigation",
headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
json={
"intent": "texte",
},
)
output = response.json()["output"]startHunt#
启动搜寻:查找满足可验证标准的人员,每项标准都有带日期的公开来源作证。敏感标准会被拒绝,也不会返回联系方式。在后台运行,并消耗当月积分;所有者或管理员。
POSThttps://piqline.com/api/v1/tools/startHunt
类型:操作。Scope:act。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
brief | string | 是 | Who to find, in one or two sentences. |
purpose | string | 是 | Why these people are sought, in one sentence. Recorded with the hunt. |
criteria | array<object> | 是 | |
target | integer | 否 | How many people to find. |
curl -s https://piqline.com/api/v1/tools/startHunt \
-H "Authorization: Bearer $PIQLINE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"brief":"texte","purpose":"texte","criteria":[{"label":"texte"}]}'const response = await fetch("https://piqline.com/api/v1/tools/startHunt", {
method: "POST",
headers: {
Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
"brief": "texte",
"purpose": "texte",
"criteria": [
{
"label": "texte"
}
]
}),
});
const { output } = await response.json();import os
import requests
response = requests.post(
"https://piqline.com/api/v1/tools/startHunt",
headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
json={
"brief": "texte",
"purpose": "texte",
"criteria": [
{
"label": "texte",
},
],
},
)
output = response.json()["output"]buildAdAudit#
对已采集的 1 到 6 个广告主的投放活动做追溯审计,覆盖 N 个月:生成一张工作区表格(广告主、月份、新增广告、停投、广告库、国家、已读取的需求、放量)以及带引用的摘要所用的数字。不消耗积分。
POSThttps://piqline.com/api/v1/tools/buildAdAudit
类型:写入。Scope:write。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
advertisers | array<string> | 是 | Names of the advertisers, as in the collections. |
months | integer | 否 | |
name | string | 否 | Table name. Default: « Audit publicitaire ». |
curl -s https://piqline.com/api/v1/tools/buildAdAudit \
-H "Authorization: Bearer $PIQLINE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"advertisers":["texte"]}'const response = await fetch("https://piqline.com/api/v1/tools/buildAdAudit", {
method: "POST",
headers: {
Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
"advertisers": [
"texte"
]
}),
});
const { output } = await response.json();import os
import requests
response = requests.post(
"https://piqline.com/api/v1/tools/buildAdAudit",
headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
json={
"advertisers": [
"texte",
],
},
)
output = response.json()["output"]findCreatorSponsors#
谁在某个细分领域赞助 YouTube 创作者:搜索近期视频,从每个视频推断赞助商,生成“赞助商 · 领域”工作区表格。会消耗积分;在聊天中需确认,所有者或管理员。
POSThttps://piqline.com/api/v1/tools/findCreatorSponsors
类型:操作。Scope:act, write, explore。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
niche | string | 是 | Words of the niche, as a creator would title a video (« compléments alimentaires »). |
videos | integer | 否 | |
period | this_week | this_month | this_year | 否 | |
country | string | 否 | YouTube region, FR by default. |
follow | boolean | 否 | true: follow the niche, run again every week, and raise A13 when a brand starts sponsoring creators of the niche (in the bell and alert e-mails). |
curl -s https://piqline.com/api/v1/tools/findCreatorSponsors \
-H "Authorization: Bearer $PIQLINE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"niche":"texte"}'const response = await fetch("https://piqline.com/api/v1/tools/findCreatorSponsors", {
method: "POST",
headers: {
Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
"niche": "texte"
}),
});
const { output } = await response.json();import os
import requests
response = requests.post(
"https://piqline.com/api/v1/tools/findCreatorSponsors",
headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
json={
"niche": "texte",
},
)
output = response.json()["output"]importAdHistory#
导入某个广告主采集的 Google 历史:最多 20 页(自 2021 年以来约 800 条广告),用于标注过往投放的日期。会消耗积分;在聊天中需确认,所有者或管理员。
POSThttps://piqline.com/api/v1/tools/importAdHistory
类型:操作。Scope:act, write, explore。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
collection | string | 是 | Name of the advertiser collection. |
curl -s https://piqline.com/api/v1/tools/importAdHistory \
-H "Authorization: Bearer $PIQLINE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"collection":"texte"}'const response = await fetch("https://piqline.com/api/v1/tools/importAdHistory", {
method: "POST",
headers: {
Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
"collection": "texte"
}),
});
const { output } = await response.json();import os
import requests
response = requests.post(
"https://piqline.com/api/v1/tools/importAdHistory",
headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
json={
"collection": "texte",
},
)
output = response.json()["output"]startAdCollection#
针对某个广告主(名称或域名)或关键词启动广告采集:读取 Meta、TikTok、Google 和 LinkedIn,把每条广告统一为相同格式,然后判读角度、优惠、受众和语气。会消耗积分;在聊天中需确认,所有者或管理员。
POSThttps://piqline.com/api/v1/tools/startAdCollection
类型:操作。Scope:act, write, explore。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
query | string | 是 | Nom ou domaine de l'annonceur (kind advertiser), ou mot-clé (kind keyword). |
kind | advertiser | keyword | 否 | |
libraries | array<meta | tiktok | google | linkedin> | 否 | Bibliothèques à lire. Google ne cherche pas par mot-clé. |
country | string | 否 | Code pays ISO. Restreint Meta et LinkedIn, choisit l'entité annonceur de Google (FR par défaut). Courants : FR, BE, CH, LU, DE, ES, IT, NL, GB, IE, US, CA, MA, SN, CI, AU, BR, JP. |
depth | apercu | large | 否 | apercu : une page par bibliothèque. large : jusqu'à quatre pages (plus long). |
cadence | manuel | quotidien | hebdomadaire | 否 | manuel : à la main. quotidien ou hebdomadaire : la collecte se repasse seule, dans le plafond du jour, et ses signaux arrivent dans la cloche. |
curl -s https://piqline.com/api/v1/tools/startAdCollection \
-H "Authorization: Bearer $PIQLINE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query":"levée de fonds"}'const response = await fetch("https://piqline.com/api/v1/tools/startAdCollection", {
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();import os
import requests
response = requests.post(
"https://piqline.com/api/v1/tools/startAdCollection",
headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
json={
"query": "levée de fonds",
},
)
output = response.json()["output"]