Extracts all valid email addresses from any text input using regex pattern matching. Access via MCP in Cursor or Windsurf, or call GET /v1/string/extract-emails directly. Pass "contact us at [email protected] or [email protected]" and get back a clean array: ["[email protected]", "[email protected]"]. Handles complex formats including plus addressing and international domains.
curl "https://tinyfn.io/v1/string/extract-emails" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/string/extract-emails', {
headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests
response = requests.get('https://tinyfn.io/v1/string/extract-emails',
headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)
Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's string tools:
{
"mcpServers": {
"tinyfn-string": {
"url": "https://tinyfn.io/mcp/string",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}
Use the extract_emails tool in Cursor with your text as input. It returns a JSON array of all found email addresses, perfect for processing contact lists or parsing documents.
Supports standard formats ([email protected]), plus addressing ([email protected]), subdomains ([email protected]), and international domains. Filters out malformed addresses automatically.
Works with any text input including HTML, markdown, or plain text. It ignores HTML tags and extracts only the actual email addresses from the content.
Returns an empty array [] when no valid email addresses are detected. The function never fails - it always returns a valid JSON response.
Yes, check if the returned array contains your target email or use the array length to count total emails found. Useful for form validation or content analysis.
Get your free API key and start using Extract Emails in seconds.
Get Free API Key