
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
@sharpapi/sharpapi-node-detect-emails
Advanced tools
SharpAPI.com Node.js SDK for detecting email addresses in text

SharpAPI Email Detector parses text content and extracts any email addresses found within. Perfect for data validation, content moderation, and lead extraction from unstructured text.
npm install @sharpapi/sharpapi-node-detect-emails
Visit SharpAPI.com to get your API key.
const { SharpApiDetectEmailsService } = require('@sharpapi/sharpapi-node-detect-emails');
const apiKey = process.env.SHARP_API_KEY; // Store your API key in environment variables
const service = new SharpApiDetectEmailsService(apiKey);
const text = `
For support inquiries, please contact support@example.com or sales@example.com.
You can also reach our CEO at john.doe@company.org for partnership opportunities.
`;
async function detectEmails() {
try {
// Submit detection job
const statusUrl = await service.detectEmails(text);
console.log('Job submitted. Status URL:', statusUrl);
// Fetch results (polls automatically until complete)
const result = await service.fetchResults(statusUrl);
console.log('Detected emails:', result.getResultJson());
} catch (error) {
console.error('Error:', error.message);
}
}
detectEmails();
detectEmails(text: string): Promise<string>Detects and extracts email addresses from the provided text.
Parameters:
text (string, required): The text content to scan for email addressesReturns:
Example:
const statusUrl = await service.detectEmails(textWithEmails);
const result = await service.fetchResults(statusUrl);
The API returns detected emails in a structured format:
{
"emails": [
{
"email": "support@example.com",
"confidence": 1.0,
"domain": "example.com",
"username": "support"
},
{
"email": "john.doe@company.org",
"confidence": 1.0,
"domain": "company.org",
"username": "john.doe"
}
]
}
const { SharpApiDetectEmailsService } = require('@sharpapi/sharpapi-node-detect-emails');
const service = new SharpApiDetectEmailsService(process.env.SHARP_API_KEY);
const sampleText = `
Contact our team at hello@startup.io or reach out to
the marketing department at marketing@startup.io.
`;
service.detectEmails(sampleText)
.then(statusUrl => service.fetchResults(statusUrl))
.then(result => {
const emails = result.getResultJson();
console.log(`Found ${emails.length} email addresses:`);
emails.forEach((email, index) => {
console.log(`${index + 1}. ${email.email}`);
});
})
.catch(error => console.error('Detection failed:', error));
const service = new SharpApiDetectEmailsService(process.env.SHARP_API_KEY);
// Customize polling behavior
service.setApiJobStatusPollingInterval(5); // Poll every 5 seconds
service.setApiJobStatusPollingWait(120); // Wait up to 2 minutes
const statusUrl = await service.detectEmails(text);
const result = await service.fetchResults(statusUrl);
POST /content/detect_emails
For detailed API specifications, refer to:
This project is licensed under the MIT License. See the LICENSE.md file for details.
Powered by SharpAPI - AI-Powered API Workflow Automation
FAQs
SharpAPI.com Node.js SDK for detecting email addresses in text
We found that @sharpapi/sharpapi-node-detect-emails demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.