Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Hostname to IP Geolocation using host.io from IPinfo #64

Open
abdullahdevrel opened this issue Jan 3, 2024 · 0 comments

Comments

@abdullahdevrel
Copy link

Hi,

I am the DevRel of IPinfo. We are very happy to be a part of this project; however, it is unfortunate that we do not natively provide hostname to IP address information and only accept IP addresses as input.

To resolve this issue, we would like to add Host.io's services to this project. Host.io provides detailed host-level information, including information on the hosting IP address. The information is quite extensive, and I recommend checking out the full schema from the documentation: https://host.io/docs#apifulldomain

However, regarding IP geolocation, we suggest using only the following API endpoint:

API request to the /ipinfo endpoint

curl https://host.io/api/ipinfo/example.com?token=$token

API response

{
    "93.184.216.34": {
        "city": "Dźwirzyno",
        "region": "West Pomerania",
        "country": "PL",
        "loc": "54.1593,15.4112",
        "postal": "78-100",
        "timezone": "Europe/Warsaw",
        "asn": {
            "asn": "AS15133",
            "name": "Edgecast Inc.",
            "domain": "edg.io",
            "route": "93.184.216.0/24",
            "type": "hosting"
        }
    },
    "2606:2800:220:1:248:1893:25c8:1946": {
        "city": "Los Angeles",
        "region": "California",
        "country": "US",
        "loc": "34.0522,-118.2437",
        "postal": "90009",
        "timezone": "America/Los_Angeles",
        "asn": {
            "asn": "AS15133",
            "name": "Edgecast Inc.",
            "domain": "edg.io",
            "route": "2606:2800:220::/48",
            "type": "hosting"
        }
    }
}

The API provides IP geolocation information of multiple IP addresses related to the hostname. The API also comes with a free tier.

Please, let me know what you think. I can submit a PR as soon as possible. Thank you for reviewing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant