{"openapi":"3.0.3","info":{"title":"DN.EE API","version":"1.0.0","description":"Private JSON API for .ee domain intelligence. Authenticate with an API key. Prefer whois[].registered_at or legacyEvents[].registeredAt for registration age; otherwise ageDays/firstSeen is zone observation age only. WHOIS snapshots are best-effort until the rolling scan covers a domain."},"servers":[{"url":"https://dn.ee","description":"Production"}],"components":{"securitySchemes":{"ApiKeyHeader":{"type":"apiKey","in":"header","name":"x-api-key"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API key"}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"retryAfterSeconds":{"type":"integer"}}},"DomainRow":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string","example":"example.ee"},"displayName":{"type":"string"},"isIdn":{"type":"boolean"},"firstSeen":{"type":"string","format":"date","nullable":true},"lastSeen":{"type":"string","format":"date","nullable":true},"presentToday":{"type":"boolean"}}},"DomainDetail":{"allOf":[{"$ref":"#/components/schemas/DomainRow"},{"type":"object","properties":{"ageDays":{"type":"integer","nullable":true,"description":"Whole UTC calendar days since firstSeen (zone observation age). Null when firstSeen is missing."},"legacyEvents":{"type":"array","description":"Legacy archive events; registeredAt is the best source for historical registration dates.","items":{"$ref":"#/components/schemas/LegacyEvent"}},"whois":{"type":"array","description":"WHOIS snapshots when the rolling scan has covered this domain; often empty until then.","items":{"$ref":"#/components/schemas/WhoisSnapshot"}}}}]},"LegacyEvent":{"type":"object","properties":{"eventDate":{"type":"string","format":"date"},"eventTime":{"type":"string","nullable":true},"status":{"type":"string","nullable":true},"registeredAt":{"type":"string","nullable":true},"changedAt":{"type":"string","nullable":true},"expiresOn":{"type":"string","nullable":true},"outzoneAt":{"type":"string","nullable":true},"deleteAt":{"type":"string","nullable":true},"registrarId":{"type":"string","nullable":true},"registrarName":{"type":"string","nullable":true},"registrantId":{"type":"string","nullable":true},"nameservers":{"type":"array","items":{"type":"string"}}}},"WhoisSnapshot":{"type":"object","description":"Raw WHOIS snapshot fields (snake_case).","properties":{"observed_on":{"type":"string","format":"date"},"status":{"type":"string","nullable":true},"registrar_name":{"type":"string","nullable":true},"registered_at":{"type":"string","nullable":true,"description":"Registration timestamp when known; use for registration age."},"expires_on":{"type":"string","nullable":true},"nameservers":{"type":"array","items":{"type":"string"}}}},"DailyStat":{"type":"object","description":"Daily totals (snake_case).","properties":{"observed_on":{"type":"string","format":"date"},"domain_count":{"type":"string"},"added_count":{"type":"string"},"removed_count":{"type":"string"}}},"LatestRun":{"type":"object","nullable":true,"properties":{"id":{"type":"integer"},"runDate":{"type":"string"},"status":{"type":"string"},"startedAt":{"type":"string"},"finishedAt":{"type":"string","nullable":true},"domainsFound":{"type":"integer","nullable":true},"observationsInserted":{"type":"integer","nullable":true},"whoisChecked":{"type":"integer","nullable":true},"whoisErrors":{"type":"integer","nullable":true}}}}},"security":[{"ApiKeyHeader":[]},{"BearerAuth":[]}],"paths":{"/api/v1/domains":{"get":{"summary":"Search domains","parameters":[{"name":"query","in":"query","schema":{"type":"string"},"description":"Prefix match on normalized name"},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"Pagination cursor (previous last name)"},{"name":"limit","in":"query","schema":{"type":"integer","default":50,"maximum":100}},{"name":"status","in":"query","schema":{"type":"string","enum":["current","historical"]}},{"name":"kind","in":"query","schema":{"type":"string","enum":["numeric","hyphen","idn"]}},{"name":"length","in":"query","schema":{"type":"string"},"description":"Label length 1–63"},{"name":"registrar","in":"query","schema":{"type":"string"},"description":"Legacy registrar id"}],"responses":{"200":{"description":"Paginated domain list","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DomainRow"}},"nextCursor":{"type":"string","nullable":true}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"API key required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"API not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/domains/{name}":{"get":{"summary":"Domain detail, age, legacy events, and WHOIS","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"},"description":"Domain name (URL-encoded), e.g. example.ee"}],"responses":{"200":{"description":"Domain detail","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/DomainDetail"}}}}}},"401":{"description":"API key required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Domain not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"API not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/changes":{"get":{"summary":"Daily added and removed domains","parameters":[{"name":"date","in":"query","schema":{"type":"string","format":"date"}},{"name":"limit","in":"query","schema":{"type":"integer","default":500,"maximum":500}}],"responses":{"200":{"description":"Daily changes","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"date":{"type":"string"},"previousDate":{"type":"string","nullable":true},"nextDate":{"type":"string","nullable":true},"addedCount":{"type":"integer"},"removedCount":{"type":"integer"},"net":{"type":"integer"},"added":{"type":"array","items":{"type":"object"}},"removed":{"type":"array","items":{"type":"object"}}}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"API key required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"API not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/stats/daily":{"get":{"summary":"Daily totals and movement history","parameters":[{"name":"from","in":"query","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"Daily stats (newest first; up to 120 rows by default, max 365)","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DailyStat"}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"API key required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"API not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/runs/latest":{"get":{"summary":"Latest scraper run metadata","responses":{"200":{"description":"Latest run","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/LatestRun"}}}}}},"401":{"description":"API key required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"API not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/openapi.json":{"get":{"summary":"OpenAPI 3 document","security":[],"responses":{"200":{"description":"OpenAPI specification","content":{"application/json":{"schema":{"type":"object"}}}}}}}}}