API documentation Web hosting accessible to everyone Visit LWS

Get all available TLDs

GET https://api.lws.net/v1/domain/0/tlds

operationIdgetDomainTlds

Get a list of all available TLDs, their pricing information and other parameters. This contains all TLDs that can be bought through our services.

Responses

200

TLDs list retrieved as an associative array.

{
  "code": 200,
  "info": "All TLDs fetched",
  "data": [
    {
      "tld": ".fr",
      "transfer_possible": "oui",
      "local_country": "oui",
      "restore_possible": "oui",
      "price_purchase": "6.99",
      "price_purchase_offer": "6.99",
      "price_renew": "8.99",
      "price_restore": "19.99",
      "price_transfer": "4.99",
      "length": "3-63",
      "minimum_period": "1"
    }
  ]
}
Response fields 14 Extends ApiEnvelope
  • code integer

    Application-level status/error code (not always equal to the HTTP status code)

    Example: 200

  • info string

    Human-readable message describing the result of the request

    Example: All TLDs fetched

  • data object[]
  • tld string

    Top-Level Domain

    Example: .fr

  • transfer_possible string

    Whether the TLD can be transferred to another registrar. 'oui' means transfer is possible, 'non' means transfer is prohibited.

    Example: oui

  • local_country string

    Whether the TLD is reserved for a specific country. 'oui' means the TLD is reserved for a specific country, 'non' means it is not reserved.

    Example: oui

  • restore_possible string

    Whether the TLD can be restored after expiration. 'oui' means restoration is possible, 'non' means restoration is prohibited.

    Example: oui

  • price_purchase string

    Price to purchase the TLD

    Example: 6.99

  • price_purchase_offer string

    Price to purchase the TLD with an offer

    Example: 6.99

  • price_renew string

    Price to renew the TLD

    Example: 8.99

  • price_restore string

    Price to restore the TLD after expiration

    Example: 19.99

  • price_transfer string

    Price to transfer the TLD to another registrar

    Example: 4.99

  • length string

    Length of the TLD name. Vary between each TLD but has a maximum of 63 characters

    Example: 3-63

  • minimum_period string

    Minimum period to purchase the TLD (in year)

    Example: 1

404

TLDs not found

{
  "code": 404,
  "info": "No TLDs found"
}
Response fields 2 Extends ApiEnvelope
  • code integer

    Application-level status/error code (not always equal to the HTTP status code)

    Example: 404

  • info string

    Human-readable message describing the result of the request

    Example: No TLDs found

500

Internal Server Error

{
  "code": 500,
  "info": "Internal Server Error",
  "data": "string"
}
Response fields 3 Extends ApiEnvelope
  • code integer

    Application-level status/error code (not always equal to the HTTP status code)

    Example: 500

  • info string

    Human-readable message describing the result of the request

    Example: Internal Server Error

  • data string

    Detailed message about the error

502

Bad Gateway

{
  "code": 502,
  "info": "Invalid response from upstream server",
  "data": []
}
Response fields 3 Extends ApiEnvelope
  • code integer

    Application-level status/error code (not always equal to the HTTP status code)

    Example: 502

  • info string

    Human-readable message describing the result of the request

    Example: Invalid response from upstream server

  • data object

    Invalid response returned by the server

401

Unauthorized - Missing authentication headers

{
  "code": 401,
  "info": "Unauthorized access to the API. Please specify X-Auth-Pass and X-Auth-Login to proceed."
}
Response fields 2
  • code integer

    Example: 401

  • info string

    Example: Unauthorized access to the API. Please specify X-Auth-Pass and X-Auth-Login to proceed.

429

Rate limit exceeded

{
  "code": 429,
  "info": "Rate limit exceeded. Please try again later."
}
Response fields 2
  • code integer

    Example: 429

  • info string

    Example: Rate limit exceeded. Please try again later.

Show the code examples and the test console
GET /domain/0/tlds
LWS_AUTH_LOGIN='…'LWS_AUTH_PASS='…'curl -X GET \  "https://api.lws.net/v1/domain/0/tlds" \  -H "X-Auth-Login: $LWS_AUTH_LOGIN" \  -H "X-Auth-Pass: $LWS_AUTH_PASS"
$lwsAuthLogin = '…';$lwsAuthPass = '…';$ch = curl_init("https://api.lws.net/v1/domain/0/tlds");curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);curl_setopt($ch, CURLOPT_HTTPHEADER, [    "X-Auth-Login: " . $lwsAuthLogin,    "X-Auth-Pass: " . $lwsAuthPass,]);$res = json_decode(curl_exec($ch), true);
import requestsLWS_AUTH_LOGIN = "…"LWS_AUTH_PASS = "…"res = requests.get(    "https://api.lws.net/v1/domain/0/tlds",    headers={        "X-Auth-Login": LWS_AUTH_LOGIN,        "X-Auth-Pass": LWS_AUTH_PASS,    },)print(res.json())
const LWS_AUTH_LOGIN = "…";const LWS_AUTH_PASS = "…";const res = await fetch("https://api.lws.net/v1/domain/0/tlds", {  method: "GET",  headers: {    "X-Auth-Login": LWS_AUTH_LOGIN,    "X-Auth-Pass": LWS_AUTH_PASS,  },});const data = await res.json();
lwsAuthLogin := "…"lwsAuthPass := "…"req, _ := http.NewRequest("GET",    "https://api.lws.net/v1/domain/0/tlds", nil)req.Header.Set("X-Auth-Login", lwsAuthLogin)req.Header.Set("X-Auth-Pass", lwsAuthPass)resp, err := http.DefaultClient.Do(req)