{"openapi":"3.1.0","info":{"title":"RDAP API","version":"1.0.0","description":"Agent-native RDAP lookup. Protocol, accelerated."},"servers":[{"url":"https://rdap.aktagon.com"}],"paths":{"/check/{domain}":{"get":{"operationId":"checkDomain","summary":"Look up RDAP data for a domain","parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string"},"description":"The domain to look up (e.g. example.com)"},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string"},"description":"Bearer token for API key authentication (e.g. Bearer rdap_live_abc123...)"}],"responses":{"200":{"description":"Domain lookup result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainResponse"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Request limit per period"},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Remaining requests in current period"},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until rate limit resets"}}},"400":{"description":"Invalid domain format","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"TLD not supported","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Request limit per period"},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Remaining requests in current period"},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until rate limit resets"}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Upstream error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Upstream rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Upstream timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/check/ip/{ip}":{"get":{"operationId":"checkIp","summary":"Look up RDAP data for an IP address","parameters":[{"name":"ip","in":"path","required":true,"schema":{"type":"string"},"description":"The IP address to look up (e.g. 8.8.8.8 or 2001:4860:4860::8888)"},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string"},"description":"Bearer token for API key authentication (e.g. Bearer rdap_live_abc123...)"}],"responses":{"200":{"description":"IP lookup result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IpResponse"}}}},"400":{"description":"Invalid IP address","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"IP not covered by any RDAP server","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/check/asn/{asn}":{"get":{"operationId":"checkAsn","summary":"Look up RDAP data for an ASN","parameters":[{"name":"asn","in":"path","required":true,"schema":{"type":"string"},"description":"The AS number to look up (e.g. 15169)"},{"name":"Authorization","in":"header","required":false,"schema":{"type":"string"},"description":"Bearer token for API key authentication (e.g. Bearer rdap_live_abc123...)"}],"responses":{"200":{"description":"ASN lookup result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AsnResponse"}}}},"400":{"description":"Invalid ASN","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"ASN not covered by any RDAP server","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/check/bulk":{"post":{"operationId":"checkDomainsBulk","summary":"Look up RDAP data for multiple domains (max 50)","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"type":"string"},"description":"Bearer token for API key authentication (e.g. Bearer rdap_live_abc123...)"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["domains"],"properties":{"domains":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":50,"description":"Array of domain names to look up"}}}}}},"responses":{"200":{"description":"Bulk lookup results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkResponse"}}}},"400":{"description":"Invalid request (empty or >50 domains)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/usage":{"get":{"operationId":"getUsage","summary":"Get API usage data for the authenticated key","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"type":"string"},"description":"Bearer token for API key authentication (e.g. Bearer rdap_live_abc123...)"},{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"date"},"description":"Start date (YYYY-MM-DD)"},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"date"},"description":"End date (YYYY-MM-DD)"}],"responses":{"200":{"description":"Usage data for the date range","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageResponse"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Request limit per period"},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Remaining requests in current period"},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until rate limit resets"}}},"400":{"description":"Invalid date range","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/webhooks/stripe":{"post":{"operationId":"stripeWebhook","summary":"Stripe webhook endpoint","parameters":[{"name":"Stripe-Signature","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Webhook processed","content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string"},"received":{"type":"boolean"}}}}}},"400":{"description":"Invalid signature","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/tlds":{"get":{"operationId":"listTlds","summary":"List all supported TLDs and their RDAP servers","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"type":"string"},"description":"Bearer token for API key authentication (e.g. Bearer rdap_live_abc123...)"}],"responses":{"200":{"description":"List of supported TLDs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TldsResponse"}}},"headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Request limit per period"},"RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Remaining requests in current period"},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until rate limit resets"}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"ErrorCode":{"type":"string","enum":["invalid_domain","tld_not_supported","upstream_timeout","upstream_error","upstream_rate_limited","rate_limited","unauthorized","invalid_ip","ip_not_covered","invalid_asn","asn_not_covered","invalid_date_range","internal_error"]},"ErrorDetail":{"type":"object","required":["code","message"],"properties":{"code":{"$ref":"#/components/schemas/ErrorCode"},"message":{"type":"string"}}},"Meta":{"type":"object","required":["requestId","cacheStatus","upstreamServer","responseTimeMs","followedRegistrar","retries"],"properties":{"requestId":{"type":"string","format":"uuid"},"cacheStatus":{"type":["string","null"],"enum":["HIT","MISS",null]},"upstreamServer":{"type":["string","null"]},"responseTimeMs":{"type":"number"},"followedRegistrar":{"type":"boolean"},"retries":{"type":"integer"}}},"Registrar":{"type":"object","required":["name","ianaId","abuseContact"],"properties":{"name":{"type":["string","null"]},"ianaId":{"type":["string","null"]},"abuseContact":{"type":["string","null"]}}},"Dates":{"type":"object","required":["registered","expires","updated"],"properties":{"registered":{"type":["string","null"]},"expires":{"type":["string","null"]},"updated":{"type":["string","null"]}}},"DomainSummary":{"type":"object","required":["domain","registrar","nameservers","dnssec","dates","status"],"properties":{"domain":{"type":"string"},"registrar":{"$ref":"#/components/schemas/Registrar"},"nameservers":{"type":"array","items":{"type":"string"}},"dnssec":{"type":["boolean","null"]},"dates":{"$ref":"#/components/schemas/Dates"},"status":{"type":"array","items":{"type":"string"}}}},"DomainResponse":{"type":"object","required":["available","summary","_meta","rdap"],"properties":{"available":{"type":"boolean"},"summary":{"$ref":"#/components/schemas/DomainSummary"},"_meta":{"$ref":"#/components/schemas/Meta"},"rdap":{}}},"ErrorResponse":{"type":"object","required":["error","_meta"],"properties":{"error":{"$ref":"#/components/schemas/ErrorDetail"},"_meta":{"$ref":"#/components/schemas/Meta"}}},"TldsEntry":{"type":"object","required":["tld","rdapServer"],"properties":{"tld":{"type":"string"},"rdapServer":{"type":"string"}}},"TldsResponse":{"type":"object","required":["tlds","_meta"],"properties":{"tlds":{"type":"array","items":{"$ref":"#/components/schemas/TldsEntry"}},"_meta":{"$ref":"#/components/schemas/Meta"}}},"IpSummary":{"type":"object","required":["ip","name","type","country","parentHandle","startAddress","endAddress","cidr","status"],"properties":{"ip":{"type":"string"},"name":{"type":["string","null"]},"type":{"type":["string","null"]},"country":{"type":["string","null"]},"parentHandle":{"type":["string","null"]},"startAddress":{"type":["string","null"]},"endAddress":{"type":["string","null"]},"cidr":{"type":["string","null"]},"status":{"type":"array","items":{"type":"string"}}}},"IpResponse":{"type":"object","required":["summary","_meta","rdap"],"properties":{"summary":{"$ref":"#/components/schemas/IpSummary"},"_meta":{"$ref":"#/components/schemas/Meta"},"rdap":{}}},"AsnSummary":{"type":"object","required":["asn","name","handle","type","country","startAutnum","endAutnum","status"],"properties":{"asn":{"type":"integer"},"name":{"type":["string","null"]},"handle":{"type":["string","null"]},"type":{"type":["string","null"]},"country":{"type":["string","null"]},"startAutnum":{"type":["integer","null"]},"endAutnum":{"type":["integer","null"]},"status":{"type":"array","items":{"type":"string"}}}},"AsnResponse":{"type":"object","required":["summary","_meta","rdap"],"properties":{"summary":{"$ref":"#/components/schemas/AsnSummary"},"_meta":{"$ref":"#/components/schemas/Meta"},"rdap":{}}},"BulkResponse":{"type":"object","required":["results","_meta"],"properties":{"results":{"type":"array","items":{}},"_meta":{"$ref":"#/components/schemas/Meta"}}},"UsageEntry":{"type":"object","required":["date","requests","domains","ips","asns"],"properties":{"date":{"type":"string","format":"date"},"requests":{"type":"integer"},"domains":{"type":"integer"},"ips":{"type":"integer"},"asns":{"type":"integer"}}},"UsageResponse":{"type":"object","required":["usage","_meta"],"properties":{"usage":{"type":"array","items":{"$ref":"#/components/schemas/UsageEntry"}},"_meta":{"$ref":"#/components/schemas/Meta"}}}}}}