Skip to main content

Utils Utilities

Explore the utils utility steps in Torq.

Updated over 10 months ago

Use these utility steps for fuzzy comparisons and other utilities. See below for examples of each step's input and output.

Fuzzy compare strings ratio

Performs a fuzzy comparison of two strings and returns a simple ratio score.

Input

First string

MyName

Second string

MyNameIs

Output

"ratio_score": 66


Fuzzy search over an array of strings

Performs a fuzzy search of the given string over an array of strings and returns a similarity score. Returns the top result by default.

Input

["joe@company.com","chris@company.com","murray@company.com"]

Value

name@company.com

Output

{
"count": 1,
"matches": [
{
"Match": "joe@company.com",
"Score": 81
}


Get Whois record

Run a Whois query on the given input.

Input

torq.io

Output

"domain": {
"id": "xxxxxxxxx-DONUTS",
"domain": "torq.io",
"punycode": "torq.io",
"name": "torq",
"extension": "io",
"whois_server": "whois.xxxxx.com/",
etc.

Resolve DNS

Resolves a given DNS and returns its canonical name, IPs, MX records, NS records, TXT records, and SRV records.

Input

torq.io

Output

{
"cname": "torq.io.",
"dmarcTxt": [
"v=DMARC1;p=reject;adkim=r;aspf=r;rua=mailto:rua@torq.io"
],
"foundHost": true,
"host": "torq.io",
"ips": [
"141.xxx.xxx.20",
"141.xxx.xxx.21"
],
"mx": [
{
"Host": "aspmx.l.google.com.",
"Preference": 1
},
{
"Host": "alt1.aspmx.l.google.com.",
"Preference": 5
},
{
"Host": "alt2.aspmx.l.google.com.",
"Preference": 5
},
{
"Host": "alt4.aspmx.l.google.com.",
"Preference": 10
},
{
"Host": "alt3.aspmx.l.google.com.",
"Preference": 10
}
],
"ns": [
"ns-cloud-e1.googledomains.com.",
"ns-cloud-e2.googledomains.com.",
"ns-cloud-e3.googledomains.com.",
"ns-cloud-e4.googledomains.com."
],
"srv": [],
"step_status": {
"code": 1,
"message": "",
"verbose": ""
},
"txt": [
"x"
]
}

Did this answer your question?