apoc.data.domain

Function APOC Core

apoc.data.domain('url_or_email_address') YIELD domain - extract the domain name from a url or an email address. If nothing was found, yield null.

Signature

apoc.data.domain(url_or_email_address :: STRING?) :: (STRING?)

Input parameters

Name Type Default

url_or_email_address

STRING?

null

Usage Examples

RETURN apoc.data.domain('http://www.example.com/all-the-things') AS output;
Table 1. Results
output

"www.example.com"

RETURN apoc.data.domain('foo@bar.com' ) AS output;
Table 2. Results
output

"bar.com"