
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@sharpapi/sharpapi-node-detect-urls
Advanced tools
SharpAPI.com Node.js SDK for detecting URLs in text

SharpAPI URL Detector parses text content and extracts URLs with protocol information and validation. Perfect for link extraction, content moderation, and security analysis.
npm install @sharpapi/sharpapi-node-detect-urls
Visit SharpAPI.com to get your API key.
const { SharpApiDetectUrlsService } = require('@sharpapi/sharpapi-node-detect-urls');
const apiKey = process.env.SHARP_API_KEY; // Store your API key in environment variables
const service = new SharpApiDetectUrlsService(apiKey);
const text = `
Visit our website at https://example.com for more information.
Check out our blog: www.example.com/blog
Contact us at support page: example.com/contact
`;
async function detectUrls() {
try {
// Submit detection job
const statusUrl = await service.detectUrls(text);
console.log('Job submitted. Status URL:', statusUrl);
// Fetch results (polls automatically until complete)
const result = await service.fetchResults(statusUrl);
console.log('Detected URLs:', result.getResultJson());
} catch (error) {
console.error('Error:', error.message);
}
}
detectUrls();
detectUrls(text: string): Promise<string>Detects and extracts URLs from the provided text.
Parameters:
text (string, required): The text content to scan for URLsReturns:
Example:
const statusUrl = await service.detectUrls(textWithUrls);
const result = await service.fetchResults(statusUrl);
The API returns detected URLs with parsed components:
{
"urls": [
{
"url": "https://example.com",
"protocol": "https",
"domain": "example.com",
"path": "/",
"is_valid": true,
"is_secure": true,
"parameters": {}
},
{
"url": "www.example.com/blog",
"protocol": "http",
"domain": "example.com",
"path": "/blog",
"is_valid": true,
"is_secure": false,
"parameters": {}
}
]
}
const { SharpApiDetectUrlsService } = require('@sharpapi/sharpapi-node-detect-urls');
const service = new SharpApiDetectUrlsService(process.env.SHARP_API_KEY);
const socialPost = `
Check out these awesome resources:
- https://docs.example.com
- www.github.com/username/project
- example.com/api/docs
`;
service.detectUrls(socialPost)
.then(statusUrl => service.fetchResults(statusUrl))
.then(result => {
const urls = result.getResultJson();
console.log(`Found ${urls.length} URLs:`);
urls.forEach((url, index) => {
console.log(`${index + 1}. ${url.url} (${url.protocol})`);
});
})
.catch(error => console.error('Detection failed:', error));
const service = new SharpApiDetectUrlsService(process.env.SHARP_API_KEY);
const userContent = `
Click here: http://suspicious-site.com
Or visit: https://secure-site.com
`;
const statusUrl = await service.detectUrls(userContent);
const result = await service.fetchResults(statusUrl);
const urls = result.getResultJson();
const insecureUrls = urls.filter(url => !url.is_secure);
if (insecureUrls.length > 0) {
console.log('⚠️ Warning: Found insecure URLs:');
insecureUrls.forEach(url => {
console.log(` - ${url.url} (${url.protocol})`);
});
}
const service = new SharpApiDetectUrlsService(process.env.SHARP_API_KEY);
const document = `
API Documentation: https://api.example.com/v2/docs
Support Portal: https://support.example.com
Community Forum: https://community.example.com/discussions
`;
const statusUrl = await service.detectUrls(document);
const result = await service.fetchResults(statusUrl);
const urls = result.getResultJson();
const linkDirectory = urls.map(url => ({
domain: url.domain,
full_url: url.url,
secure: url.is_secure
}));
console.log('Extracted Links:', linkDirectory);
The URL detector handles various formats:
POST /content/detect_urls
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 URLs in text
The npm package @sharpapi/sharpapi-node-detect-urls receives a total of 0 weekly downloads. As such, @sharpapi/sharpapi-node-detect-urls popularity was classified as not popular.
We found that @sharpapi/sharpapi-node-detect-urls 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.