Skip to content

Instantly share code, notes, and snippets.

@ghoeffner
Last active March 12, 2018 21:50
Show Gist options
  • Save ghoeffner/396071e8de4cf6a902645201659e6275 to your computer and use it in GitHub Desktop.
Save ghoeffner/396071e8de4cf6a902645201659e6275 to your computer and use it in GitHub Desktop.
This example shows how to fetch whois with a given mail address from the SecurityTrails domain API
curl -s \
--request POST \
--header "Content-Type: application/json" \
--header "APIKEY: $ST_API" \
--data-binary "{
\"filter\": {
\"whois_email\": \"chris@ueland.com\"
}
}" \
'https://api.securitytrails.com/v1/search/list/' | jq -C
{
"records": [
{
"whois": {
"registrar": "GoDaddy.com, LLC",
"expiresDate": 1510068206000,
"createdDate": 1383837806000
},
"mail_provider": [
"Atlantic.net, Inc."
],
"hostname": "servermom.org",
"host_provider": [
"Rackspace Ltd."
],
"alexa_rank": 206147
},
{
"snipped": "-------------"
},
{
"whois": {
"registrar": "GoDaddy.com, LLC (R91-LROR)",
"expiresDate": 1371325092000,
"createdDate": 1245094692000
},
"mail_provider": [],
"hostname": "netdna-cdn.org",
"host_provider": [],
"alexa_rank": null
}
],
"record_count": 96
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment