lookup (domain)
Determines the availability of a specified domain name.
Request parameters
Standard request parameters
- action = lookup
- object = domain
- registrant_ip = valid IP address of the registrant (optional)
Request attributes
Parameters within the attributes associative array are described below:
Parameter | Obligation | Definition/Value |
---|---|---|
domain | Required | The domain name to be queried. |
no_cache | Optional | In order to obtain results quickly, the default for the lookup command is to check the local OpenSRS cache to determine domain name availability. If you specify no_cache = 1, instead of checking the cache, the lookup command queries the applicable registry to determine domain name availability. Note: Setting no_cache to 1 increases the amount of time it takes to get results. |
Response parameters
Standard response parameters
- action = reply
- object = domain
- is_success = Boolean indicating success or failure of the request.
- response_code = Response code indicating outcome of the request.
- response_text = Message describing the outcome of the request.
Note
If the domain being queried is taken (response_code = 211), is_success is set to 1 because the query was successful. Therefore, be sure to check the response_code and response_text when reading the reply.
Response attributes
If the request is successful, the attributes associative array may include the following:
Parameter | Obligation | Definition/Value |
---|---|---|
status | Always returned | Whether the domain is available or taken. |
price_status | Always returned | The pricing status. Undef—Non .TV domains Fixed—Price is fixed for .TV domains. |
has_claim | Returned for new TLDs during the claim period | Indicates whether the domain name has a matching mark registered at the Trademark Clearinghouse (TMCH). 0—No matching marks exist at the TMCH. 1—A mark is registered at the TMCH that matches the domain name. |
email_available | Returned for .NAME domains | Indicates whether a forwarding email is available or not. Applies to .NAME domains only. 0—No forwarding email available 1—Forwarding email available |
noservice | Returned for .NAME domains | Indicates Registry Agent availability. If RA is available, noservice does not appear in response. 1—Supplier unavailable Note: when noservice = 1, is_success = 0. |
Registry Premium Domain
Note
Querying a registry premium domain will always generate a taken response if the reseller has not enabled the registry premium tier to which the domain belongs.
If the request is successful and the domain is a registry premium domain, the attributes associative array will also include:
Parameter | Obligation | Definition/Value |
---|---|---|
reason | Always returned | Indicates that the domain is registry premium. Value if returned: Premium Name. |
Examples
Standard lookup
<?xml version='1.0' encoding="UTF-8" standalone="no" ?>
<!DOCTYPE OPS_envelope SYSTEM "ops.dtd">
<OPS_envelope>
<header>
<version>0.9</version>
</header>
<body>
<data_block>
<dt_assoc>
<item key="protocol">XCP</item>
<item key="object">DOMAIN</item>
<item key="action">LOOKUP</item>
<item key="attributes">
<dt_assoc>
<item key="domain">example.com</item>
<item key="no_cache">1</item>
</dt_assoc>
</item>
</dt_assoc>
</data_block>
</body>
</OPS_envelope>
<?xml version='1.0' encoding="UTF-8" standalone="no" ?>
<!DOCTYPE OPS_envelope SYSTEM "ops.dtd">
<OPS_envelope>
<header>
<version>0.9</version>
</header>
<body>
<data_block>
<dt_assoc>
<item key="protocol">XCP</item>
<item key="object">DOMAIN</item>
<item key="response_text">Domain available</item>
<item key="action">REPLY</item>
<item key="attributes">
<dt_assoc>
<item key="price_status">undef</item>
<item key="email_available">undef</item>
<item key="status">available</item>
</dt_assoc>
</item>
<item key="response_code">210</item>
<item key="is_success">1</item>
</dt_assoc>
</data_block>
</body>
</OPS_envelope>
<?xml version='1.0' encoding="UTF-8" standalone="no" ?>
<!DOCTYPE OPS_envelope SYSTEM "ops.dtd">
<OPS_envelope>
<header>
<version>0.9</version>
</header>
<body>
<data_block>
<dt_assoc>
<item key="protocol">XCP</item>
<item key="object">DOMAIN</item>
<item key="response_text">Domain taken</item>
<item key="action">REPLY</item>
<item key="attributes">
<dt_assoc>
<item key="price_status">undef</item>
<item key="email_available">undef</item>
<item key="status">taken</item>
</dt_assoc>
</item>
<item key="response_code">211</item>
<item key="is_success">1</item>
</dt_assoc>
</data_block>
</body>
</OPS_envelope>
New TLD lookup during the claims period.
<?xml version='1.0' encoding="UTF-8" standalone="no" ?>
<!DOCTYPE OPS_envelope SYSTEM "ops.dtd">
<OPS_envelope>
<header>
<version>0.9</version>
</header>
<body>
<data_block>
<dt_assoc>
<item key="protocol">XCP</item>
<item key="object">DOMAIN</item>
<item key="action">LOOKUP</item>
<item key="attributes">
<dt_assoc>
<item key="domain">example.guru</item>
</dt_assoc>
</item>
</dt_assoc>
</data_block>
</body>
</OPS_envelope>
<?xml version='1.0' encoding="UTF-8" standalone="no" ?>
<!DOCTYPE OPS_envelope SYSTEM "ops.dtd">
<OPS_envelope>
<header>
<version>0.9</version>
</header>
<body>
<data_block>
<dt_assoc>
<item key="protocol">XCP</item>
<item key="object">DOMAIN</item>
<item key="response_text">Domain available</item>
<item key="action">REPLY</item>
<item key="attributes">
<dt_assoc>
<item key="status">available</item>
<item key="has_claim">1</item>
</dt_assoc>
</item>
<item key="response_code">210</item>
<item key="is_success">1</item>
</dt_assoc>
</data_block>
</body>
</OPS_envelope>
Premium domain lookup
<?xml version='1.0' encoding="UTF-8" standalone="no" ?>
<!DOCTYPE OPS_envelope SYSTEM "ops.dtd">
<OPS_envelope>
<header>
<version>0.9</version>
</header>
<body>
<data_block>
<dt_assoc>
<item key="protocol">XCP</item>
<item key="object">DOMAIN</item>
<item key="action">LOOKUP</item>
<item key="attributes">
<dt_assoc>
<item key="domain">ddd.bike</item>
</dt_assoc>
</item>
</dt_assoc>
</data_block>
</body>
</OPS_envelope>
<?xml version='1.0' encoding="UTF-8" standalone="no" ?>
<!DOCTYPE OPS_envelope SYSTEM "ops.dtd">
<OPS_envelope>
<header>
<version>0.9</version>
</header>
<body>
<data_block>
<dt_assoc>
<item key="protocol">XCP</item>
<item key="object">DOMAIN</item>
<item key="response_text">Domain available</item>
<item key="action">REPLY</item>
<item key="attributes">
<dt_assoc>
<item key="status">available</item>
<item key="reason">Premium Name</item>
</dt_assoc>
</item>
<item key="response_code">210</item>
<item key="is_success">1</item>
</dt_assoc>
</data_block>
</body>
</OPS_envelope>
<?xml version='1.0' encoding="UTF-8" standalone="no" ?>
<!DOCTYPE OPS_envelope SYSTEM "ops.dtd">
<OPS_envelope>
<header>
<version>0.9</version>
</header>
<body>
<data_block>
<dt_assoc>
<item key="protocol">XCP</item>
<item key="object">DOMAIN</item>
<item key="response_text">Domain taken</item>
<item key="action">REPLY</item>
<item key="attributes">
<dt_assoc>
<item key="status">taken</item>
<item key="reason">Premium Name</item>
</dt_assoc>
</item>
<item key="response_code">211</item>
<item key="is_success">1</item>
</dt_assoc>
</data_block>
</body>
</OPS_envelope>
Updated over 1 year ago