Skip to main content
The parse_url function parses an absolute URL string into a dynamic object containing all URL components (scheme, host, port, path, query parameters, etc.). Use this function to extract and analyze specific parts of URLs from logs, web traffic data, or API requests.

For users of other query languages

If you come from other query languages, this section explains how to adjust your existing queries to achieve the same results in APL.
In Splunk SPL, you use rex or URL-specific extractions. APL’s parse_url provides structured URL parsing in one function.
In ANSI SQL, URL parsing requires complex string manipulation. APL’s parse_url provides structured parsing natively.

Usage

Syntax

Parameters

Returns

Returns a dynamic object containing URL components: scheme, host, port, path, username, password, query, fragment.

Use case examples

Parse URLs from HTTP logs to analyze traffic patterns by host and path.Query
Run in PlaygroundOutputThis query parses complete URLs to extract host and path information for traffic analysis and API endpoint usage patterns.
  • parse_urlquery: Parses only URL query parameters. Use this when you only need query string parsing.
  • format_url: Constructs URLs from components. Use this to reverse the parsing operation and build URLs.
  • url_decode: Decodes URL-encoded strings. Use this to decode individual URL components.
  • split: Splits strings by delimiters. Use this for simpler URL tokenization without full parsing.