Cypher Cheat Sheet

One-page Cypher cheat sheet: schema, common patterns, and performance tips. Print-friendly.

Updated May 2026cypher Integration

Cypher Cheat Sheet Documentation

Endpoint

POST https://graph.whisper.security/api/query
Content-Type: application/json
X-API-Key: <your-key>

{"query": "CYPHER QUERY HERE"}

Node Labels

LabelWhat It Represents
HOSTNAMEAny DNS name: domains, subdomains, mail servers
IPV4IPv4 addresses
IPV6IPv6 addresses
ASNAutonomous System (format: AS15169)
ASN_NAMEHuman-readable ASN name
PREFIXPhysical BGP prefix
REGISTERED_PREFIXRIR-allocated block (virtual)
ANNOUNCED_PREFIXBGP-announced prefix at query time (virtual)
TLDTop-level domain label
REGISTRARDomain registrar (format: iana:292)
EMAILWHOIS contact email address
PHONEWHOIS contact phone (E.164 format)
ORGANIZATIONWHOIS registrant or RIR org
CITYGeoIP city (format: "City, CC")
COUNTRYISO 3166-1 alpha-2 country code
RIRRegional Internet Registry
FEED_SOURCEThreat intelligence feed (40 feeds)
CATEGORYThreat category (18 categories)
DNSSEC_ALGORITHMDNSSEC signing algorithm

Edge Types

EdgeTraversal PatternNotes
RESOLVES_TOHOSTNAME → IPV4/IPV6DNS A/AAAA
ANNOUNCED_BYIPV4 → ANNOUNCED_PREFIXBGP routing (virtual)
ROUTESANNOUNCED_PREFIX → ASNVirtual BGP chain
BELONGS_TOIPV4 → REGISTERED_PREFIXRIR allocation
HAS_NAMEASN → ASN_NAMENetwork display name
PEERS_WITHASN → ASNBGP peering
CHILD_OFHOSTNAME → HOSTNAME/TLDDomain hierarchy
NAMESERVER_FORHOSTNAME(NS) → HOSTNAMEDNS delegation
MAIL_FORHOSTNAME(MX) → HOSTNAMEMX record
ALIAS_OFHOSTNAME → HOSTNAMECNAME
LINKS_TOHOSTNAME → HOSTNAMEWeb hyperlinks
HAS_REGISTRARHOSTNAME → REGISTRARCurrent registrar
PREV_REGISTRARHOSTNAME → REGISTRARHistorical registrar
HAS_EMAILHOSTNAME → EMAILWHOIS contact
HAS_PHONEHOSTNAME → PHONEWHOIS contact
REGISTERED_BYHOSTNAME/PREFIX → ORGANIZATIONRegistrant org
HAS_COUNTRYPREFIX/CITY → COUNTRYCountry code
LOCATED_INIPV4 → CITYGeoIP
LISTED_INIPV4/HOSTNAME → FEED_SOURCEThreat intel (virtual)
SPF_INCLUDEHOSTNAME → HOSTNAMESPF include
SPF_IPHOSTNAME → IPV4/PREFIXSPF ip: mechanism
SPF_AHOSTNAME → HOSTNAMESPF a: mechanism
SPF_MXHOSTNAME → HOSTNAMESPF mx: mechanism
SPF_REDIRECTHOSTNAME → HOSTNAMESPF redirect:
SPF_EXISTSHOSTNAME → HOSTNAMESPF exists:
SIGNED_WITHHOSTNAME → DNSSEC_ALGORITHMDNSSEC signing

Procedures

ProcedureWhat It Does
CALL explain("indicator")Threat score and explanation (IP, domain, ASN, CIDR)
CALL whisper.history("indicator")Historical WHOIS and BGP snapshots
CALL whisper.quota()Current plan and usage
CALL db.labels()All node labels with counts
CALL db.relationshipTypes()All edge types with counts

Performance Rules

Do ThisNot That
MATCH (h:HOSTNAME {name: "example.com"})MATCH (h:HOSTNAME) WHERE h.name = "example.com"
WHERE h.name STARTS WITH "mail."WHERE h.name =~ "^mail\\..*"
WHERE h.name ENDS WITH ".example.com"WHERE h.name =~ ".*\\.example\\.com$"
Always add LIMITOpen-ended traversals on billion-node labels
CALL db.relationshipTypes() for countsMATCH ()-[r]->() RETURN count(r)
OPTIONAL MATCH for WHOIS fieldsMandatory MATCH for sparse fields

Query Complexity Guide

SpeedPattern
InstantAnchored point lookups {name: "..."}
Fast (<1s)STARTS WITH, ENDS WITH ".domain", CONTAINS
Medium (1-5s)Multi-hop traversals, WHOIS with OPTIONAL MATCH
SlowLINKS_TO traversals, full text scan across all HOSTNAME
AvoidUnanchored label scans, regex =~ on HOSTNAME