Cleans up text by removing consecutive duplicate words like "the the quick brown" → "the quick brown". Access via MCP in Cursor or Claude Code, or hit GET /v1/text/remove-duplicates with your text. Perfect for cleaning up copy-paste errors, OCR output, or user-generated content where words accidentally repeat.
curl "https://tinyfn.io/v1/text/remove-duplicates" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/text/remove-duplicates', {
headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests
response = requests.get('https://tinyfn.io/v1/text/remove-duplicates',
headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)
Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's text analysis tools:
{
"mcpServers": {
"tinyfn-text": {
"url": "https://tinyfn.io/mcp/text",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}
Yes, it treats words case-insensitively, so 'The THE' becomes just 'The' (preserving the first occurrence's capitalization).
Great for preprocessing text before analysis - your AI agent can clean messy input automatically before sentiment analysis or content processing.
Punctuation stays attached to words, so 'hello, hello world' becomes 'hello, world' - the comma moves with the remaining word.
Only consecutive duplicates. 'cat dog cat' stays unchanged, but 'cat cat dog' becomes 'cat dog'.
Send GET request to /v1/text/remove-duplicates with text parameter. Returns cleaned text with consecutive duplicates removed.
Get your free API key and start using Remove Duplicate Words in seconds.
Get Free API Key