An easy to use IP address lookup

Your IP address

…

Looking you up…

$ curl "api.host.sh/v2/lookup/?token=…&ip=8.8.8.8"

Look up any IP

Looking up other IPs needs an API token. Your token stays in this tab only and is sent straight to api.host.sh.

Raw JSON

{}

API

One endpoint, JSON out. Send your token as a query parameter, a JSON body field, or a Bearer header.

curl "https://api.host.sh/v2/lookup/?token=YOUR_TOKEN&ip=8.8.8.8"

curl -H "Authorization: Bearer YOUR_TOKEN" \
  "https://api.host.sh/v2/lookup/?ip=8.8.8.8"

Parameters

ipIPv4 or IPv6 address to look up
uaUser-Agent string to parse (needs the UA permission)
alAccept-Language header value

Response

geo: continent, country, subdivision, city, postal_code, latitude, longitude, radius, timezone. connection: ip, isp (asn, name, organization), type, anonymity (vpn, proxy, tor, dch, cdn, bot, scraper, ddos), usage. The fields you get depend on your token's plan.

Errors

{"errors":[{"message":"Forbidden","code":403}]}