dom
An easy-to-use command line utility for checking domain name availability using Domainr's JSON API.
Setup requires two things:
- Installing dom
- Obtaining an API key
Installation
The simplest method is to install the package through pip
by running:
pip install dom
Alternatively, you can install from source:
-
Clone the repo:
$ git clone [email protected]:zachwill/dom.git
$ cd dom
-
Run the following command to install:
python setup.py install
Get an API key for Domainr
Due to abuse of their API, Domainr now requires an API key for each user. This key can be obtained through one of the following ways:
- Get a Rapidapi Domainr API key from Rapidapi
Note: While it is free up to 10,000 calls/mo., you are required to submit a valid credit card to cover
any requests over the free limit.
- You can use something like Privacy.com to create a credit temporary card. I've been told that some banks offer a similar feature as well.
- Contact Domainr at
[email protected]
to get a personal use client ID, as detailed here
Once you have obtained one of the two types of keys, insert either the Rapidapi API key or the Client ID into your local environment:
$ export DOMAINR_RAPIDAPI_KEY={your-rapidapi-key}
or
$ export DOMAINR_CLIENT_ID={your-client-id}
You can do this manually everytime before running dom, or you can search for how to do this on login. Digital Ocean has an excellent guide here: How To Read and Set Environmental and Shell Variables on a Linux VPS.
Note that in the event that both keys are present, dom will default to using the Rapidapi Key.
Optional Flags
The optional --ascii
flag can be used to look up domain availability without
the use of the Unicode characters.
dom --ascii zachwill
X zachwill.com
A zachwill.net
A zachwill.org
A zachwill.co
X za.ch
X z.ac
The --available
flag only shows domain names that are currently available:
dom --available zachwill
β zachwill.net
β zachwill.org
β zachwill.co
β zachwill.io
β zachwill.me
The --no-suggest
flag only check the exact domain names that are in query:
dom --no-suggest zachwill.com
β zachwill.com
And, the --tld
flag only shows top-level domains:
dom --tld zachwill
β zachwill.com
β zachwill.net
β zachwill.org
Deploying
You won't need to worry about this, but since the Python upload
command is so obtuse, I'm going to keep it here:
python setup.py sdist bdist_egg upload