on-internet
← Community

How to reliably and effectively check domain availability in batch with Node.js?

Stack Overflow ·

I tried using the DNSimple API in Node.js: const { DNSimple } = require("dnsimple"); const fs = require('fs') require('dotenv').config() const client = new DNSimple({ accessToken: process.env.DNSIMPLE_API_TOKEN, // baseUrl: "https://api.sandbox.dnsimple.com", }); start() // Check for domain availability async function start() { const words = ['foo', 'bar', 'baz'] const matches = [] const tlds = ['link', 'site', 'host', 'surf'] for (const tld of tlds) { for (const word of words) { const domain = `${word}.${tld}` const { data: availability } = await client.registrar.checkDomain(accountId, domain

Comments

Sign in or sign up to comment and upvote.

No comments yet.