Removes duplicate items from arrays, returning only unique values in their original order. Call via MCP in Cursor or Windsurf, or hit the REST endpoint `/v1/misc/unique`. Perfect for deduplicating user inputs, cleaning datasets, or filtering repeated values in AI workflows. Handles strings, numbers, and mixed data types reliably.
curl "https://tinyfn.io/v1/misc/unique" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/misc/unique', {
headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests
response = requests.get('https://tinyfn.io/v1/misc/unique',
headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)
Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's miscellaneous tools:
{
"mcpServers": {
"tinyfn-misc": {
"url": "https://tinyfn.io/mcp/misc",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}
Send your array to `/v1/misc/unique` or use the MCP tool in your AI editor. It returns unique items while preserving the original order of first occurrence.
Yes, it maintains the order of first appearance. If your array is [3, 1, 3, 2, 1], the result is [3, 1, 2].
Yes, it handles mixed arrays correctly. ['apple', 1, 'apple', 2, 1] becomes ['apple', 1, 2].
AI agents can clean user-provided lists, deduplicate search results, or ensure unique values before processing — eliminating manual data cleaning steps.
It returns an empty array. No errors, just consistent behavior for edge cases.
Get your free API key and start using Unique Items in seconds.
Get Free API Key