Business Services for Lookup
GPL-3.0 License
Developes are welcome to extend support to integrate their preferred Domain Registrar
Lookup.Services
is a Node library which provides a high-level API to check the availability of the internet domain and price across supported registrars.
To use Lookup.Services
in your project, run:
npm i @valexe-technologies/lookup.services
or
yarn add @valexe-technologies/lookup.services
Note: When you install Lookup.Services
, it downloads a recent version of Puppeteer along with Chromium that is guaranteed to work with the API. To skip the download of Chromium, download into another path, or download a different browser, see Puppeteer Environment variables.
Lookup.Services
provides below listed APIs:
Currencies
Registrars
Available
or notPrice
of the domainCurrencies
Save file as index.js
const lookupServices = require('@valexe-technologies/lookup.services');
(async () => {
const supportedCurrencies = await lookupServices.SUPPORTED_CURRENCIES;
console.log(supportedCurrencies);
})();
Execute script on the command line
node index.js
It will print list of supported Currencies
as JSON object.
[
{
"code": "INR",
"symbol": "",
"name": "Indian Rupee"
},
{
"code": "USD",
"symbol": "$",
"name": "United States of America"
}
]
Registrars
Save file as index.js
const lookupServices = require('@valexe-technologies/lookup.services');
(async () => {
const domainServices = new lookupServices.DomainServices();
await domainServices
.init(
false // headless 'false' to show Chromium instance
);
const supportedRegistrars = await domainServices
.domainRegistrarsByCurrency(
'INR' // one of the Supported "Currency Code"
);
console.log(supportedRegistrars);
})();
Execute script on the command line
node index.js
It will print list of supported Registrars
as JSON object.
[
{
"name": "GoDaddy",
"baseUrl": "https://in.godaddy.com",
"currencyCodes": [ "INR", "USD" ],
"features": [ "Basic DNS" ]
},
{
"name": "BigRock",
"baseUrl": "https://www.bigrock.in",
"currencyCodes": [ "INR", "USD" ],
"features": [
"Basic DNS",
"2 Email Accounts",
"Domain Forwarding",
"URL Masking",
"DNS Management",
"Domain Theft Protection"
]
}
]
Available
or notSave file as index.js
const lookupServices = require('@valexe-technologies/lookup.services');
const domainTLD = 'com';
const randomDomainName = 'whatblarandomdomainxyz';
const exampleDomainNameWithTLD = `${randomDomainName}.${domainTLD}`;
(async () => {
const domainServices = new lookupServices.DomainServices();
await domainServices
.init(
false // headless 'false' to show Chromium instance
);
const response = await domainServices
.isDomainAvailable(
exampleDomainNameWithTLD
);
console.log(response);
})();
Execute script on the command line
node index.js
It will print true
if domain is available or false
if domain is not available.
true or false
Price
Save file as index.js
const lookupServices = require('@valexe-technologies/lookup.services');
const domainTLD = 'com';
const randomDomainName = 'whatblarandomdomainxyz';
const exampleDomainNameWithTLD = `${randomDomainName}.${domainTLD}`;
(async () => {
const domainServices = new lookupServices.DomainServices();
await domainServices
.init(
false // headless 'false' to show Chromium instance
);
const response = await domainServices
.domainPrice(
'BigRock', // one of the "Registrar Name"
exampleDomainNameWithTLD,
'INR' // one of the Supported "Currency Code"
);
console.log(response);
})();
Execute script on the command line
node index.js
It will print Registrar
URL and domain Price
as JSON object.
{
"url": "https://www.bigrock.in",
"price": 799
}