返回顶部
h

happenstance偶然网络搜索

Search your professional network and research people using the Happenstance API.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
692
下载量
免费
免费
8
收藏
概述
安装方式
版本历史

happenstance

机缘巧合

搜索你的人脉网络,并使用机缘巧合API获取关于他人的详细研究档案。

文档:https://developer.happenstance.ai

身份验证

所有请求都需要设置 HAPPENSTANCEAPIKEY 环境变量。以Bearer令牌形式传递:

Authorization: Bearer $HAPPENSTANCEAPIKEY

基础URL:https://api.happenstance.ai

计费

  • - 搜索:每次搜索消耗2个积分(包括查找更多)
  • 研究:每次完成的研究消耗1个积分
  • 通过 GET /v1/usage 查询余额
  • 在 https://happenstance.ai/settings/api 购买积分

可用操作

1. 搜索你的人脉网络

在群组和联系人中搜索人员。搜索以异步方式运行。

开始搜索:

bash
curl -s -X POST https://api.happenstance.ai/v1/search \
-H Authorization: Bearer $HAPPENSTANCEAPIKEY \
-H Content-Type: application/json \
-d {
text: 从事AI基础设施的工程师,
includemyconnections: true,
includefriendsconnections: true
}

你也可以通过添加 group_ids: [uuid1, uuid2] 在特定群组内搜索。通过 GET /v1/groups 获取群组ID。

至少需要一个搜索来源:groupids、includemyconnections: true 或 includefriends_connections: true。

响应:

json
{id: search-uuid, url: https://happenstance.ai/search/search-uuid}

轮询结果(每5-10秒,直到状态变为 COMPLETED 或 FAILED):

bash
curl -s https://api.happenstance.ai/v1/search/SEARCH_ID \
-H Authorization: Bearer $HAPPENSTANCEAPIKEY

完成后的响应包括:

  • - status:RUNNING、COMPLETED 或 FAILED
  • results:人员数组,每个包含 id、name、currenttitle、currentcompany、summary、weightedtraitsscore、socials(包含 happenstanceurl、linkedinurl、twitterurl)、mutuals 和 traits
  • hasmore:布尔值,表示是否还有更多结果
  • mutuals:顶层共同联系人数组(结果通过索引引用)
  • traits:顶层特征定义数组(结果通过索引引用)

2. 查找更多结果

当已完成搜索的 has_more 为 true 时,获取排除所有已返回人员的额外结果。消耗2个积分。

bash
curl -s -X POST https://api.happenstance.ai/v1/search/SEARCH_ID/find-more \
-H Authorization: Bearer $HAPPENSTANCEAPIKEY

响应:

json
{pageid: page-uuid, parentsearch_id: search-uuid}

然后使用page_id进行轮询:

bash
curl -s https://api.happenstance.ai/v1/search/SEARCHID?pageid=PAGE_ID \
-H Authorization: Bearer $HAPPENSTANCEAPIKEY

3. 研究一个人

获取特定人员的详细专业档案。以异步方式运行。

开始研究:

bash
curl -s -X POST https://api.happenstance.ai/v1/research \
-H Authorization: Bearer $HAPPENSTANCEAPIKEY \
-H Content-Type: application/json \
-d {description: Garry Tan,Y Combinator CEO,Twitter @garrytan}

为获得最佳结果,请包含尽可能多的详细信息(全名、公司、职位、地点、社交媒体账号)。

响应:

json
{id: research-uuid}

轮询结果(每5-10秒,直到状态变为 COMPLETED、FAILED 或 FAILED_AMBIGUOUS):

bash
curl -s https://api.happenstance.ai/v1/research/RESEARCH_ID \
-H Authorization: Bearer $HAPPENSTANCEAPIKEY

完成后的响应包含一个 profile 对象,包括:

  • - personmetadata:fullname、alternatenames、profileurls、currentlocations、tagline
  • employment:工作数组,包含 companyname、jobtitle、startdate、enddate、description
  • education:数组,包含 universityname、degree、startdate、enddate
  • projects:数组,包含 title、description、urls
  • writings:出版物数组,包含 title、description、date、urls
  • hobbies:数组,包含 description
  • summary:整体 text 摘要,附带支持性 urls

4. 列出群组

获取你可以在其中搜索的群组:

bash
curl -s https://api.happenstance.ai/v1/groups \
-H Authorization: Bearer $HAPPENSTANCEAPIKEY

返回 {groups: [{id: uuid, name: 群组名称}, ...]}。

5. 检查积分和使用情况

bash
curl -s https://api.happenstance.ai/v1/usage \
-H Authorization: Bearer $HAPPENSTANCEAPIKEY

返回 balancecredits、hascredits、purchases、usage 历史记录和 auto_reload 设置。

错误处理

错误使用RFC 7807格式:

json
{type: about:blank, title: 错误请求, status: 400, detail: 描述不能为空, instance: /v1/research}

关键状态码:

  • - 401:API密钥无效或缺失
  • 402:积分不足
  • 429:并发请求过多(最多10个正在运行的搜索或研究请求)
  • 500/503:服务器错误,请退避重试

提示

  • - 在开始多个搜索或研究请求之前,始终检查积分。
  • 搜索通常在30-60秒内完成。研究需要1-3分钟。
  • 每次搜索最多返回30个结果。使用查找更多获取额外页面。
  • 展示搜索结果时,包括人员姓名、职位、公司、摘要和机缘巧合档案链接。
  • 展示研究结果时,总结档案并链接到来源。
  • 用户连接的数据源越多,搜索结果越好。

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 happenstance-1776420052 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 happenstance-1776420052 技能

通过命令行安装

skillhub install happenstance-1776420052

下载

⬇ 下载 happenstance v1.0.0(免费)

文件大小: 2.71 KB | 发布时间: 2026-4-17 20:19

v1.0.0 最新 2026-4-17 20:19
Initial release — Happenstance API skill

- Search your professional network and research people using the Happenstance API.
- Start asynchronous network searches, research profiles, and page through results.
- List available groups to search, and check credit/usage balances.
- Includes detailed instructions for authentication, error handling, and tips for better results.
- Requires HAPPENSTANCE_API_KEY environment variable and curl.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部