{"uid":"cap_icIXNcAbUwcVC1hKMm6qq","slug":"url-parser-scheme-host-port-path-query-fragment-d9172ea8","name":"URL Parser — Scheme, Host, Port, Path, Query, Fragment","description":"Break a URL into scheme, host, port, path, query params, and fragment.","url":"https://api.24klabs.ai/api/url-parse","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"url":{"type":"string"}}},"responseSchema":{"type":"json","example":{"host":"a.com"}},"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__xQjXfpBtWSy85fySjQWy","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 a URL string into its constituent components: scheme, host, port, path, query parameters, and fragment.","exampleAgentPrompt":"Can you break down this URL for me — https://example.com:8080/products/search?q=shoes&size=10#results — and tell me the scheme, host, port, path, query params, and fragment?","exampleUseCases":[{"title":"Extracting query parameters from redirect URL","prompt":"I have this redirect URL from an OAuth flow — https://myapp.com/callback?code=abc123&state=xyz789 — can you parse it and pull out all the query parameters for me?"},{"title":"Validating API endpoint structure","prompt":"Break down this API endpoint URL for me: https://api.stripe.com:443/v1/charges?limit=25&starting_after=ch_abc — I need to confirm the host, path, and all query params separately."},{"title":"Debugging a deep-link URL","prompt":"I've got this deep link that's acting weird — myapp://profile/settings?theme=dark&lang=en#notifications — can you parse it into its parts so I can see exactly what scheme, path, and fragment it's using?"}],"resultDescription":"Returns a structured object containing the parsed URL components: scheme (e.g. 'https'), host (e.g. 'example.com'), port (e.g. 8080 or null if default), path (e.g. '/products/search'), query parameters as key-value pairs (e.g. {q: 'shoes', size: '10'}), and fragment (e.g. 'results').","failureModes":["Malformed or non-URL input returns an error indicating the string could not be parsed","Missing scheme may cause parsing failure or ambiguous results","Relative URLs without a base may not parse correctly","Empty string input returns an error"],"whenToPreferThis":"Choose this endpoint when you need a clean, structured breakdown of a URL into all its RFC-standard components without writing custom regex or string manipulation. Especially useful in agentic pipelines where downstream steps need individual URL parts (e.g. routing on path, filtering on query params, or reading fragment identifiers).","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T19:02:33.106Z","isFirstParty":false}