# expiring()

Canonical URL: https://developers.iagenify.com/ar/sdk/ref/domains/expiring/
Language: ar

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

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

Status: read live · unknown stays listed · 30 days by default

```javascript
await api.domains.expiring({ withinDays: 60 });
// { withinDays: 60,
//   domains: [{ id, name, expiresAt, daysLeft: 53, registrar, locked }] }
```

| Name | Type | Requirement | Description |
| --- | --- | --- | --- |
| `withinDays` | number | 30 | How far ahead to look. |

## Never from memory {#live}

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 {#unknown}

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

- [owner()](/ar/sdk/ref/domain/owner): One domain in detail.
- [api.domains](/ar/sdk/ref/domains): Searching, attaching, listing.

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