Skip to content
OSINTtools.io

ContrastAPI API

Hosted security-data API and MCP server for CVE, KEV and EPSS data, package advisories, and domain and IP checks, usable without a key.

Base URL
https://api.contrastcyber.com
Sign-in
API key
Free tier
Free tier
Format
REST
Endpoints
5

Compiled by OSINTtools.io editors from github.com · updated Nov 29, 2026Work on this API? Claim it to keep these docs currentReport a mistake

Introduction

ContrastAPI offers REST lookups for domains, IPs and email addresses, among other security data: DNS records, WHOIS/RDAP registration data, subdomain enumeration from certificate logs and DNS, IP network, cloud and list membership, and an email domain check. Every REST data endpoint except POST /image_inspect is also available as an MCP tool at /mcp. This reference covers five of the REST lookups; the docs list more (certificate search, SSL, headers, redirect chain, Wayback, ASN and others).

Calls go to https://api.contrastcyber.com. A key is optional: requests without one use the free tier (30 credits per hour per IPv4 address or IPv6 /64) and a Pro key gives 500 credits per hour. Send the key in X-API-Key or Authorization: Bearer. Over budget returns 429, and endpoints that take payment return 402 to a keyless request, which can pay per call with x402. Responses include an X-Credits-Charged header and a credits object.

The email check makes no SMTP connection, so it cannot confirm that a mailbox exists. Domain parameters must be public domain names; IPs must be globally reachable.

Quick start

  1. Get a key

    Create an account with ContrastAPI and copy your api key (free tier). Where to get it

  2. Make your first request

    DNS records for a domain with TXT-based service hints.. Replace YOUR_API_KEY and run it in a terminal, or use Try it on the endpoint.

    curl 'https://api.contrastcyber.com/dns_lookup/example.com' \
      -H 'X-API-Key: YOUR_API_KEY'
  3. Read the response

    A 200 response looks like this, shortened.

    {
      "domain": "example.com",
      "records": {
        "a": [
          "203.0.113.7"
        ],
        "mx": [
          {
            "priority": 10,
            "host": "mail.example.com"
          }
        ],
        "ns": [
          "ns1.example.com"
        ],
        "txt": [
          "v=spf1 -all"
        ]
      },
      "unavailable": [],
      "services": [],
      "summary": "1 A, 1 MX, 1 NS, 1 TXT",
      "credits": {
        "charged": 1,
    …

Authentication

Send your API key in the X-API-Key header of every request.

Optional; without a key the free tier applies. Authorization: Bearer also works.

Get a key from ContrastAPI

Try it on this page keeps your key in your browser; it is never sent to OSINTtools.io.

Rate limits and pricing

Free (no key): 30 credits per hour per IPv4 address or IPv6 /64. Pro key: 500 credits per hour per key. Over budget returns 429.

Free tier.

Errors

StatusMeaning
400Invalid or missing input (not a public domain, not a globally reachable IP, bad address)
402Payment required on a keyless request to a paid endpoint
404Domain does not exist or is not registered
429Credit budget exceeded
502Upstream lookup gave no usable answer
503Server busy; retry after Retry-After; costs nothing

Domain

Refuses special-use names, IPs, URLs and ports; internationalised names must use the xn-- form. An empty array means no records of that type; null means the lookup failed. A 404 or 502 also costs 1 credit.

Path parameters

domainstringrequiredtakes your domain

Public domain, at most 253 bytes, at least two labels

Example: example.com
Response fields · 9Show

domainstring

Lower-case domain

a[]string

A records

mx[]object

MX records with priority and host

ns[]string

Name servers

txt[]string

TXT records

unavailable[]object

Record types whose lookup failed, with reasons

namestring

Service whose verification word appears in a TXT record

summarystring

Text count of each record type

remaininginteger

Credits left in the window

curl 'https://api.contrastcyber.com/dns_lookup/example.com' \
  -H 'X-API-Key: YOUR_API_KEY'
Replace YOUR_API_KEY with your key
Response
{
  "domain": "example.com",
  "records": {
    "a": [
      "203.0.113.7"
    ],
    "mx": [
      {
        "priority": 10,
        "host": "mail.example.com"
      }
    ],
    "ns": [
      "ns1.example.com"
    ],
    "txt": [
      "v=spf1 -all"
    ]
  },
  "unavailable": [],
  "services": [],
  "summary": "1 A, 1 MX, 1 NS, 1 TXT",
  "credits": {
    "charged": 1,
    "remaining": 29
  }
}

A name under a registered domain is looked up as that registered domain; a public suffix such as co.uk is refused.

Path parameters

domainstringrequiredtakes your domain

Domain to look up

Example: example.com
Response fields · 12Show

domainstring

Domain looked up

registeredboolean

Whether the domain is registered

availableboolean

Whether the domain appears available

rdap_serverstring

RDAP server used

registrar_namestring

Registrar name

registrar_iana_idinteger

Registrar IANA ID

created_atstring

Creation date

updated_atstring

Last update date

expires_atstring

Expiry date

status[]string

First 16 status values

name_servers[]string

First 16 name servers

dnssec_signedboolean

Whether DNSSEC is signed

curl 'https://api.contrastcyber.com/whois_lookup/example.com' \
  -H 'X-API-Key: YOUR_API_KEY'
Replace YOUR_API_KEY with your key
Response
{
  "domain": "example.com",
  "available": false,
  "registered": true,
  "rdap_server": "https://rdap.example.org/",
  "registrar_name": "Example Registrar, Inc.",
  "registrar_iana_id": 9999,
  "created_at": "2001-03-29T05:00:00Z",
  "updated_at": "2025-01-15T10:00:00Z",
  "expires_at": "2030-03-30T04:00:00Z",
  "status": [
    "clientTransferProhibited"
  ],
  "name_servers": [
    "ns1.example.com",
    "ns2.example.com"
  ],
  "dnssec_signed": true,
  "credits": {
    "charged": 1,
    "remaining": 29
  }
}

Uses Cert Spotter, 94 common-name A questions and MX/NS/SPF records. Returns at most 50 names, DNS-confirmed first; the count goes up to 1000. Past the hourly Cert Spotter limit it still returns DNS names with certificate_logs_available false.

Path parameters

domainstringrequiredtakes your domain

Domain; a subdomain is treated as its registrable domain

Example: example.com
Response fields · 7Show

domainstring

Registrable domain

subdomain_countinteger

Number of subdomains found, up to 1000

hostnamestring

Subdomain

sources[]string

Where it was found

has_ipv4_addressboolean

Whether it resolves to an IPv4 address

wildcard_dnsstring

absent, present or undetermined

certificate_logs_availableboolean

False when Cert Spotter gave no usable answer

curl 'https://api.contrastcyber.com/subdomain_enum/example.com' \
  -H 'X-API-Key: YOUR_API_KEY'
Replace YOUR_API_KEY with your key
Response
{
  "domain": "example.com",
  "subdomain_count": 1,
  "subdomains": [
    {
      "hostname": "www.example.com",
      "sources": [
        "dns"
      ],
      "has_ipv4_address": true
    }
  ],
  "wildcard_dns": "absent",
  "certificate_logs_available": true,
  "credits": {
    "charged": 2,
    "remaining": 28
  }
}

IP

Refuses private, loopback, link-local, documentation, multicast and reserved addresses, hostnames and CIDR prefixes. An address held by no list still returns 200. The reputation (AbuseIPDB) and internet_exposure (Shodan) slots are filled only for a Pro key with stored vendor keys. Because the documentation ranges are refused, use a real public address when trying it.

Path parameters

ip_addressstringrequiredtakes your ip address

Globally reachable IPv4 or IPv6 address

Example: 203.0.113.7
Response fields · 13Show

ip_addressstring

Canonical form of the address

asninteger

Autonomous system number

asn_namestring

AS name

asn_countrystring

AS country

geo_countrystring

Country from DB-IP Lite

cloud_providerstring

Cloud provider range holding the address

is_cdnboolean

Whether the range is a CDN

is_datacenterboolean

In a cloud range or a known hosting AS

is_tor_exitboolean

Whether the address is a Tor exit

crawlerstring

Crawler list holding the address

listed_on[]object

DROP prefixes holding the address

ptrstring

PTR name, or null

is_ptr_forward_confirmedboolean

Whether the PTR name resolves back to the address

curl 'https://api.contrastcyber.com/ip_lookup/203.0.113.7' \
  -H 'X-API-Key: YOUR_API_KEY'
Replace YOUR_API_KEY with your key
Response
{
  "ip_address": "203.0.113.7",
  "asn": 64496,
  "asn_name": "Example Net",
  "asn_country": "XX",
  "geo_country": "XX",
  "cloud_provider": null,
  "is_cdn": false,
  "is_datacenter": false,
  "is_tor_exit": false,
  "crawler": null,
  "listed_on": [],
  "ptr": "host.example.com",
  "is_ptr_forward_confirmed": true
}

Email

  • Takes: Email
  • Passive: the target is not contacted
  • Cost: 1 credit

Percent-decodes the path segment; + stays +. Up to 254 bytes, ASCII dot-atom local part; quoted local parts are refused. Makes no SMTP connection, so it cannot confirm that a mailbox exists.

Path parameters

emailstringrequiredtakes your email

Email address

Example: jane@example.com
Response fields · 8Show

emailstring

Address checked

domainstring

Domain part

domain_existsboolean

Whether the domain exists

accepts_mailboolean

Whether the domain accepts mail

mail_routestring

How mail is routed, for example null_mx

mx_hosts[]string

MX hosts

disposableboolean

Whether the domain is a known disposable provider

danglingboolean

Dangling CNAME flag

curl 'https://api.contrastcyber.com/email_address_check/jane%40example.com' \
  -H 'X-API-Key: YOUR_API_KEY'
Replace YOUR_API_KEY with your key
Response
{
  "email": "jane@example.com",
  "domain": "example.com",
  "domain_exists": true,
  "accepts_mail": true,
  "mail_route": "mx",
  "mx_hosts": [
    "mail.example.com"
  ],
  "disposable": false,
  "dangling": false,
  "credits": {
    "charged": 1,
    "remaining": 29
  }
}