api.domains

expiring()

api.domains.expiring({ withinDays }) → Promise<Expiring>

Every domain of the account whose renewal is close — read at the registry on each call.

read liveunknown stays listed30 days by default
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

await api.domains.expiring({ withinDays: 60 });
// { withinDays: 60,
//   domains: [{ id, name, expiresAt, daysLeft: 53, registrar, locked }] }
api.domains.expiring(within_days=60)
# {"withinDays": 60,
#  "domains": [{"id", "name", "expiresAt", "daysLeft": 53, "registrar", "locked"}]}
withinDaysnumber30

How far ahead to look.

Never from memory

A stored expiry that has gone stale is the very trap this call exists to close, so each call reads the registry again.

A domain of unknown expiry stays in the list

It comes back with daysLeft: null. Not knowing when a domain expires is a reason to look at it, not to leave it out.