{"uid":"cap_2ojEp0ofz8l780tQFBX2Y","slug":"agenttools-url-parser-91d9e87e","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://agentstoolshub.com/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.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_-4hRpwIYJJ4206sNp6DWa","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","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 break apart this URL for me — https://user:pass@api.example.com:8080/v2/users?sort=asc&page=2#results — and tell me the protocol, hostname, port, path, query params, and hash?","exampleUseCases":[{"title":"Extract query params from redirect URL","prompt":"I got redirected to this URL after OAuth: https://myapp.com/callback?code=abc123&state=xyz789 — can you parse it and pull out all the query parameters as a clean object?"},{"title":"Debug malformed API endpoint URL","prompt":"Something's wrong with this URL our backend is generating: https://api.internal.io:3000/v1/orders/search?filter=active&limit=50 — can you break it into its parts so I can see exactly what host, port, and path it's hitting?"},{"title":"Identify hostname and path from user-submitted link","prompt":"A user submitted this link in our form: https://cdn.example.net/assets/images/logo.png?v=3 — parse it and tell me the hostname, path segments, and any query parameters."}],"resultDescription":"A structured object containing all parsed URL components: protocol/scheme, hostname, port, full path broken into segments, query parameters as a clean key-value object, hash/fragment, and any embedded credentials (username/password).","failureModes":["Malformed or non-URL string passed — likely returns an error or empty/null fields","Missing required 'url' query parameter — returns a validation error","Relative URLs without a scheme may not parse correctly","URLs with unusual encoding may produce unexpected segment splits"],"whenToPreferThis":"Use this endpoint when an agent needs a precise, programmatic decomposition of any URL without manual string splitting or regex. Ideal when downstream logic depends on individual URL components (e.g. routing on hostname, iterating path segments, reading specific query params) and correctness is critical over guessing by eye.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-12T12:50:27.244Z","isFirstParty":false,"canonicalSlug":"agenttools-url-parser-91d9e87e"}