{"id":15962557,"url":"https://github.com/ipapi-is/ip_to_hosting","last_synced_at":"2025-09-14T19:42:02.092Z","repository":{"id":64560490,"uuid":"576323918","full_name":"ipapi-is/ip_to_hosting","owner":"ipapi-is","description":"This package allows you to check whether an IP address belongs to a hosting provider or not. In case the IP address can be successfully linked to a hosting provider (datacenter), this module will return the meta information for the hosting provider.","archived":false,"fork":false,"pushed_at":"2023-10-22T12:07:02.000Z","size":13,"stargazers_count":19,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-23T16:59:21.947Z","etag":null,"topics":["api","aws","azure","cloud-provider","datacenter-detection","gcp","hosting-detection"],"latest_commit_sha":null,"homepage":"https://ipapi.is/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ipapi-is.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-12-09T14:58:28.000Z","updated_at":"2025-01-09T15:45:54.000Z","dependencies_parsed_at":"2023-11-12T13:45:49.007Z","dependency_job_id":null,"html_url":"https://github.com/ipapi-is/ip_to_hosting","commit_stats":{"total_commits":10,"total_committers":1,"mean_commits":10.0,"dds":0.0,"last_synced_commit":"672c4ac63fd51aea6cdb8ea81adebfdbc26b062d"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ipapi-is/ip_to_hosting","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipapi-is%2Fip_to_hosting","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipapi-is%2Fip_to_hosting/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipapi-is%2Fip_to_hosting/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipapi-is%2Fip_to_hosting/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ipapi-is","download_url":"https://codeload.github.com/ipapi-is/ip_to_hosting/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipapi-is%2Fip_to_hosting/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259374945,"owners_count":22847872,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","aws","azure","cloud-provider","datacenter-detection","gcp","hosting-detection"],"created_at":"2024-10-07T16:04:30.619Z","updated_at":"2025-06-12T01:09:37.590Z","avatar_url":"https://github.com/ipapi-is.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IP to Hosting\n\n[![Npm package version](https://badgen.net/npm/v/ip-to-hosting)](https://www.npmjs.com/package/ip-to-hosting)\n[![Npm package yearly downloads](https://badgen.net/npm/dy/ip-to-hosting)](https://npmjs.com/package/ip-to-hosting)\n\nThis package allows you to check whether an IP address belongs to a hosting/cloud provider. In case the IP belongs to a hosting provider (datacenter), this module will return the meta information for the hosting provider.\n\nCurrently, there are more than 180,000 IP ranges from more than 4,400 hosting providers in the database. Learn more, by [reading the documentation](https://ipapi.is/hosting-detection.html).\n\n## Installation\n\nYou can both use this package from Node.js and in the browser with vanilla JavaScript.\n\n```bash\nnpm install ip-to-hosting\n```\n\nIf you want to clone the repository directly from GitHub instead:\n\n```bash\ngit clone git@github.com:ipapi-is/ip_to_hosting.git\n```\n\n## Usage from Node.js\n\nIf you want to lookup the following IP addresses:\n\n```JavaScript\nconst { ipToHosting } = require('ip-to-hosting');\n\nconst ipAddresses = [\n  '144.168.164.55',\n  '167.99.241.66',\n  '97.107.129.77',\n  '85.10.199.76',\n];\n\nfor (let ip of ipAddresses) {\n  ipToHosting(ip).then(function (isHosting) {\n    console.log(`${ip} isHosting:`);\n    console.log(isHosting);\n  });\n}\n```\n\nwhich yields:\n\n```JavaScript\n85.10.199.76 isHosting:\n{\n  datacenter: 'Hetzner Online GmbH',\n  domain: 'www.hetzner.com',\n  network: '85.10.192.0 - 85.10.207.255'\n}\n167.99.241.66 isHosting:\n{\n  datacenter: 'DigitalOcean',\n  code: '60341',\n  city: 'Frankfurt',\n  state: 'DE-HE',\n  country: 'DE',\n  network: '167.99.240.0/20'\n}\n144.168.164.55 isHosting:\n{\n  datacenter: 'ServerMania Inc.',\n  domain: 'https://www.servermania.com/',\n  network: '144.168.128.0-144.168.255.255'\n}\n97.107.129.77 isHosting:\n{\n  datacenter: 'Linode',\n  domain: 'https://www.linode.com/',\n  network: '97.107.128.0-97.107.143.255'\n}\n```\n\nIf the IP address belongs to a datacenter/hosting provider, the API response will return an object with the following required attributes:\n\n- `datacenter` - `string` - to which datacenter the IP address belongs. For a full list of datacenters, check the [ipapi.is/json/info endpoint](https://ipapi.is/json/info). In this case, the datacenter's name is `B2 Net Solutions Inc.`\n- `domain` - `string` - The domain name of the company\n- `network` - `string` - the network this IP address belongs to (In the above case: `144.168.128.0 - 144.168.255.255`)\n\nWith some datacenter providers, more meta data is available. Consult the [API documentation page](https://ipapi.is/developers.html) in order to learn more.\n\nMost IP's don't belong to a hosting provider. In those cases, the response will be `null`.\n\n## Usage from the Browser\n\nCopy the browser JavaScript bundle to your preferred location. After installing the module with\n\n```bash\nnpm install ip-to-hosting\n```\n\nyou can find the minified JavaScript here: `node_modules/ip-to-hosting/dist/ipToHosting.min.js`\n\n```html\n\u003c!doctype html\u003e\n\n\u003chtml lang=\"en\"\u003e\n\n\u003chead\u003e\n  \u003cmeta charset=\"utf-8\"\u003e\n  \u003ctitle\u003eIP to Hosting Example Browser\u003c/title\u003e\n  \u003cmeta name=\"description\" content=\"IP to Hosting Example\"\u003e\n  \u003cmeta name=\"author\" content=\"ipapi.is\"\u003e\n\u003c/head\u003e\n\n\u003cbody\u003e\n  \u003cpre id=\"hosting\"\u003e\u003c/pre\u003e\n  \u003cscript type=\"text/javascript\" src=\"dist/ipToHosting.min.js\"\u003e\u003c/script\u003e\n  \u003cscript type=\"text/javascript\"\u003e\n    ipToHosting('43.33.44.11').then((res) =\u003e {\n      document.getElementById('hosting').innerText = JSON.stringify(res, null, 2);\n    });\n  \u003c/script\u003e\n\u003c/body\u003e\n\n\u003c/html\u003e\n```\n\n## Use the Database Directly\n\nThis package uses the [ipapi.is API](https://ipapi.is/developers.html) in order to avoid shipping a huge database in the npm module. If you have a large volume of IP addresses to lookup, you can download the full \u0026 free [Hosting Provider Database](https://ipapi.is/hosting-detection.html).\n\nGitHub mirror of the database: [Hosting Provider Database Mirror](https://github.com/ipapi-is/ipapi/tree/main/databases)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fipapi-is%2Fip_to_hosting","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fipapi-is%2Fip_to_hosting","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fipapi-is%2Fip_to_hosting/lists"}