Host.io API Documentation
Authentication
Your API token is used to authenticate you with our API, and can be provided
either as an HTTP Basic Auth username, a bearer token, or alternatively as a
token URL parameter.
If no token is provided, you will receive an error message response with an HTTP
400 status code.
Basic Auth
curl -u $TOKEN: https://host.io
Bearer Token
curl -H "Authorization: Bearer $TOKEN" https://host.io
Query Parameter
curl https://host.io?token=$TOKEN
/api/web/:domain
Description
Metadata scraped from a domain homepage.
Errors
Returns the HTTP 404 status code as well as an error message in JSON format if
the domain is invalid and/or has no data associated with it.
Examples
Good
curl https://host.io/api/web/ipinfo.io?token=$TOKEN
{
"domain": "ipinfo.io",
# URL we scraped the data from
"url": "https://ipinfo.io/",
# Date we scraped the data
"date": "2019-07-26T16:10:59.309Z",
# Actual IP we scraped the data from
"ip": "216.239.38.21",
# Length of the HTML content we scraped
"length": 28551,
# Server header
"server": null,
# X-Powered-By header
"powered_by": null,
# Encoding of the scraped data
"encoding": "utf8",
# Google analytics tracking ID
"googleanalytics": "UA-2336519",
# HTML title
"title": "IP Address API and Data Solutions - geolocation, company, carrier info, type and more - IPinfo.io",
# HTML meta description
"description": "We're the trusted source for IP address data, handling 12 billion IP geolocation API requests per month for over 1,000 businesses and 100,000+ developers",
# Scraped copyright noticed
"copyright": "Copyright © 2019 IPinfo",
}
Bad
curl https://host.io/api/web/example.example?token=$TOKEN
{
"error": "No details found for example.example"
}
/api/dns/:domain
Description
Get all the DNS records stored for a domain.
Currently supported records are:
- A (IPv4 address)
- AAAA (IPv6 address)
- MX (mailserver)
- NS (nameserver)
Errors
Returns the HTTP 404 status code as well as an error message in JSON format if
the domain is invalid and/or has no data associated with it.
Examples
Good
curl https://host.io/api/dns/facebook.com?token=$TOKEN
{
"domain": "facebook.com",
"a": [
"157.240.3.35"
],
"aaaa": [
"2a03:2880:f101:83:face:b00c:0:25de"
],
"mx": [
"10 smtpin.vvv.facebook.com."
],
"ns": [
"a.ns.facebook.com.",
"b.ns.facebook.com."
]
}
Bad
curl https://host.io/api/dns/example.example?token=$TOKEN
{
"error": "No details found for example.example"
}
/api/googleanalytics/:value
Parameters
limit
: Must be one of 0, 1, 5, 10, 25, 100, 250, or 1000.page
: The page of data to view. Pagination takes into account thelimit
.
Errors
Returns the HTTP 404 status code as well as an error message in JSON format if
the domain is invalid and/or has no data associated with it, or if the
limit/page combination is out-of-bounds.
Examples
Good
curl "https://host.io/api/googleanalytics/UA-61330992?limit=5&token=$TOKEN"
{
"value": "UA-61330992",
"total": 10,
"domains": [
"minilex.fi",
"minilex.at",
"minilex.sk",
"minilex.se",
"minilex.be"
]
}
Bad (invalid UA)
curl https://host.io/api/googleanalytics/UA-FOO?token=$TOKEN
{
"error": "No details on 'googleanalytics' found for UA-FOO"
}
Bad (invalid limit/page combo)
curl "https://host.io/api/googleanalytics/UA-61330992?limit=250&page=100&token=$TOKEN"
{
"error": "No details on 'googleanalytics' found for UA-61330992"
}
/api/adsense/:value
Parameters
limit
: Must be one of 0, 1, 5, 10, 25, 100, 250, or 1000.page
: The page of data to view. Pagination takes into account thelimit
.
Errors
Returns the HTTP 404 status code as well as an error message in JSON format if
the domain is invalid and/or has no data associated with it, or if the
limit/page combination is out-of-bounds.
Examples
Good
curl "https://host.io/api/adsense/pub-3070517698254187?limit=5&token=$TOKEN"
{
"value": "pub-3070517698254187",
"total": 8,
"domains": [
"wikiliteratura.net",
"wikibiologia.net",
"wikigeografia.net",
"wikihistoria.net",
"wikiciencias.net"
]
}
Bad (invalid adsense ID)
curl https://host.io/api/adsense/pub-foo?token=$TOKEN
{
"error": "No details on 'adsense' found for pub-foo"
}
Bad (invalid limit/page combo)
curl "https://host.io/api/adsense/pub-3070517698254187?limit=250&page=100&token=$TOKEN"
{
"error": "No details on 'adsense' found for pub-3070517698254187"
}
/api/email/:email
Parameters
limit
: Must be one of 0, 1, 5, 10, 25, 100, 250, or 1000.page
: The page of data to view. Pagination takes into account thelimit
.
Errors
Returns the HTTP 404 status code as well as an error message in JSON format if
the domain is invalid and/or has no data associated with it, or if the
limit/page combination is out-of-bounds.
Examples
Good
curl "https://host.io/api/email/office@ssa-vending.com?limit=5&token=$TOKEN"
{
"value": "office@ssa-vending.com",
"total": 3,
"domains": [
"ssa-vending.com",
"schank-service.com",
"ssa-softdrinks.com"
]
}
Bad (invalid email)
curl https://host.io/api/email/bad@email.com?token=$TOKEN
{
"error": "No details on 'email' found for bad@email.com"
}
Bad (invalid limit/page combo)
curl "https://host.io/api/email/office@ssa-vending.com?limit=250&page=100&token=$TOKEN"
{
"error": "No details on 'email' found for office@ssa-vending.com"
}
/api/redirects/:domain
Parameters
limit
: Must be one of 0, 1, 5, 10, 25, 100, 250, or 1000.page
: The page of data to view. Pagination takes into account thelimit
.
Errors
Returns the HTTP 404 status code as well as an error message in JSON format if
the domain is invalid and/or has no data associated with it, or if the
limit/page combination is out-of-bounds.
Examples
Good
curl "https://host.io/api/redirects/ipinfo.io?limit=5&token=$TOKEN"
{
"domain": "ipinfo.io",
"total": 6,
"domains": [
"img.io",
"geomium.com",
"ipinfo.dev",
"jp025.com",
"ipinfo.org"
]
}
Bad (invalid domain)
curl https://host.io/api/redirects/example.example?token=$TOKEN
{
"error": "No details on 'redirects' found for example.example"
}
Bad (invalid limit/page combo)
curl "https://host.io/api/redirects/ipinfo.io?limit=250&page=100&token=$TOKEN"
{
"error": "No details on 'redirects' found for ipinfo.io"
}
/api/backlinks/:domain
Maximum 10 million backlinks are returned for a given domain.
Parameters
limit
: Must be one of 0, 1, 5, 10, 25, 100, 250, or 1000.page
: The page of data to view. Pagination takes into account thelimit
.
Errors
Returns the HTTP 404 status code as well as an error message in JSON format if
the domain is invalid and/or has no data associated with it, or if the
limit/page combination is out-of-bounds.
Examples
Good
curl "https://host.io/api/backlinks/ipinfo.io?limit=5&token=$TOKEN"
{
"domain": "ipinfo.io",
"total": 56,
"domains": [
"letsencrypt.org",
"caniuse.com",
"ipinfo.io",
"anandthearchitect.com",
"core2015.cz"
]
}
Bad (invalid domain)
curl https://host.io/api/backlinks/example.example?token=$TOKEN
{
"error": "No details on 'backlinks' found for example.example"
}
Bad (invalid limit/page combo)
curl "https://host.io/api/backlinks/ipinfo.io?limit=250&page=100&token=$TOKEN"
{
"error": "No details on 'backlinks' found for ipinfo.io"
}
/api/domains/:ip
Description
Returns domains hosted on an IP.
Parameters
limit
: Must be one of 0, 1, 5, 10, 25, 100, 250, or 1000.page
: The page of data to view. Pagination takes into account thelimit
.
Errors
Returns the HTTP 404 status code as well as an error message in JSON format if
the domain is invalid and/or has no data associated with it, or if the
limit/page combination is out-of-bounds.
Examples
Good
curl "https://host.io/api/domains/216.239.38.21?limit=5&token=$TOKEN"
{
"ip": "216.239.38.21",
"total": 436851,
"domains": [
"vslovetv.com",
"snapchat.com",
"virustotal.com",
"clickvideodownload.com",
"yamaha.com"
]
}
Bad (invalid IP)
curl "https://host.io/api/domains/1111.1.1.1?token=$TOKEN"
{
"error": "No details on 'domains' found for 1111.1.1.1"
}
Bad (invalid limit/page combo)
curl "https://host.io/api/domains/216.239.38.21?limit=1000&page=999&token=$TOKEN"
{
"error": "No details on 'domains' found for 216.239.38.21"
}
/api/full/:domain
Description
Includes data from all APIs for a given domain.
Parameters
limit
: Must be one of 0, 1, 5, 10, 25, 100, 250, or 1000.
Does not support pagination. If you need to use limit
but need more than 1000
results, you'll need to call the specific API you want the additional data for
with a page
parameter.
Errors
Returns the HTTP 404 status code as well as an error message in JSON format if
the domain is invalid and/or has no data associated with it.
Examples
Good
curl "https://host.io/api/full/facebook.com?limit=5&token=$TOKEN"
{
"domain": "facebook.com",
"web": {
"domain": "facebook.com",
"url": "https://www.facebook.com/",
"ip": "157.240.22.35",
"date": "2019-07-26T15:38:33.482Z",
"length": 123970,
"encoding": "utf8",
"copyright": "Facebook © 2019",
"title": "Facebook - Log In or Sign Up",
"description": "Create an account or log into Facebook. Connect with friends, family and other people you know. Share photos and videos, send messages and get updates."
},
"dns": {
"domain": "facebook.com",
"a": [
"157.240.3.35"
],
"aaaa": [
"2a03:2880:f101:83:face:b00c:0:25de"
],
"mx": [
"10 smtpin.vvv.facebook.com."
],
"ns": [
"a.ns.facebook.com.",
"b.ns.facebook.com."
]
},
"domains": {
"ip": "157.240.22.35",
"total": 4,
"domains": [
"facebook.com",
"mobileironbackup.com",
"fbdogfoodbeta.com",
"purpletiesupport.com"
]
},
"redirects": {
"domain": "facebook.com",
"total": 308199,
"domains": [
"fbcdn.net",
"testony.com",
"fb.com",
"funmarathi.com",
"facebookmarketingpartners.com"
]
},
"backlinks": {
"domain": "facebook.com",
"total": 24815808,
"domains": [
"facebook.com",
"jd.com",
"ebay.com",
"msn.com",
"microsoft.com"
]
}
}
Bad
curl "https://host.io/api/full/example.example?token=$TOKEN"
{
"error": "No details found for example.example"
}
/api/:domain
This endpoint is considered deprecated; please see /api/full/:domain
.
Description
Returns a large mix of data for a domain.
Examples
curl https://host.io/api/facebook.com?token=$TOKEN
{
"domain": "facebook.com",
"ip": "157.240.22.35",
"aaaa": "2a03:2880:f101:83:face:b00c:0:25de",
"mx": "10 smtpin.vvv.facebook.com.",
"ns": "a.ns.facebook.com.",
"date": "2019-07-26T15:38:33.482Z",
"url": "https://www.facebook.com/",
"length": 123970,
"encoding": "utf8",
"copyright": "Facebook © 2019",
"title": "Facebook - Log In or Sign Up",
"description": "Create an account or log into Facebook. Connect with friends, family and other people you know. Share photos and videos, send messages and get updates.",
"country": "US",
"asn": {
"asn": "AS32934",
"domain": "facebook.com",
"name": "Facebook, Inc.",
"route": "157.240.22.0/24",
"type": "isp"
},
"backlinks": {
"total": 24815808,
"domains": [
"jd.com",
"ebay.com",
"msn.com",
"microsoft.com",
"aliexpress.com",
"flipkart.com",
"stackoverflow.com",
"github.com",
"whatsapp.com",
"espn.com",
...
]
},
"redirects": {
"total": 308199,
"domains": [
"fbcdn.net",
"testony.com",
"fb.com",
"funmarathi.com",
"facebookmarketingpartners.com",
"thefacebook.com",
"homotrophy.com",
"olapaok.gr",
"momentsapp.com",
"hellomerkato.com",
...
]
},
"domains": {
"total": 4,
"domains": [
"facebook.com",
"mobileironbackup.com",
"fbdogfoodbeta.com",
"purpletiesupport.com"
]
}
}