Signup Radar
Building a signup radar to get to know your new users
This tutorial will show you how to build a simple “signup radar” that takes an email address and returns information about the person who signed up, using the Linkup API’s structured output feature.
What We’re Building
Our signup radar will:
- Take an email address as input
- Use Linkup API to search for information about the person
- Return structured data about the person (name, position, company, LinkedIn URL, etc.)
Prerequisites
- A Linkup API key
- Python or Node.js installed
Get your API key
Create a Linkup account for free to get your API key.
Step 1: Install the SDK
Step 2: Set Up the Client
Step 3: Define the Structured Output Schema
The key to our signup radar is using Linkup’s structured output feature. We need to define a schema that specifies what information we want to extract.
Step 4: Create the Signup Radar Function
Step 5: Enhanced Query Generation
Let’s improve our query to get better results:
Full Implementation
Let’s put it all together:
How It Works
- Email Analysis: The tool parses the email to extract the username and domain.
- Query Generation: It creates a smart search query based on the email components:
- Formats the username to handle common patterns (first.last, first_last)
- Uses the domain as a company hint if it’s not a common email provider
- Structured Output: Uses Linkup’s structured output feature with a custom schema to ensure consistent, well-formatted results.
- Deep Search: Uses the “deep” search depth for more comprehensive results.
Test Examples
Try the signup radar with these email examples:
Advanced Enhancements
For a production version, consider adding:
- Other relevant information on your users you receive in the sign up form. These should be added to the prompt
- Better manage ambiguity when multiple people could own the same email. Change the prompt and the structured output format to allow for multiple potential people
- Error handling for invalid emails or API failures
- Rate limiting to manage API usage
- Async batch processing for multiple emails
Conclusion
You’ve now built a simple but powerful “signup radar” using the Linkup API that can extract structured information about users from just their email address. The structured output feature ensures you get consistent, well-formatted data that can be easily integrated into your systems.
Facing issues? Reach out to our engineering team at support@linkup.so