Socket
Book a DemoInstallSign in
Socket

ip2whois_ruby

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ip2whois_ruby

2.2.0
bundlerRubygems
Version published
Maintainers
1
Created
Source

IP2WHOIS Ruby SDK

Latest Stable Version Total Downloads

This Ruby module enables user to easily implement the checking of WHOIS information for a particular domain into their solution using the API from https://www.ip2whois.com. It is a WHOIS lookup api that helps users to obtain domain information, WHOIS record, by using a domain name. The WHOIS API returns a comprehensive WHOIS data such as creation date, updated date, expiration date, domain age, the contact information of the registrant, mailing address, phone number, email address, nameservers the domain is using and much more. IP2WHOIS supports the query for 1113 TLDs and 634 ccTLDs.

This module requires API key to function. You may sign up for a free API key at https://www.ip2whois.com/register.

Usage Example

Lookup Domain Information

require 'ip2whois_ruby'

Ip2whoisRuby::Configuration.api_key = 'YOUR_API_KEY'

result = Ip2whoisRuby::Api.lookup('example.com')

Convert Normal Text to Punycode

require 'ip2whois_ruby'

result = Ip2whoisRuby::Api.get_punycode('täst.de')

Convert Punycode to Normal Text

require 'ip2whois_ruby'

result = Ip2whoisRuby::Api.get_normal_text('xn--tst-qla.de')

Get Domain Name

require 'ip2whois_ruby'

# Get domain name from URL
result = Ip2whoisRuby::Api.get_domain_name('https://www.example.com/exe')

Get Domain Extension

require 'ip2whois_ruby'

# Get domain extension (gTLD or ccTLD) from URL or domain name
result = Ip2whoisRuby::Api.get_domain_extension('example.com')

Response Parameter

Lookup function

ParameterTypeDescription
domainstringDomain name.
domain_idstringDomain name ID.
statusstringDomain name status.
create_datestringDomain name creation date.
update_datestringDomain name updated date.
expire_datestringDomain name expiration date.
domain_ageintegerDomain name age in day(s).
whois_serverstringWHOIS server name.
registrar.iana_idstringRegistrar IANA ID.
registrar.namestringRegistrar name.
registrar.urlstringRegistrar URL.
registrant.namestringRegistrant name.
registrant.organizationstringRegistrant organization.
registrant.street_addressstringRegistrant street address.
registrant.citystringRegistrant city.
registrant.regionstringRegistrant region.
registrant.zip_codestringRegistrant ZIP Code.
registrant.countrystringRegistrant country.
registrant.phonestringRegistrant phone number.
registrant.faxstringRegistrant fax number.
registrant.emailstringRegistrant email address.
admin.namestringAdmin name.
admin.organizationstringAdmin organization.
admin.street_addressstringAdmin street address.
admin.citystringAdmin city.
admin.regionstringAdmin region.
admin.zip_codestringAdmin ZIP Code.
admin.countrystringAdmin country.
admin.phonestringAdmin phone number.
admin.faxstringAdmin fax number.
admin.emailstringAdmin email address.
tech.namestringTech name.
tech.organizationstringTech organization.
tech.street_addressstringTech street address.
tech.citystringTech city.
tech.regionstringTech region.
tech.zip_codestringTech ZIP Code.
tech.countrystringTech country.
tech.phonestringTech phone number.
tech.faxstringTech fax number.
tech.emailstringTech email address.
billing.namestringBilling name.
billing.organizationstringBilling organization.
billing.street_addressstringBilling street address.
billing.citystringBilling city.
billing.regionstringBilling region.
billing.zip_codestringBilling ZIP Code.
billing.countrystringBilling country.
billing.phonestringBilling phone number.
billing.faxstringBilling fax number.
billing.emailstringBilling email address.
name_serversarrayName servers
{
    "domain": "greendot.com",
    "domain_id": "600750_DOMAIN_COM-VRSN",
    "status": "registered",
    "create_date": "1997-11-03T00:00:00Z",
    "update_date": "2019-10-29T01:25:57Z",
    "expire_date": "2021-11-02T05:00:00Z",
    "domain_age": 9027,
    "whois_server": "whois.corporatedomains.com",
    "registrar": {
        "iana_id": "299",
        "name": "CSC CORPORATE DOMAINS, INC.",
        "url": "www.cscprotectsbrands.com"
    },
    "registrant": {
        "name": "Admin Role",
        "organization": "Green Dot Corporation",
        "street_address": "",
        "city": "Pasadena",
        "region": "CA",
        "zip_code": "91107",
        "country": "US",
        "phone": "+1.8664120548",
        "fax": "+1.8664120548",
        "email": "adminrole@greendotcorp.com"
    },
    "admin": {
        "name": "Admin Role",
        "organization": "Green Dot Corporation",
        "street_address": "",
        "city": "Pasadena",
        "region": "CA",
        "zip_code": "91107",
        "country": "US",
        "phone": "+1.8664120548",
        "fax": "+1.8664120548",
        "email": "adminrole@greendotcorp.com"
    },
    "tech": {
        "name": "Admin Role",
        "organization": "Green Dot Corporation",
        "street_address": "",
        "city": "Pasadena",
        "region": "CA",
        "zip_code": "91107",
        "country": "US",
        "phone": "+1.8664120548",
        "fax": "+1.8664120548",
        "email": "adminrole@greendotcorp.com"
    },
    "billing": {
        "name": "",
        "organization": "",
        "street_address": "",
        "city": "",
        "region": "",
        "zip_code": "",
        "country": "",
        "phone": "",
        "fax": "",
        "email": ""
    },
    "nameservers": "ns1.greendotdns.com, ns2.greendotdns.com"
}

LICENCE

See the LICENSE file.

FAQs

Package last updated on 23 Aug 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.