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+.- Homebrew
- uv
- pipx
- pip
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
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
