hpn) gives you access to the full Happenstance API from your terminal. All output is JSON, so you can pipe results to jq or integrate with scripts.
Install
Requires Python 3.11+.- pipx (recommended)
- uv
- pip
- OpenClaw
Configure
Get your API key from the Settings page, then:HPN_API_KEY environment variable or the --api-key flag on any command. Priority: flag > env var > config file.
Verify your configuration:
Commands
| Command | Description |
|---|---|
hpn config set --api-key KEY | Save your API key |
hpn config show | Show saved API key (masked) |
hpn search "query" | Search your network |
hpn search get ID | Get search results by ID |
hpn search find-more ID | Find additional results for an existing search |
hpn research "description" | Research a person |
hpn research get ID | Get research results by ID |
hpn friends | List your friends (useful for @mentions) |
hpn groups | List your groups |
hpn groups get ID | Get group details and members |
hpn usage | Show credit balance and usage |
Search Your Network
--no-wait to get the search ID immediately and poll later:
Scope Control
Control where to search with scope flags. When no flags are specified, all sources are searched.@Mentions
Filter results to a specific person’s connections using @mentions in your query:hpn friends or hpn groups get ID to look up names for @mentions.
Find More Results
If a search returnshas_more: true, get additional results (costs 2 credits):
Research a Person
--no-wait to return the research ID immediately:
Check Credits
Pipe to jq
All output is JSON. Combine withjq for filtering and formatting:
Need Help?
Support
Contact our support team
