# Check whether a domain is available for registration

This function checks whether a specific domain name is available for registration through the configured domain store.

The system caches the results for up to two minutes per domain. Use the use_cache=0 option to bypass the cache and force a live request.

Note:

This function requires the domain_recommendation feature.

Endpoint: GET /DomainRecommendations/domain_availability
Version: 11.138.0.10
Security: BasicAuth

## Query parameters:

  - `domain` (string, required)
    The fully-qualified domain name (FQDN) to check for availability.

Note:

This value must include the TLD (for example, mybusiness.com).
    Example: "mybusiness.com"

  - `use_cache` (integer)
    Whether to use the local response cache.

* 1 — Use the cache (default). The system caches the results for up to two minutes.
* 0 — Bypass the cache and make a live request to the store.
    Enum: 1, 0

## Response 200 fields (application/json):

  - `apiversion` (integer)
    The version of the API.
    Example: 3

  - `func` (string)
    The name of the method called.
    Example: "domain_availability"

  - `module` (string)
    The name of the module called.
    Example: "DomainRecommendations"

  - `result` (object)

  - `result.data` (object,null)
    An object containing the domain availability result
from the configured domain store.

  - `result.data.domain_name` (string)
    The fully-qualified domain name (FQDN) that the function checked.
    Example: "mybusiness.com"

  - `result.data.group` (string,null)
    The domain group, if applicable.

  - `result.data.idn_domain_name` (string)
    The internationalized domain name (IDN) of the checked domain.
    Example: "mybusiness.com"

  - `result.data.idn_sld` (string)
    The internationalized second-level domain (SLD) portion of the checked domain.
    Example: "mybusiness"

  - `result.data.is_domain_available` (boolean)
    Whether the domain is available for
registration.

* true — Available.
* false — Not available.
    Example: true

  - `result.data.is_premium` (boolean)
    Whether the domain is a premium domain with
special pricing.

* true — The domain is a premium domain.
* false — The domain is not a premium domain.

  - `result.data.is_tld_available` (boolean)
    Whether the TLD is available for registration
through the configured store.

* true — The TLD is available.
* false — The TLD is not available.
    Example: true

  - `result.data.premium_cost_pricing` (object,null)
    The pricing structure for the premium domain, if applicable.

  - `result.data.pricing` (array)
    An array of pricing options for each
registration period (in years).

  - `result.data.pricing.period` (integer)
    The registration period in years.
    Example: 1

  - `result.data.pricing.register` (object,null)
    The registration price for this period.

  - `result.data.pricing.register.code` (string)
    The ISO 4217 currency code.
    Example: "USD"

  - `result.data.pricing.register.display_value` (string)
    The formatted price string including prefix and suffix.
    Example: "$10.74 USD"

  - `result.data.pricing.register.prefix` (string)
    The currency symbol that appears before the value.
    Example: "$"

  - `result.data.pricing.register.suffix` (string)
    The currency label that appears after the value.
    Example: " USD"

  - `result.data.pricing.register.value` (string)
    The numeric price as a decimal string.
    Example: "10.74"

  - `result.data.pricing.renew` (object,null)
    The renewal price for this period.

  - `result.data.pricing.renew.code` (string)
    The ISO 4217 currency code.
    Example: "USD"

  - `result.data.pricing.renew.display_value` (string)
    The formatted price string including prefix and suffix.
    Example: "$10.74 USD"

  - `result.data.pricing.renew.prefix` (string)
    The currency symbol that appears before the value.
    Example: "$"

  - `result.data.pricing.renew.suffix` (string)
    The currency label that appears after the value.
    Example: " USD"

  - `result.data.pricing.renew.value` (string)
    The numeric price as a decimal string.
    Example: "10.74"

  - `result.data.pricing.transfer` (object,null)
    The transfer price for this period.

  - `result.data.pricing.transfer.code` (string)
    The ISO 4217 currency code.
    Example: "USD"

  - `result.data.pricing.transfer.display_value` (string)
    The formatted price string including prefix and suffix.
    Example: "$11.40 USD"

  - `result.data.pricing.transfer.prefix` (string)
    The currency symbol that appears before the value.
    Example: "$"

  - `result.data.pricing.transfer.suffix` (string)
    The currency label that appears after the value.
    Example: " USD"

  - `result.data.pricing.transfer.value` (string)
    The numeric price as a decimal string.
    Example: "11.40"

  - `result.data.shortest_period` (object)
    Pricing for a single registration period.

  - `result.data.shortest_period.period` (integer)
    The registration period in years.
    Example: 1

  - `result.data.shortest_period.register` (object,null)
    The registration price for this period.

  - `result.data.shortest_period.register.code` (string)
    The ISO 4217 currency code.
    Example: "USD"

  - `result.data.shortest_period.register.display_value` (string)
    The formatted price string including prefix and suffix.
    Example: "$10.74 USD"

  - `result.data.shortest_period.register.prefix` (string)
    The currency symbol that appears before the value.
    Example: "$"

  - `result.data.shortest_period.register.suffix` (string)
    The currency label that appears after the value.
    Example: " USD"

  - `result.data.shortest_period.register.value` (string)
    The numeric price as a decimal string.
    Example: "10.74"

  - `result.data.shortest_period.renew` (object,null)
    The renewal price for this period.

  - `result.data.shortest_period.renew.code` (string)
    The ISO 4217 currency code.
    Example: "USD"

  - `result.data.shortest_period.renew.display_value` (string)
    The formatted price string including prefix and suffix.
    Example: "$10.74 USD"

  - `result.data.shortest_period.renew.prefix` (string)
    The currency symbol that appears before the value.
    Example: "$"

  - `result.data.shortest_period.renew.suffix` (string)
    The currency label that appears after the value.
    Example: " USD"

  - `result.data.shortest_period.renew.value` (string)
    The numeric price as a decimal string.
    Example: "10.74"

  - `result.data.shortest_period.transfer` (object,null)
    The transfer price for this period.

  - `result.data.shortest_period.transfer.code` (string)
    The ISO 4217 currency code.
    Example: "USD"

  - `result.data.shortest_period.transfer.display_value` (string)
    The formatted price string including prefix and suffix.
    Example: "$11.40 USD"

  - `result.data.shortest_period.transfer.prefix` (string)
    The currency symbol that appears before the value.
    Example: "$"

  - `result.data.shortest_period.transfer.suffix` (string)
    The currency label that appears after the value.
    Example: " USD"

  - `result.data.shortest_period.transfer.value` (string)
    The numeric price as a decimal string.
    Example: "11.40"

  - `result.data.sld` (string)
    The second-level domain (SLD) portion of the checked domain.
    Example: "mybusiness"

  - `result.data.status` (string)
    A string describing the availability status of the domain.
    Example: "available for registration"

  - `result.data.tld` (string)
    The top-level domain (TLD) portion of the checked domain.
    Example: "com"

  - `result.errors` (array,null)
    List of errors if the API failed.

  - `result.messages` (array,null)
    List of messages generated by the API.

  - `result.metadata` (object)

  - `result.metadata.transformed` (integer)
    Post-processing may have transformed the data.
    Enum: 1

  - `result.status` (integer)
    * 1 — Success.
* 0 — Failed. Check the errors field for more details.
    Enum: 0, 1

  - `result.warnings` (array,null)
    List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running an API.


