Skip to main content
Action: Extract Domain
Updated over a month ago

Overview

The Extract Domain action allows you to extract the domain component from a given URL. It is useful for isolating the core website address from a longer URL string that may contain additional path elements, query parameters, or fragments. By extracting just the domain, you can standardize URLs from the same site for further analysis or processing.

The action supports intelligent domain extraction, able to handle URLs with or without common prefixes like "http://", "https://", or "www.". It will strip out everything after the first slash following the top-level domain. The output is the cleaned domain string which can be used in downstream actions and workflows.

Usage Examples

  • Normalizing a URL: If you just need the domain and top level domain to do further analysis downstream in your workflow, or to use Platinum actions such as Analyze Company News or Analyze Earnings Call, you can paste any URL in here to strip out the right domain.

Inputs

  • URL - The full URL string from which you want to extract the domain component. This could be any valid URL format, with or without prefixes like http:// or www. Example: https://www.copy.ai/blog

Outputs

The output of the Extract Domain action is a string containing only the domain portion of the input URL.

For example, if the input URL was https://www.example.com/page.html?q=hello, the output would be example.com.

This allows you to use the cleaned, standardized domain string in subsequent workflow steps, without any of the extra characters or path elements from the original URL.

Troubleshooting

  • Handling invalid URLs: If the input URL is not in a valid format, the Extract Domain action will return the input provided which may lead to other errors downstream in your workflow if not handled properly

Did this answer your question?