# get_domain_price

Source: https://modulify.ai/docs/mcp/bought-domains/get-domain-price

Prices buying a domain, or renewing one the workspace bought, for a term in whole years.

- Title: Price a domain for a term
- Scope: `domains:read`
- Access: Read only

To price a purchase, pass `domain`. To price a renewal, pass `domainId` instead. The answer carries `AmountCents`, the total in US cents for the whole term, which `buy_domain` and `renew_domain` must be given back as `amountCents`, `Years`, `MinYears` and `MaxYears`, the range of terms, `AllowedYears`, `Premium` and `PrivacyAvailable`.

`AllowedYears` lists the only terms a purchase can use when the extension sells a fixed set of them, and any other term is refused. It is `null` when every whole year from `MinYears` to `MaxYears` works, as it always is for a renewal. `PrivacyAvailable` is `false` when the extension offers no WHOIS privacy, so the registry may publish the registrant's details.

A domain is sold for 1 to 10 years, and some extensions only for a longer minimum term, which `MinYears` reports. A domain can be registered at most 10 years ahead, so a renewal's `MaxYears` shrinks as the time left on the domain grows, and once even `MinYears` would go past that ceiling the call is refused, because the domain cannot be renewed yet. Leave `years` out to price the shortest term allowed. Pricing a purchase is refused when the extension's registry needs extra details Modulify cannot collect yet, or when the name has characters other than a to z, 0 to 9 and hyphens.

For a purchase the answer also carries `RenewalAmountCents` and `RenewalYears`: what renewing the domain later costs today, in US cents, for `RenewalYears` years, the shortest renewal the extension allows. `RenewalAmountCents` is `null` when the registrar gave no renewal price, and both are `null` when you price a renewal.

For a purchase the answer also carries `Contact`, the registrant you entered on your last domain order in this workspace, filled in only for the workspace owner and `null` when you have not ordered one there. The tool tells the client to reuse it for `buy_domain` only after you confirm it. Every member can read a price, 20 times a minute per person. See [Pick a term](https://modulify.ai/docs/publish/buy-a-domain#pick-a-term).

## Inputs

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `workspaceId` | string | Yes | The workspace that would pay. |
| `domain` | string | No | The domain to buy, such as `acme.com`, up to 253 characters. Leave it out when renewing. |
| `domainId` | string | No | The `_id` of a bought domain to renew, from `list_bought_domains`. Leave it out when buying. |
| `years` | integer | No | The term in whole years. Defaults to the shortest term allowed. |