# HostIP.info API

Category: [IP to location APIs](https://free-web-services.com/web-services/geo/ip-to-location/)  
Page: https://free-web-services.com/web-services/geo/ip-to-location/hostip.html  
Documentation: http://www.hostip.info/use.php

This is an easy HTTP oriented API to locate IP addresses and Geocode them. If you don't supply the "?ip=aa.bb.cc.dd" bit, then the ip address lookup of the calling machine will be located instead (here, the aa,bb,cc,dd are decimal digits). If you add &position=true to the end of the URL then latitude and longitude will be returned also. Both HTML and XML formats are supplied for your convenience.

- API key: Not needed
- From the browser: Yes (CORS)
- Interface: HTTP-GET
- Provider: hostip.info
- Last checked: Working on November 15th, 2026

Example request:

```sh
curl 'http://api.hostip.info/get_json.php?ip=8.8.8.8'
```

The JavaScript works in a web page as well as in Node.js 18 or newer.

