with one click
happenstance
使用 **Happenstance API** 在你的专业人脉网络中搜索并研究相关人员。
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
使用 **Happenstance API** 在你的专业人脉网络中搜索并研究相关人员。
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
| name | happenstance |
| description | 使用 **Happenstance API** 在你的专业人脉网络中搜索并研究相关人员。 |
| metadata | {"openclaw":{"requires":{"env":["HAPPENSTANCE_API_KEY"],"bins":["curl"]},"primaryEnv":"HAPPENSTANCE_API_KEY"}} |
使用 Happenstance API 可以搜索您的网络中的用户,并获取他们的详细研究资料。
文档链接:https://developer.happenstance.ai
所有请求都需要 HAPPENSTANCE_API_KEY 环境变量。请将其作为 Bearer 令牌传递:
Authorization: Bearer $HAPPENSTANCE_API_KEY
基础 URL:https://api.happenstance.ai
GET /v1/usage 查看余额。可以在不同的群组和联系人中搜索用户。搜索操作是异步进行的。
开始搜索:
curl -s -X POST https://api.happenstance.ai/v1/search \
-H "Authorization: Bearer $HAPPENSTANCE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "engineers who have worked on AI infrastructure",
"include_my_connections": true,
"include_friends_connections": true
}'
您也可以通过添加 "group_ids": ["uuid1", "uuid2"] 来在特定群组内进行搜索。群组 ID 可以通过 GET /v1/groups 获取。
至少需要一个搜索条件:group_ids、include_my_connections: true 或 include_friends_connections: true。
响应:
{"id": "search-uuid", "url": "https://happenstance.ai/search/search-uuid"}
轮询结果(每 5-10 秒一次,直到状态变为 COMPLETED 或 FAILED):
curl -s https://api.happenstance.ai/v1/search/SEARCH_ID \
-H "Authorization: Bearer $HAPPENSTANCE_API_KEY"
完成后的响应包含:
status:RUNNING、COMPLETED 或 FAILEDresults:用户列表,每个用户包含 id、name、current_title、current_company、summary、weighted_traits_score、socials(包含 happenstance_url、linkedin_url、twitter_url)、mutuals 和 traitshas_more:布尔值,表示是否还有更多结果可用mutuals:互连关系的顶层数组(结果通过索引引用这些关系)traits:特征定义的顶层数组(结果通过索引引用这些特征)当搜索完成后且 has_more 为 true 时,可以获取排除之前已返回用户的额外结果。此操作消耗 2 个信用点。
curl -s -X POST https://api.happenstance.ai/v1/search/SEARCH_ID/find-more \
-H "Authorization: Bearer $HAPPENSTANCE_API_KEY"
响应:
{"page_id": "page-uuid", "parent_search_id": "search-uuid"}
然后使用 page_id 进行轮询:
curl -s "https://api.happenstance.ai/v1/search/SEARCH_ID?page_id=PAGE_ID" \
-H "Authorization: Bearer $HAPPENSTANCE_API_KEY"
获取特定人员的详细职业资料。该操作也是异步进行的。
开始研究:
curl -s -X POST https://api.happenstance.ai/v1/research \
-H "Authorization: Bearer $HAPPENSTANCE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"description": "Garry Tan, CEO of Y Combinator, @garrytan on Twitter"}'
请尽可能包含更多详细信息(全名、公司、职位、位置、社交账号),以获得最佳搜索结果。
响应:
{"id": "research-uuid"}
轮询结果(每 5-10 秒一次,直到状态变为 COMPLETED、FAILED 或 FAILED_AMBIGUOUS):
curl -s https://api.happenstance.ai/v1/research/RESEARCH_ID \
-H "Authorization: Bearer $HAPPENSTANCE_API_KEY"
完成后的响应包含一个 profile 对象,其中包含:
person_metadata:full_name、alternate_names、profile_urls、current_locations、taglineemployment:工作记录数组,包含 company_name、job_title、start_date、end_date、descriptioneducation:教育背景数组,包含 university_name、degree、start_date、end_dateprojects:项目记录数组,包含 title、description、urlswritings:出版物记录数组,包含 title、description、date、urlshobbies:兴趣爱好数组summary:包含相关链接的总体文本摘要获取可以搜索的群组列表:
curl -s https://api.happenstance.ai/v1/groups \
-H "Authorization: Bearer $HAPPENSTANCE_API_KEY"
返回格式:{"groups": [{"id": "uuid", "name": "Group Name"}, ...]。
curl -s https://api.happenstance.ai/v1/usage \
-H "Authorization: Bearer $HAPPENSTANCE_API_KEY"
返回 balance_credits、has_credits、purchases、使用历史记录以及自动刷新设置。
错误信息遵循 RFC 7807 格式:
{"type": "about:blank", "title": "Bad Request", "status": 400, "detail": "Description must not be empty", "instance": "/v1/research"}
主要状态码:
401:API 密钥无效或缺失402:信用点不足429:并发请求过多(最多允许同时进行 10 个搜索或研究请求)500/503:服务器错误,请稍后重试。这是AI代理在“Structs”模式中开始游戏所需掌握的基础技能。内容包括选择公会、创建账户、搭建首个采矿基础设施以及提炼“Alpha Matter”资源。请优先学习此技能,因为它与其他所有操作都密切相关。该技能对CPU资源的消耗较低(设置 `-D 1` 即可)。从零开始完成整个采矿流程大约需要3到4小时。
从 YouTube 下载指定的视频;根据指定的开始和结束时间提取视频片段,并将它们保存到您桌面上的文件夹中。
将 YouTube 视频下载到 `~/Downloads` 目录中。适用于用户希望将 YouTube 视频下载到自己电脑上的情况。
在 **Structs** 中,该模块负责处理权限管理、地址分配以及玩家之间的协调工作。适用于以下场景:授予或撤销对象的权限、注册新地址、管理多地址账户、将权限委托给其他玩家,以及设置基于地址的访问控制规则。
将新玩家引入游戏系统(Structs)。负责处理密钥的创建/恢复、玩家信息的生成(通过“reactor-infuse”或“guildsignup”功能)、星球探索以及基础基础设施的搭建。适用于以下场景:初始化游戏环境、创建新玩家、占领第一个星球或搭建基础设施。搭建所需时间因设备类型而异——使用“Command Ship”大约需要17分钟,而使用“Ore Extractor”或“Refinery”则需要约57分钟。
通过NATS WebSocket连接到GRASS实时事件系统。当您需要实时游戏更新、希望在事件发生时立即做出响应、需要监控团队行动或攻击情况、观察玩家创建情况、追踪舰队移动轨迹,或者构建基于事件的工具时,可以使用该功能。GRASS是获取银河系内最新动态的最快速途径。