people.enrich — routed: best of 27 providers, own keys first
treg.people.enrichEnrich a person from an email, a LinkedIn URL or a name + company domain — treg picks the provider and names the one that served
- 价格
- $0.000495/success按目录价
- 成功率
- 71.9%近 30 天 · 396,119 次
- 延迟 p50
- ——
- 最后验证
- —尚未验证
POSThttps://toolswitch.dev/v1/tools/treg.people.enrichBeta- 可用平台额度调用
- 同步返回
- 读取公开数据
参数
Send everything you know about the subject — treg derives the rest (full_name ⇄ first+last), matches each provider on the variants it accepts ({email} | {linkedin_url} | {linkedin_handle} | {domain, full_name} | {domain, first_name, last_name}) and sends each provider only the fields it wants. On a miss treg keeps trying providers, cheapest first, within X-Treg-Route-Max-Cost (default $1 per call; misses on per-success providers are free). Options ride as headers, never in the body: X-Treg-Route-Waterfall: 0 (stop at the first miss), X-Treg-Route-Max-Cost: <usd>, X-Treg-Route-Prefer / X-Treg-Route-Exclude: <provider>. The response is {output, raw, _treg: {served_by, tried}}; X-Treg-Served-By names the child.
| 参数 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| 请求体(JSON) | ||||
email | str | 可选 | identity key (part of email) | … |
domain | str | 可选 | identity key (part of domain+full_name, domain+first_name+last_name) | |
full_name | str | 可选 | identity key (part of domain+full_name) | |
last_name | str | 可选 | identity key (part of domain+first_name+last_name) | |
first_name | str | 可选 | identity key (part of domain+first_name+last_name) | |
linkedin_url | url | 可选 | identity key (part of linkedin_url) | |
linkedin_handle | str | 可选 | identity key (part of linkedin_handle) | |
- 请求体(JSON)
emailstr可选identity key (part of email)
示例:
…domainstr可选identity key (part of domain+full_name, domain+first_name+last_name)
full_namestr可选identity key (part of domain+full_name)
last_namestr可选identity key (part of domain+first_name+last_name)
first_namestr可选identity key (part of domain+first_name+last_name)
linkedin_urlurl可选identity key (part of linkedin_url)
linkedin_handlestr可选identity key (part of linkedin_handle)
代码示例
将 $TOOLSWITCH_KEY 替换为你在控制台创建的密钥。
curl -X POST 'https://toolswitch.dev/v1/tools/treg.people.enrich' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY" \
-H "Content-Type: application/json" \
--data-raw '{"email":"…"}'import os
import json
import requests
response = requests.request(
"POST",
"https://toolswitch.dev/v1/tools/treg.people.enrich",
headers={"X-Toolswitch-Key": os.environ["TOOLSWITCH_KEY"]},
json=json.loads("{\"email\":\"…\"}"),
)
response.raise_for_status()
print(response.text)const response = await fetch("https://toolswitch.dev/v1/tools/treg.people.enrich", {
method: "POST",
headers: {
"X-Toolswitch-Key": process.env.TOOLSWITCH_KEY ?? "",
"Content-Type": "application/json",
},
body: JSON.stringify(JSON.parse("{\"email\":\"…\"}")),
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
console.log(await response.text());网关接口为 Beta,地址与鉴权方式可能变更。 示例参数仅为样例数据。 调用按 $0.000495/success 计费,已含服务费。