{"uid":"cap_NxkjWBP7guLheYe7a3OJn","slug":"agenttools-url-parser-cedea88f","name":"AgentTools URL Parser","description":"Parse a URL into all its components: protocol, hostname, port, path segments, query parameters (as a clean object), hash and credentials. Exact — no guessing by eye. Use this when an agent needs to break any URL into protocol, host, path and params.","url":"https://agenttools-hub.vercel.app/api/v1/dev/url-parser?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["url"],"properties":{"url":{"type":"string","description":"URL"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_eXUCu7lAtNxeiTHrqREFy","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Parses any URL into its constituent components: protocol, hostname, port, path segments, query parameters, hash, and credentials.","exampleAgentPrompt":"Can you parse this URL for me and break it down into all its parts — protocol, hostname, port, path, query parameters, and hash? The URL is: https://example.com:8080/api/v2/search?q=hello+world&page=2#results","exampleUseCases":[{"title":"Extracting query parameters from a URL","prompt":"I have this URL — https://shop.example.com/products?category=shoes&color=red&size=10&sort=price_asc — can you pull out all the query parameters as a clean object so I can see each key and value separately?"},{"title":"Debugging an API endpoint URL","prompt":"Can you break apart this URL https://api.myservice.io:3000/v1/users/profile?token=abc123&verbose=true into its protocol, host, port, path segments, and query params so I can debug what's being sent?"},{"title":"Extracting hostname and path from a redirect URL","prompt":"I got this redirect URL — https://auth.provider.com/oauth/callback?code=XYZ&state=abc#fragment — can you parse it and tell me the hostname, path, query parameters, and hash separately?"}],"resultDescription":"Returns a structured object with all URL components: protocol (e.g. 'https'), hostname, port (if specified), path segments as an array, query parameters as a clean key-value object, hash/fragment, and any embedded credentials — no ambiguity, exact parsing.","failureModes":["Malformed or invalid URL string returns an error or empty fields","Missing required 'url' query parameter returns a 400-level error","Relative URLs without a protocol may fail to parse correctly","URLs with unusual encoding or non-standard schemes may produce partial results"],"whenToPreferThis":"Use this endpoint when an agent needs a deterministic, programmatic breakdown of any URL into its components without manual string manipulation or regex. Ideal when you need query parameters as a clean key-value object, need to extract the hostname for routing logic, or must validate URL structure before making downstream HTTP calls.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T12:43:09.942Z","isFirstParty":false,"canonicalSlug":"agenttools-url-parser-cedea88f"}