跳到主要内容
ecdsa.com

REST API v1 · 免费 · 无需密钥 · 已启用 CORS

免费签名 API

ecdsa.com 各工具背后的检查功能,可以从脚本、CI 和 AI 智能体中调用:验证 ECDSA 签名,在 DER 与原始格式之间转换,解码并验证 ES256/ES384/ES512 JWT,解码 X.509 证书,评估域名的 TLS 签名健康状况。基于 HTTPS 的纯 JSON 接口——https://ecdsa.com/api/v1

curl -s https://ecdsa.com/api/v1

机器可读的规范:/api/v1/openapi.json(OpenAPI 3.1)

API 能做什么

每个操作都是其输入的纯函数:发送 JSON,返回 JSON。每个操作都有一个参考页面,列出它的字段、可运行的示例和错误码。

AI 智能体和 IDE 助手可以通过 MCP 服务器调用同样的操作。 完整 API 参考

30 秒完成第一次调用

把其中一条粘贴到终端或浏览器控制台中。示例是真实的:签名可以用该密钥验证通过。

curl
curl -sS 'https://ecdsa.com/api/v1/verify' \
  -H 'content-type: application/json' \
  -d '{
  "publicKey": "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE4+8TCP3Hop/Acb8L7reksO9flyt1\nsUhvEqUs7a45RVDRDtAIZdTnOJcAhTCQvdzUBO4KUyxSRcZm6ro+2RGfSQ==\n-----END PUBLIC KEY-----",
  "message": "The quick brown fox jumps over the lazy dog",
  "signature": "3045022100df542bb71e0e3019086f1b1ba51f1aa0ec5e6afca05c3f5a7f4f02f5b7c39d24022030c59f1ac6d8c6893fb2a5ac8dfd9388d31ebd3382510dcfb7f28f9182eb1131"
}'
JavaScript (fetch)
const response = await fetch("https://ecdsa.com/api/v1/verify", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({
    "publicKey": "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE4+8TCP3Hop/Acb8L7reksO9flyt1\nsUhvEqUs7a45RVDRDtAIZdTnOJcAhTCQvdzUBO4KUyxSRcZm6ro+2RGfSQ==\n-----END PUBLIC KEY-----",
    "message": "The quick brown fox jumps over the lazy dog",
    "signature": "3045022100df542bb71e0e3019086f1b1ba51f1aa0ec5e6afca05c3f5a7f4f02f5b7c39d24022030c59f1ac6d8c6893fb2a5ac8dfd9388d31ebd3382510dcfb7f28f9182eb1131"
  }),
});
console.log(response.status, await response.json());
响应 200
{
  "valid": true,
  "curve": "P-256",
  "curvesTried": [
    "P-256"
  ],
  "keySource": "pem-spki",
  "signatureFormat": "der",
  "details": {
    "r": "df542bb71e0e3019086f1b1ba51f1aa0ec5e6afca05c3f5a7f4f02f5b7c39d24",
    "s": "30c59f1ac6d8c6893fb2a5ac8dfd9388d31ebd3382510dcfb7f28f9182eb1131",
    "highS": false
  },
  "notes": []
}

这正是 API 对这条请求返回的结果。

下一步:在 API 参考中查看这个操作的所有字段和选项,在错误表中了解每种错误的含义。

基本原则

免费,无需密钥

无需注册,无需令牌,也没有需要管理的配额。发送请求,即可收到 JSON 响应。限额更高的可选 API 密钥将随 ecdsa.com 账号一同推出。

每个 IP 每分钟 60 次请求

对脚本和 CI 来说绰绰有余。域名健康检查操作另有每分钟 10 次的额度,因为它会向外发起扫描。

开放 CORS

每个响应都带有 Access-Control-Allow-Origin: *——可以直接从浏览器、文档页面或无服务器函数中调用 API。

切勿发送私钥

如果请求中包含 PEM PRIVATE KEY 块,OpenSSH、SSH2 或 PuTTY 私钥,或者带有“d”的 JWK,API 会拒绝该请求并返回 private_key_rejected。涉及任何机密内容时,请使用在浏览器本地运行的工具——它们从不传输你的输入。

不记录日志

请求体在内存中解析,从不写入日志。

速率限制

整个 API 统一限制为每个 IP 每分钟 60 次请求;/v1/health/{domain} 会建立出站 TLS 连接,另外限制为每分钟 10 次。

每个响应都带有 X-RateLimit-Limit、X-RateLimit-Remaining 和 X-RateLimit-Reset;超出限制时返回 429,并附带 Retry-After 响应头。

对域名的实际扫描还会消耗所有人共享的额度:同一主机每 10 分钟最多被扫描 6 次,所有扫描加起来每分钟最多 300 次,因此无法借助 API 向服务器发起洪泛请求。来自一小时缓存的结果不消耗额度;超出额度的扫描会收到 429 rate_limited 和 Retry-After。

使用 API 密钥时,改为按密钥限制调用——免费版每分钟 120 次,专业版每分钟 600 次——并计入账号的每日和每月配额。API 密钥将随 ecdsa.com 账号一同推出,目前还无法创建;在此之前,所有调用都是匿名的。

更多调用额度和监控功能已在计划中:参见定价,并加入候补名单。

请把文档中的数字视为预期的额度,而不是硬性上限:遇到 429 时礼貌地退避,并在客户端做好缓存——域名健康检查的结果本身就会缓存一小时。

错误

每个错误都是 JSON,包含机器可读的错误码和人类可读的消息,准确说明输入哪里有问题——与浏览器工具中显示的解释相同。错误响应会在 docs 字段中链接到这里。

错误码HTTP含义
invalid_json400The body is not valid JSON or not a JSON object; or the input nests arrays and objects more than 64 levels deep (JSON documents inside string fields count too), or is too complex to inspect for private keys.
missing_field400A required field is absent or empty.
invalid_input400A field could not be parsed — the message explains exactly why.
private_key_rejected400The request contains private-key material (a PEM PRIVATE KEY block, an OpenSSH, SSH2 or PuTTY private key, or a JWK with "d"). Never send private keys anywhere.
unsupported_algorithm400The token's algorithm is not one this operation verifies.
invalid_domain400Not a public DNS hostname (IP addresses, single-label names and paths are refused).
scan_dns_error400The domain does not resolve in public DNS.
scan_private_address400The domain resolves (at least partly) to a private or reserved address.
webhook_url_refused400The webhook URL cannot receive deliveries: it is not https on port 443, its host is not a public DNS name, or the name does not resolve or resolves (at least partly) to a private or reserved address.
unauthorized401The Authorization or X-API-Key header is malformed, the API key is not valid (wrong checksum, unknown, revoked or expired), or the operation needs a key.
forbidden_scope403The API key is valid but lacks a scope this operation requires; the message names it.
webhook_limit_reached403The account already has as many webhook endpoints as its plan allows.
not_found404No operation exists at this path.
webhook_not_found404The API key's account has no webhook endpoint with this id.
method_not_allowed405The path exists but does not accept this HTTP method; see the Allow header.
payload_too_large413The body exceeds 100 KB.
rate_limited429Too many requests — see Retry-After.
quota_exceeded429A daily or monthly quota of the API key's account is used up. X-Quota-Reset (and Retry-After) say when it starts over; retrying earlier cannot succeed.
internal_error500Unexpected server error.
scan_unreachable502The domain refused or dropped the connection on port 443.
scan_tls_error502The TLS handshake failed or presented no usable certificate.
service_unavailable503API keys cannot be verified right now (the key store is unreachable); retry shortly.
webhooks_unavailable503Webhooks are switched off on this server: it has no signing keys configured.
scan_timeout504The scan did not finish in time.
timeout504The operation did not finish within its time budget.

每个错误码的处理方法,以及 SDK 会重试哪些错误码

继续探索

更新日志

最新版本:v1.1.0,发布于2026年10月22日。 API 的版本号体现在路径中;如有不兼容的变更,将以 /api/v2 发布——v1 的响应可能会新增字段,但不会删除或修改已有字段。

完整更新日志