domain_security_get_report

Domain security check: SSL certificate, DMARC/SPF, DNSSEC, security headers and blocklist status with a score

Price
$0.009 USDC · per call
Service
Domain security
Category
Risk screening
Endpoint
POST /v1/domain-security/get_report

Security posture report of a domain. Send a `domain` (stripe.com, www.stripe.com or a URL). The service resolves it, then checks: the TLS certificate (validity for the host name, issuer, expiry date and days left, protocol version), whether plain HTTP redirects to HTTPS, the HTTP security headers (HSTS, CSP, X-Content-Type-Options, X-Frame-Options, Referrer-Policy, Permissions-Policy) and software-version disclosure, the mail-spoofing defences (SPF and DMARC policies, MTA-STS, mail platform), DNSSEC, name servers, CAA records, and whether the host's IPv4 addresses are on public IP blocklists. The answer lists findings with severity (critical, high, medium, low, info) and a stable code, plus a 0-100 score and an A-F grade. Only public addresses are probed, with a single request per check: this is an assessment, not an intrusion scan. No language model is involved. A domain that does not resolve is not charged. Costs $0.009 per call. Reports are stored and reused: the response says when the domain was assessed (`retrieved_at`), how old the report is (`age_seconds`) and whether it came from a stored result (`from_cache`); send `max_age_seconds` to choose the oldest report you accept, or 0 to force a fresh assessment. A call usually takes 1 to 6 seconds. Free trial: 3 free calls per caller IP address, per tool, per 24 hours (and at most 50 free calls per window for this tool across all callers; MCP callers, whose address is not known, share a single anonymous free call). After that, every call is paid via x402 at $0.009 USDC per call.

Parameters

domainstring · requiredThe domain to assess: `stripe.com`, `www.stripe.com` or a full URL (only the host is used).
max_age_secondsinteger · optionalThe oldest report you accept, in seconds. Omit it for the default (reports up to 1 hour old); `0` forces a fresh assessment. The response always says how old it is.

Example request

HTTPcURLNode.jsPython

What your agent sends

{
  "domain": "example.org"
}
🎁 3 of 3 free calls left today

Plain curl stops at the 402 challenge: add an x402 client (Node.js or Python tabs) to pay automatically.

Shell
# Plain curl stops at the 402 challenge: add an x402 client (Node.js or Python tabs) to pay automatically.
curl -X POST 'https://api.17711.xyz/registry/domain-security-service/v1/domain-security/get_report' \
  -H 'content-type: application/json' \
  -d '{"domain":"example.org"}'

The x402 SDK handles the 402, the signature and the retry for you: one call, one result.

TypeScript
// npm install @x402/fetch @x402/evm viem
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`);
const client = new x402Client();
client.register("eip155:*", new ExactEvmScheme(signer));
const fetchWithPayment = wrapFetchWithPayment(fetch, client);

const res = await fetchWithPayment("https://api.17711.xyz/registry/domain-security-service/v1/domain-security/get_report", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"domain":"example.org"}),
});
console.log(await res.json());

The x402 SDK handles the 402, the signature and the retry for you: one call, one result.

Python 3
# pip install "x402[httpx]" eth_account
import asyncio, os
from eth_account import Account
from x402 import x402Client
from x402.http.clients import x402HttpxClient
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client


async def main() -> None:
    client = x402Client()
    account = Account.from_key(os.environ["EVM_PRIVATE_KEY"])
    register_exact_evm_client(client, EthAccountSigner(account))
    async with x402HttpxClient(client) as http:
        response = await http.post("https://api.17711.xyz/registry/domain-security-service/v1/domain-security/get_report", json={"domain":"example.org"})
        await response.aread()
        print(response.json())


asyncio.run(main())

The x402 Java reference client from the official repository. There is no published Java SDK yet: you supply the signature (for example with web3j).

Java 11+
// Reference client from github.com/coinbase/x402 (java/): build it with `mvn clean install`, then
// <dependency><groupId>org.x402</groupId><artifactId>x402</artifactId><version>1.0.0-SNAPSHOT</version></dependency>
import org.x402.client.X402HttpClient;
import org.x402.crypto.CryptoSigner;
import java.math.BigInteger;
import java.net.URI;
import java.net.http.HttpResponse;
import java.util.Map;

public class Call {
  public static void main(String[] args) throws Exception {
    // You provide the EIP-3009 signature (for example with web3j) from your private key (env EVM_PRIVATE_KEY).
    CryptoSigner signer = new CryptoSigner() {
      @Override
      public String sign(Map<String, Object> payload) {
        return signWithWallet(System.getenv("EVM_PRIVATE_KEY"), payload);
      }
    };
    X402HttpClient client = new X402HttpClient(signer);

    BigInteger amount = BigInteger.valueOf(9000); // $0.009 in USDC (6 decimals)
    String usdcOnBase = "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913";
    String payTo = "<the seller address from the 402 challenge>";
    HttpResponse<String> response = client.get(URI.create("https://api.17711.xyz/registry/domain-security-service/v1/domain-security/get_report"), amount, usdcOnBase, payTo);
    System.out.println(response.body());
  }
}

The x402 SDK handles the 402, the signature and the retry for you: one call, one result.

Go
// go get github.com/x402-foundation/x402/go/v2
package main

import (
	"context"
	"fmt"
	"io"
	"net/http"
	"os"
	"time"
	"strings"

	x402 "github.com/x402-foundation/x402/go/v2"
	x402http "github.com/x402-foundation/x402/go/v2/http"
	evm "github.com/x402-foundation/x402/go/v2/mechanisms/evm/exact/client"
	evmsigners "github.com/x402-foundation/x402/go/v2/signers/evm"
)

func main() {
	signer, _ := evmsigners.NewClientSignerFromPrivateKey(os.Getenv("EVM_PRIVATE_KEY"))
	client := x402.Newx402Client().Register("eip155:*", evm.NewExactEvmScheme(signer))
	httpClient := x402http.WrapHTTPClientWithPayment(http.DefaultClient, x402http.Newx402HTTPClient(client))

	ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
	defer cancel()
	req, _ := http.NewRequestWithContext(ctx, "POST", "https://api.17711.xyz/registry/domain-security-service/v1/domain-security/get_report", strings.NewReader(`{"domain":"example.org"}`))
	req.Header.Set("content-type", "application/json")
	res, err := httpClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(res.StatusCode, string(body))
}

The x402 SDK handles the 402, the signature and the retry for you: one call, one result.

Rust
// Cargo.toml: x402-reqwest = "0.6", x402-chain-eip155, alloy-signer-local, reqwest, tokio (features = ["full"])
use alloy_signer_local::PrivateKeySigner;
use reqwest::Client;
use std::sync::Arc;
use x402_chain_eip155::V2Eip155ExactClient;
use x402_reqwest::{ReqwestWithPayments, ReqwestWithPaymentsBuild, X402Client};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let signer: Arc<PrivateKeySigner> = Arc::new(std::env::var("EVM_PRIVATE_KEY")?.parse()?);
    let x402 = X402Client::new().register(V2Eip155ExactClient::new(signer));
    let http = Client::new().with_payments(x402).build();

    let res = http
        .post("https://api.17711.xyz/registry/domain-security-service/v1/domain-security/get_report")
        .header("content-type", "application/json")
        .body(r#"{"domain":"example.org"}"#)
        .send()
        .await?;
    println!("{} {}", res.status(), res.text().await?);
    Ok(())
}

What your agent's x402 client does behind the scenes (technical, illustrative).

  1. 1

    Call the endpoint

    →
    POST https://api.17711.xyz/registry/domain-security-service/v1/domain-security/get_report
    content-type: application/json
    
    {
      "domain": "example.org"
    }
    ←
    402 Payment Required
    HTTP/1.1 402 Payment Required
    PAYMENT-REQUIRED: <base64>
    
    {
      "x402Version": 2,
      "accepts": [
        {
          "scheme": "exact",
          "network": "eip155:8453",
          "amount": "9000",
          "asset": "USDC",
          "payTo": "0x…"
        }
      ]
    }
  2. 2

    Sign the payment (local)

    Your wallet signs a USDC authorisation locally. Nothing leaves your machine except the signature.

    →
    wallet.sign(transferWithAuthorization,
      to: payTo, value: 9000 ($0.009 USDC), network: base)
    ←
    signature
    PAYMENT-SIGNATURE: <signed authorisation>
  3. 3

    Retry with the signature

    →
    POST https://api.17711.xyz/registry/domain-security-service/v1/domain-security/get_report
    PAYMENT-SIGNATURE: <signed authorisation>
    content-type: application/json
    
    {
      "domain": "example.org"
    }
    ←
    200 OK
    HTTP/1.1 200 OK
    PAYMENT-RESPONSE: <settlement receipt>
    
    { … the tool's JSON answer … }

The x402 SDK does steps 2 and 3 for you.

OpenAPI definition

OpenAPI definition · domain_security_get_report
openapi.json
{
  "operationId": "domain_security_get_report",
  "summary": "Domain security check: SSL certificate, DMARC/SPF, DNSSEC, security headers and blocklist status with a score ($0.009, x402)",
  "description": "Security posture report of a domain. Send a `domain` (stripe.com, www.stripe.com or a URL). The service resolves it, then checks: the TLS certificate (validity for the host name, issuer, expiry date and days left, protocol version), whether plain HTTP redirects to HTTPS, the HTTP security headers (HSTS, CSP, X-Content-Type-Options, X-Frame-Options, Referrer-Policy, Permissions-Policy) and software-version disclosure, the mail-spoofing defences (SPF and DMARC policies, MTA-STS, mail platform), DNSSEC, name servers, CAA records, and whether the host's IPv4 addresses are on public IP blocklists. The answer lists findings with severity (critical, high, medium, low, info) and a stable code, plus a 0-100 score and an A-F grade. Only public addresses are probed, with a single request per check: this is an assessment, not an intrusion scan. No language model is involved. A domain that does not resolve is not charged. Costs $0.009 per call. Reports are stored and reused: the response says when the domain was assessed (`retrieved_at`), how old the report is (`age_seconds`) and whether it came from a stored result (`from_cache`); send `max_age_seconds` to choose the oldest report you accept, or 0 to force a fresh assessment. A call usually takes 1 to 6 seconds. Free trial: 3 free calls per caller IP address, per tool, per 24 hours (and at most 50 free calls per window for this tool across all callers; MCP callers, whose address is not known, share a single anonymous free call). After that, every call is paid via x402 at $0.009 USDC per call.",
  "x-price-usdc": "0.009",
  "x-payment-info": {
    "price": {
      "mode": "fixed",
      "currency": "USD",
      "amount": "0.009000"
    },
    "protocols": [
      {
        "x402": {}
      }
    ]
  },
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "domain": {
              "type": "string",
              "description": "The domain to assess: `stripe.com`, `www.stripe.com` or a full URL (only the host is used)."
            },
            "max_age_seconds": {
              "description": "The oldest report you accept, in seconds. Omit it for the default (reports up to 1 hour old); `0` forces a fresh assessment. The response always says how old it is.",
              "type": [
                "integer",
                "null"
              ],
              "minimum": 0
            }
          },
          "required": [
            "domain"
          ]
        },
        "example": {
          "domain": "string",
          "max_age_seconds": 0
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Successful response",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "domain": {
                "type": "string",
                "description": "The host that was assessed, lowercased, without scheme or path."
              },
              "ip_addresses": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Public IPv4/IPv6 addresses of the host (at most 8)."
              },
              "blocklisted": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "ip": {
                      "type": "string"
                    },
                    "source": {
                      "type": "string"
                    },
                    "cidr": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ip",
                    "source",
                    "cidr"
                  ]
                },
                "description": "Addresses found on a public IP blocklist (IPv4 only)."
              },
              "dns": {
                "type": "object",
                "properties": {
                  "dnssec": {
                    "type": "boolean",
                    "description": "Whether the answer for the domain is validated by DNSSEC."
                  },
                  "name_servers": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Authoritative name servers (at most 8)."
                  },
                  "caa": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "CAA records: the certificate authorities allowed to issue for the domain."
                  }
                },
                "required": [
                  "dnssec",
                  "name_servers",
                  "caa"
                ]
              },
              "mail": {
                "type": "object",
                "properties": {
                  "mx": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Mail servers (MX) of the website's domain, highest priority first (at most 5)."
                  },
                  "provider": {
                    "description": "Mail platform deduced from the MX records (`google-workspace`, `microsoft-365`, ...).",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "spf": {
                    "description": "SPF policy: `strict` (-all), `soft` (~all), `neutral` (?all), `open` (+all) or `none`.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "dmarc": {
                    "description": "DMARC policy: `reject`, `quarantine`, `none` or `absent`.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "mta_sts": {
                    "type": "boolean",
                    "description": "Whether an MTA-STS policy is published (`_mta-sts` TXT record)."
                  }
                },
                "required": [
                  "mx",
                  "mta_sts"
                ]
              },
              "tls": {
                "type": "object",
                "properties": {
                  "reachable": {
                    "type": "boolean",
                    "description": "Whether HTTPS answered on port 443."
                  },
                  "valid": {
                    "type": "boolean",
                    "description": "Whether the certificate chain validates for this host name."
                  },
                  "error": {
                    "description": "Why the handshake or validation failed, when it did.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "protocol": {
                    "description": "`TLS1.3` or `TLS1.2`.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "issuer": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "expires_at": {
                    "description": "Certificate end of validity (UTC).",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "days_remaining": {
                    "description": "Days left before expiry (negative once expired).",
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "san_count": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "Number of host names the certificate covers."
                  }
                },
                "required": [
                  "reachable",
                  "valid",
                  "san_count"
                ]
              },
              "http": {
                "type": "object",
                "properties": {
                  "https_status": {
                    "description": "Status of `GET https://<domain>/`.",
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0,
                    "maximum": 65535
                  },
                  "http_redirects_to_https": {
                    "description": "`true` when plain HTTP on port 80 redirects to HTTPS, `false` when it serves content or redirects elsewhere, absent when port 80 does not answer.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "headers_present": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Security headers found on the HTTPS response (`strict-transport-security`, `content-security-policy`, `x-content-type-options`, `x-frame-options`, `referrer-policy`, `permissions-policy`)."
                  },
                  "headers_missing": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "The ones that are missing."
                  },
                  "discloses_version": {
                    "type": "boolean",
                    "description": "Whether the `Server` / `X-Powered-By` headers disclose a software version."
                  }
                },
                "required": [
                  "headers_present",
                  "headers_missing",
                  "discloses_version"
                ]
              },
              "findings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "severity": {
                      "type": "string",
                      "description": "`critical`, `high`, `medium`, `low` or `info`."
                    },
                    "code": {
                      "type": "string",
                      "description": "Stable machine-readable code, e.g. `tls.expired`, `mail.dmarc_absent`, `http.hsts_missing`."
                    },
                    "message": {
                      "type": "string",
                      "description": "What was observed and why it matters, in one sentence."
                    }
                  },
                  "required": [
                    "severity",
                    "code",
                    "message"
                  ]
                },
                "description": "Everything worth acting on, most severe first."
              },
              "score": {
                "type": "integer",
                "minimum": 0,
                "description": "0 to 100, higher is better; derived from the findings."
              },
              "grade": {
                "type": "string",
                "description": "`A` (90+), `B` (80+), `C` (65+), `D` (50+), `F`."
              },
              "retrieved_at": {
                "type": "string",
                "description": "When the assessment was made (UTC)."
              },
              "age_seconds": {
                "type": "integer",
                "minimum": 0,
                "description": "How old this report is, in seconds (0 for a fresh assessment)."
              },
              "from_cache": {
                "type": "boolean",
                "description": "`true` when this report was served from a stored result."
              }
            },
            "required": [
              "domain",
              "ip_addresses",
              "blocklisted",
              "dns",
              "mail",
              "tls",
              "http",
              "findings",
              "score",
              "grade",
              "retrieved_at",
              "age_seconds",
              "from_cache"
            ]
          },
          "example": {
            "domain": "string",
            "ip_addresses": [
              "string"
            ],
            "blocklisted": [
              {
                "ip": "string",
                "source": "string",
                "cidr": "string"
              }
            ],
            "dns": {
              "dnssec": false,
              "name_servers": [
                "string"
              ],
              "caa": [
                "string"
              ]
            },
            "mail": {
              "mx": [
                "string"
              ],
              "provider": "string",
              "spf": "string",
              "dmarc": "string",
              "mta_sts": false
            },
            "tls": {
              "reachable": false,
              "valid": false,
              "error": "string",
              "protocol": "string",
              "issuer": "string",
              "expires_at": "string",
              "days_remaining": 0,
              "san_count": 0
            },
            "http": {
              "https_status": 0,
              "http_redirects_to_https": false,
              "headers_present": [
                "string"
              ],
              "headers_missing": [
                "string"
              ],
              "discloses_version": false
            },
            "findings": [
              {
                "severity": "string",
                "code": "string",
                "message": "string"
              }
            ],
            "score": 0,
            "grade": "string",
            "retrieved_at": "string",
            "age_seconds": 0,
            "from_cache": false
          }
        }
      }
    },
    "402": {
      "description": "Payment required -- a free-call quota exists (default 5 calls, see PLATFORM_FREEMIUM_FREE_CALLS) before this status applies; beyond it, pay via the real x402 protocol (PAYMENT-REQUIRED response header, decode and retry with a signed PAYMENT-SIGNATURE header).",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "description": "x402 v2 PaymentRequired challenge",
            "properties": {
              "x402Version": {
                "type": "integer"
              },
              "error": {
                "type": "string"
              },
              "resource": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "mimeType": {
                    "type": "string"
                  }
                }
              },
              "accepts": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "scheme": {
                      "type": "string"
                    },
                    "network": {
                      "type": "string"
                    },
                    "amount": {
                      "type": "string",
                      "description": "Token atomic units, NOT decimal USD -- see x-payment-info.price.amount for the decimal form."
                    },
                    "asset": {
                      "type": "string"
                    },
                    "payTo": {
                      "type": "string"
                    },
                    "maxTimeoutSeconds": {
                      "type": "integer"
                    },
                    "extra": {
                      "type": "object"
                    }
                  }
                }
              }
            },
            "required": [
              "x402Version",
              "accepts"
            ]
          }
        }
      }
    },
    "default": {
      "description": "Standardized error envelope, on every non-2xx response from this fleet: {\"error\": {\"code\": <dotted string, e.g. \"request.bad_request\">, \"index\": <integer>, \"status\": <HTTP status code>, \"message\": <client-safe description>, \"debug\": <object, present only for an authorized caller>}}.",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "description": "ErrorEnvelope"
          }
        }
      }
    }
  }
}