Happenstance
Search your network and get detailed research profiles on people using Happenstance.
Documentation: https://developer.happenstance.ai
Credits
- Search: 2 credits per search (including find-more)
- Research: 1 credit per completed research
- Always call
get-creditsbefore starting searches or research to check balance - Use
create-credits-checkout-sessionif the user needs more credits
Workflows
Search for People
Searches can pull from three sources, controlled by parameters:
- Groups (
includeGroups): Search across the user's Happenstance groups. Searches all groups by default, or pass specificgroups(array of group IDs) to narrow scope. Callget-groupsto list available groups and their IDs. - Connections (
includeConnections): Search the user's direct connections. - Friends (
includeFriends): Search connections of the user's friends.
All three are enabled by default. The user may want to search only specific sources — for example, only within a particular group, or only their direct connections.
Steps:
- If the user wants to search specific groups, call
get-groupsfirst to list available groups and get their IDs. Useget-groupto see members of a specific group. - Call
search-networkwith a natural language query and the desired source parameters — returns asearchId - Poll with
get-search-resultsusing thesearchIduntil status iscompleted - If
has_moreis true and the user wants more, callfind-more-results(not a new search) — returns apageId - Poll with
get-search-resultsusing both the originalsearchIdand thepageId
When a user asks "who do I know that..." set includeGroups: false, includeFriends: false, includeConnections: true.
Research a Person
- Call
research-personwith a description including as many details as possible (full name, company, title, social handles) — returns aresearchId - Poll with
get-research-resultsusing theresearchIduntil status iscompleted
Use @Mentions for Targeted Search
To search a specific person's connections, @mention them in the query:
- First call
get-groupsandget-groupto look up member names, orget-userfor friends - Then search with:
"engineers @Jane Smith knows"
Presenting Results
Search Results
Each result includes name, current_title, current_company, summary, socials (with happenstance_url, linkedin_url, twitter_url), mutuals, and traits.
- Highlight mutual connections: Results include mutuals with relationship strength — surface the strongest mutual connections to help the user find the warmest intro path
- Include profile links: Always link to the person's Happenstance profile URL
- Show relevance: Include the person's summary and matching traits
Research Results
A completed research profile includes:
person_metadata: full name, alternate names, profile URLs, locations, taglineemployment: career history with companies, titles, dates, descriptionseducation: universities, degrees, datesprojects: notable projects with descriptions and URLswritings: publications with titles, dates, URLshobbies: personal interestssummary: overall summary with supporting source URLs
Summarize the profile and link to sources when presenting.
Tips
- Search typically completes in 30-60 seconds. Research takes 1-3 minutes.
- Each search returns up to 30 results. Use
find-more-resultsfor additional pages. - The more data sources the user connects, the better the search results.