Learn how to integrate sheets with a TLD Availability API.
Members-only tutorial
Watch the video and get the practice sheet with membership.
About this Tutorial
Learn how to integrate sheets with a TLD Availability API.
Sheet Resources
Featured Formulas
Video Transcript
<div>0:01 So we've created a cool tool inside of Google Sheets called a Domain Availability Checker. So I can type in any word here in B2 and it's going to check all of these .co.com, .org, .net all at the same time and it's going to tell me if it's active or inactive.<br>0:13 If it's active, that means it's taken, someone else has it. But if it's undelegated inactive, that means I can buy it.<br>0:18 So I can actually go and buy Spreadsheety.co. So let's check that out. Let's go to like name.com, domain search and we'll look and see is this for real?<br>0:28 Is this actually for sale?
And yeah, $16 I can get Spreadsheety.co. For Spreadsheety.com though, let's check that out. Let's go to the.com and check it out and it is not available.<br>0:44 It's taken. So this is working. And what are we using in the back end? We're using one thing essentially. Actually, Domainer.<br>0:52 It's a domain availability API. And we're using RapidAPI for the API key. But uhm, that's all you have to know.<br>1:01 It's two things. RapidAPI to get the API key. But we're using Domainer, DomainR to check it out.
And I'll show you in this video the Apps Script Learn how to use Apps Script to enhance your Google Sheets functionality. Opens in new tab that we use.<br>1:12 As a member of BetterSheets, you can grab this sheet down below for free. What's cool about it though is that we have all of these things.<br>1:20 And actually I'll edit the Apps Script Learn how to use Apps Script to enhance your Google Sheets functionality. Opens in new tab a little bit so you know what's going on. Uhm, but I think it's a really cool tool.<br>1:27 Why? It's because I have listed every single TLD here.
And now if you click in the D column, like a com, what I call common one.<br>1:36 It's the ones that I want to search for all the time and so I've selected these.com.co out of all of these.<br>1:45 But we can actually check all of them. So if we want to check .aaa, click here and it will. Load it ah and it will check it.<br>1:54 If we want to check .accountant. Spreadsheety.accountant. Let's see. Delegate inactivity means it's available. Again, maybe I can just look for spreadsheet Discover the basics of working with spreadsheets in Google Sheets. Opens in new tab .com.<br>2:05 Of course it's taken. Spreadsheet Discover the basics of working with spreadsheets in Google Sheets. Opens in new tab .co. Probably taken as well.. Spreadsheet Discover the basics of working with spreadsheets in Google Sheets. Opens in new tab .tv is available.
Spreadsheet Discover the basics of working with spreadsheets in Google Sheets. Opens in new tab .vc is available. And let's see. Spreadsheet Discover the basics of working with spreadsheets in Google Sheets. Opens in new tab .accountant. Undelegated inactive premium.<br>2:18 Let's see what that means. Let's go over to here. Search for spreadsheet Discover the basics of working with spreadsheets in Google Sheets. Opens in new tab .accountant. Okay, so it is available, but it's a little bit high priced.<br>2:27 That's what it means, I think. 625 bucks. So it means it's premium, so we have to pay a little bit extra for it.<br>2:36 Okay, so how did I set all of this up? And how does this sheet work, you might be wondering.
I will get to the Apps Script Learn how to use Apps Script to enhance your Google Sheets functionality. Opens in new tab eventually, but let me look at a few of the things we have available.<br>2:45 We have right here. First, we're using B2 to just put a word in. And what we want to do is add all of these TLDs.<br>2:51 Again, I have all of the TLDs available here on the TLDs page. All the domains are in there. In the A column.<br>2:57 And so what we're doing here is we're saying if B2 is blank, don't do anything. Just, if, if it's, there's nothing, look, we're gone.<br>3:05 Nothing's there.
But if there is something there, so we're using if is blank, we're using an array formula Understand how to use ARRAYFORMULA for efficient data processing. Opens in new tab here, and we're just literally using the ampersand to concatenate Find out how to concatenate strings in Google Sheets. Opens in new tab what's in B2 and all of the TLDs A2 colon A.<br>3:18 So we're using an array formula Understand how to use ARRAYFORMULA for efficient data processing. Opens in new tab here so we only have to have one formula Get familiar with the syntax rules for Google Sheets formulas. Opens in new tab in all of this, and we get all of these domains.<br>3:26 Then in the C column we're just using if is blank again, and if there's a 17, meaning there's a check mark, we're going to use the formula Get familiar with the syntax rules for Google Sheets formulas. Opens in new tab check which is a function Explore the different functions available in Google Sheets. Opens in new tab we've created ourselves, and I'll show you again, we'll get to that eventually.<br>3:44 Over here we're doing the exact same thing, if is blank, B5, and then each one of these B5 through B14, I've selected a few of these, and I'm using the if is blank here, and I'm filtering all of the TLDs where Learn how to use the QUERY function with WHERE clauses. Opens in new tab D is true, DLDs over here, D that's the this checkbox Understand how to use checkboxes in Google Sheets for data selection. Opens in new tab on, so I'm using these checkbox, checkboxes<br>4:03 to say any of these check, put it in the list, if it's not check, don't put it in list.
So now we have, we've been able to take a huge set of data Dive into data management techniques in Google Sheets. Opens in new tab , right, all of these TLDs, there are a lot of them, fifty eighteen, hundred and ninety one domains, and say actually of all of these I just want to feel like<br>4:23 let's say we want to add .xyz to the next we're going to get a ref error Troubleshoot common errors encountered in Google Sheets. Opens in new tab so we just need to add another lah, insert another row, we can add another row here.<br>4:31 We need . . . to copy paste this down and we've added another row. Cool, super easy, marked price transferable, let's see.<br>4:38 What else can we do?
We can also search for, actually we'll keep it as searched. So yeah we can add more of the common domains and we want to start, we know every word we put in here, we want to search all the time.<br>4:48 That's why I call them common domains. But all domains we don't want to search through fifteen hundred things every single time we write in a new word.<br>4:55 So this is a really great way using, if is blank, using check boxes to say hey, I'm going to use of these fifteen hundred, some of these all of these.<br>5:04 The time, but most of them I want available if I do want it.
I don't want to have to go over to the TLD page, get a TLD, add it to the list each and every time I want to use it.<br>5:12 Oh well I'll just go use this check box and this if is blank. And also an if, right? We're using if as well.<br>5:19 Not just if is blank. So if it's blank, don't show it. But if there is something in the B column and in the A column, A44 here, we'll do that.<br>5:29 So go ahead and check out the sheet and now we're going to go into the apscript.
So the apscript here doesn't have any API key because I've moved the API key over to API key and I'm going to make the change now.<br>5:42 Umm but I'll make the change as we walk through this function Explore the different functions available in Google Sheets. Opens in new tab . So we're function Explore the different functions available in Google Sheets. Opens in new tab check domain and this domain, this word domain is literally any word we want to use umm whatever's inside inside.<br>5:52 Of the function Explore the different functions available in Google Sheets. Opens in new tab on the spreadsheet Discover the basics of working with spreadsheets in Google Sheets. Opens in new tab , we're using the variable domain for in our case. We're going to create the URL here.<br>6:01 This URL is actually from umm a p uuh rapid API.
So in rapid API documentation, I actually copied all of this.<br>6:12 This URL got the options get, uhh the headers Learn about the importance of headers in organizing your data. Opens in new tab are just the rapid API key and the host. This is all from rapid API.<br>6:22 So read through the documentation. All we need here is our uhm key. So I'm gonna write API key right here and we're gonna add up above options in below URLs a const API key and it's gonna be equal to spreadsheet Discover the basics of working with spreadsheets in Google Sheets. Opens in new tab app.get active spreadsheet Understand how to reference the active spreadsheet in Apps Script. Opens in new tab .<br>6:41 Great show. We're gonna get sheet by name. We're gonna get the API key sheet with the name API key.
We're gonna get range Get to know how to work with ranges in Google Sheets. Opens in new tab and we know it's an A1 and so we're just gonna save it.<br>6:52 And our hope is as we save this as this API key now gets changed. It was from, it was text here, but now it's gonna be in the sheet API key.<br>7:01 Nothing will change. If we did this correctly, nothing will change. Umm. This is the option all of the variables that we need.<br>7:10 And what we're gonna do here in our function Explore the different functions available in Google Sheets. Opens in new tab is gonna try to get a response from urlfetchapp Discover how to use URL Fetch App in Apps Script for API calls. Opens in new tab .fetch.
We're gonna get the URL, which is up here, just that URL plus the domain, the main and text on the back end, and the options.<br>7:24 And the options are just saying, hey, here's the key, here's the host get from get method, not post we'll get that response, and we'll always do response dot get content text when we get a use urlfetchapp Discover how to use URL Fetch App in Apps Script for API calls. Opens in new tab , that's what we get the response.<br>7:39 We're gonna change it into JSON, so we're gonna parse it as if it were JSON because we know from rapid API, hey the response is always gonna be JSON at J-S-O-N.<br>7:48 Then once we get that JSON, we're gonna do dot status and bracket zero, so we're getting the first thing that names status, and then we're gonna do the status of that.<br>7:58 And return status.
If the there's an error Troubleshoot common errors encountered in Google Sheets. Opens in new tab , we're gonna get an error Troubleshoot common errors encountered in Google Sheets. Opens in new tab here. We're gonna just try what's above. If we get an error Troubleshoot common errors encountered in Google Sheets. Opens in new tab , it's gonna give us in the console error Troubleshoot common errors encountered in Google Sheets. Opens in new tab .<br>8:07 We can also add log. So what we could do here, if we wanted to, was return error Troubleshoot common errors encountered in Google Sheets. Opens in new tab . I think Thanks watching! That might be better, so we can, if you're testing this out and you're like hey, this isn't working, why wouldn't it work?<br>8:22 Umm. We're going to have a problem.
Okay, somehow there was uhh the curly bracket at the end was deleted umm but we just fixed it, just added it back in.<br>8:37 So now we're going to return the error Troubleshoot common errors encountered in Google Sheets. Opens in new tab umm if there is an error Troubleshoot common errors encountered in Google Sheets. Opens in new tab but umm there is no error Troubleshoot common errors encountered in Google Sheets. Opens in new tab now.<br>8:48 Ah, okay here is what we did get and we do have a problem. Instead of get range Get to know how to work with ranges in Google Sheets. Opens in new tab we got to not instead of, in addition we have to do get value.<br>8:55 We're just getting the range Get to know how to work with ranges in Google Sheets. Opens in new tab here.
So we're getting the value, oh my I do that all the time on video umm alright let's save it and see what's going on and yes now we're going we have our availability right here.<br>9:07 Active and inactive. Nothing changed because we were able to grab the value of that range Get to know how to work with ranges in Google Sheets. Opens in new tab . So make sure you do that.<br>9:13 Alright umm yeah again down below here for better sheets members are is this sheet? Get this code if you want it.<br>9:22 Use this domain availability checker as you wish.
You have all the TLDs with an API key that you're gonna have to get your own API key.<br>9:30 By the time I umm share Learn how to share your Google Sheets with others. Opens in new tab this this video and sheet I'll have destroyed it. I'm not Thanks watching! This API key that's on here but yeah just an A1 put that API key in there.<br>9:40 Yours get it from domain R. That's over here umm domain R.com but you'll have to get it through rapid API API.<br>9:50 It's actually free! I'm not sure if I'm mentioned that earlier but it is absolutely free. Enjoy. Umm feel free to email me any questions and issues you have with this.<br>9:59 Thanks so much.</div>
Courses
Add Icons To Your Sheets With a Domain Name
00:04:21
Automatic Screenshots in Apps Script
Add Tasks to Google Tasks From Google Sheets
Tweet From a Sheet
Convert Google Sheets into a REST API
Expense Tracker Template with Data Entry Form Inside Sheets
Build a Book Recommender with AI in Google Sheets
Build a License Key Generator and API in 20 Minutes
Create Your Own API by Deploying a Web App
Access Free API's with Google Sheets
Use Random Quote API in Google Sheets
OpenSea Data Inside Sheets
Tag Emails From A List of Members in Google Sheets
Spreadsheet Automation 101 Lesson 4: Access APIs Introduction
How to Validate Email Addresses
Build Your Own Free Domain Availability Checker
Build a Job Status Checker API in 15 Minutes
Spreadsheet Automation 101 Lesson 4: UrlFetchApp
Spreadsheet Automation 101 Lesson 4: OmdbAPI get ApiKey, get Data in URL
Spreadsheet Automation 101 Lesson 4: OmdbAPI Parameter Picker
Spreadsheet Automation 101 Lesson 4: OmdbAPI get data in Apps Script
Spreadsheet Automation 101 Lesson 4: JSON (beautifier) and OmdbAPI parameters
Quickstart Tutorial OpenAI API in Google Sheets
Shaman: AI Blog Writer
ChatGPT Clone in Google Sheets Part 1
ChatGPT Clone in Google Sheets Part 2
How To Set Up Stripe Webhook to Google Sheets with Google Script
00:22:10
Create Instant QR Codes
Access the Dictionary API to get Definitions for Words in Google Sheets