Returns a regex pattern for URL validation that matches HTTP/HTTPS URLs with proper domain structure. Access via MCP in Cursor or Windsurf, or REST at GET /v1/regex/pattern/url. The pattern validates standard web URLs including subdomains, ports, paths, and query parameters. Deterministic output ensures consistent validation across AI agents and applications.
curl "https://tinyfn.io/v1/regex/pattern/url" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/regex/pattern/url', {
headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests
response = requests.get('https://tinyfn.io/v1/regex/pattern/url',
headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)
Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's regex tools:
{
"mcpServers": {
"tinyfn-regex": {
"url": "https://tinyfn.io/mcp/regex",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}
Validates HTTP/HTTPS URLs with domains, subdomains, ports, paths, query parameters, and fragments. Covers standard web URLs but may not match all RFC 3986 edge cases.
Call the tool to get the pattern, then use it for input validation in Claude Code or Cursor. Perfect for form validation or filtering URL lists in automated tasks.
Depends on the specific pattern returned. Test with your target URLs since some regex patterns focus on public domains while others include localhost/IPs.
Yes, the returned pattern is a starting point. You can add anchors (^$), escape special chars, or combine with other patterns for custom validation rules.
Provides a lightweight regex alternative to URL constructor validation. Useful when you need pattern-based validation without JavaScript's URL parsing overhead.
Get your free API key and start using Get Url Pattern in seconds.
Get Free API Key