Appends query parameters to URLs programmatically via MCP or GET /v1/slug/add-query-param. Pass a base URL and key-value pairs to get properly encoded results like `https://api.com/users?page=2&sort=name`. Handles URL encoding, duplicate parameters, and preserves existing query strings. Essential for dynamic link generation in AI agents and web automation.
curl "https://tinyfn.io/v1/slug/add-query-param" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/slug/add-query-param', {
headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests
response = requests.get('https://tinyfn.io/v1/slug/add-query-param',
headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)
Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's url/slug tools:
{
"mcpServers": {
"tinyfn-slug": {
"url": "https://tinyfn.io/mcp/slug",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}
Pass multiple key-value pairs and the tool will combine them with proper & separators and URL encoding. Existing query parameters are preserved.
The tool typically appends the new parameter, creating duplicate keys. Check your specific use case requirements for handling duplicates.
Yes, special characters in parameter names and values are automatically URL-encoded to ensure valid URLs.
Absolutely. AI agents can dynamically construct URLs with pagination, filters, or search parameters for API calls and web scraping tasks.
This tool ensures proper URL encoding, handles edge cases like existing parameters, and prevents malformed URLs from string concatenation errors.
Get your free API key and start using Add Query Param in seconds.
Get Free API Key