{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"type":"markdown"},"seo":{"title":"Availability Checks","description":"Developer documentation for the WHMCS API — the","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"availability-checks","__idx":0},"children":["Availability Checks"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In WHMCS 7.1 and later, domain registrar modules can take control of Domain Availability checks and lookups."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["There are two supported functions: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CheckAvailability"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GetDomainSuggestions"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"check-availability","__idx":1},"children":["Check Availability"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The purpose of this function is to check if a domain is available for registration or transfer."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"input-parameters","__idx":2},"children":["Input Parameters"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In addition to the regular ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/domain-registrars/module-parameters/"},"children":["Common Module Parameters"]},", the CheckAvailability function is passed the following input parameters."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Variable"},"children":["Variable"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["searchTerm"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The search term provided by the end user"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["punyCodeSearchTerm"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["For an IDN domain, the puny code encoded search term"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["tldsToInclude"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["array"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["An array of TLDs/extensions to perform the availability check for"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["isIdnDomain"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["bool"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["If IDN Domains are enabled for this WHMCS installation"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["premiumEnabled"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["bool"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["If Premium Domains are enabled for this WHMCS installation"]}]}]}]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For performance reasons, we recommending performing the lookup for all requested extensions at the same time if the registrar supports it."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"return","__idx":3},"children":["Return"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The return of this function is expected to be an ArrayObject based collection of \\WHMCS\\Domains\\DomainLookup\\SearchResult results."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Each SearchResult object consists of an SLD and TLD, a status (available, registered, reserved) and optionally premium information such as Purchase Cost Price."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"code-sample","__idx":4},"children":["Code Sample"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Please refer to the example provided in the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/WHMCS/sample-registrar-module"},"children":["Sample Registrar Module available via GitHub"]}," for an example implementation of the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CheckAvailability"]}," function."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"get-domain-suggestions","__idx":5},"children":["Get Domain Suggestions"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The purpose of this function is to return a list of alternative domain registration suggestions based on the search term provided by an end user."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"input-parameters-1","__idx":6},"children":["Input Parameters"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In addition to the regular ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/domain-registrars/module-parameters/"},"children":["Common Module Parameters"]},", the GetDomainSuggestions function is passed the following input parameters."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Variable"},"children":["Variable"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["searchTerm"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The search term provided by the end user"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["punyCodeSearchTerm"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["For an IDN domain, the puny code encoded search term"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["tldsToInclude"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["array"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["An array of TLDs/extensions to perform the availability check for"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["isIdnDomain"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["bool"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["If IDN Domains are enabled for this WHMCS installation"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["premiumEnabled"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["bool"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["If Premium Domains are enabled for this WHMCS installation"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["suggestionSettings"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["array"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["An array of settings and their values as defined in the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DomainSuggestionOptions"]}," function"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"return-1","__idx":7},"children":["Return"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The return of this function is expected to be an ArrayObject based collection of \\WHMCS\\Domains\\DomainLookup\\SearchResult results."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["All domains returned by the suggestions function should be available for registration."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"code-sample-1","__idx":8},"children":["Code Sample"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Please refer to the example provided in the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/WHMCS/sample-registrar-module"},"children":["Sample Registrar Module available via GitHub"]}," for an example implementation of the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GetDomainSuggestions"]}," function."]}]},"headings":[{"value":"Availability Checks","id":"availability-checks","depth":1},{"value":"Check Availability","id":"check-availability","depth":2},{"value":"Input Parameters","id":"input-parameters","depth":3},{"value":"Return","id":"return","depth":3},{"value":"Code Sample","id":"code-sample","depth":3},{"value":"Get Domain Suggestions","id":"get-domain-suggestions","depth":2},{"value":"Input Parameters","id":"input-parameters-1","depth":3},{"value":"Return","id":"return-1","depth":3},{"value":"Code Sample","id":"code-sample-1","depth":3}],"frontmatter":{"title":"Availability Checks","seo":{"title":"Availability Checks"}},"lastModified":"2026-08-03T17:00:42.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/domain-registrars/availability-checks","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}