Skip to content

Link detector


Detects if a string contains a link

POST /api/security/detect-links
Terminal window
https://api.cookie-api.com/api/security/detect-links


{
"exclude_domain": "Exclude domains e.g. ['youtube.com', 'discord.com'....]",
"exclude_protocol": "Exclude Protocols e.g. ['http://', 'https://'....]",
"text": "The text to be checked"
}

example.cURL
curl --location 'https://api.cookie-api.com/api/security/detect-links' \
--header 'Authorization: API_Key' \
--header 'Content-Type: application/json' \
--data '{
"text": "Check this out: https://youtube.com and this https://discord.com"
}
'
Responses
{
"contains_link": true,
"links": [
"https://youtube.com",
"https://discord.com"
],
"links_found": 2,
"success": true
}