Domain availability formula for Google Sheets

Domain availability formula for Google Sheets

A great name is a key step toward establishing your startup business or personal website.

You may begin with compiling a list of unique candidate names and perhaps check for the availability of your desired domain names.

Google Sheets allows you to create your own custom formulas via their Apps Script feature which you can use to automatically lookup domain names.

Here’s how:

1. Select the Tools menu and choose Script editor.

2. Replace the contents with the following JavaScript domain lookup function and save the file. This custom formula makes an API call that determines whether or not your domain is available. Feel free to change the top level domain (TLD) to suite your needs.

function checkDomain(input) {
    var domain = input.toLowerCase().trim()+".com";
    var res = UrlFetchApp.fetch(""+ domain);
    var content = res.getContentText();
    var json = JSON.parse(content);
    if( == true){
      return 'Available ('+domain+')';
    }else if( == false){
      return 'Taken ('+domain+')';
      return 'Unknown';
     return '';    

3. Go back to your spreadsheet and type in the new custom formula we just created.
For example:


You can also add conditional formatting to highlight the available and taken domain names.