Hosts Information
Introduction
The Odin Host Information API provides detailed information about a specific host based on its IP address. This API allows you to retrieve ASN (Autonomous System Number) data, location, services, tags, and more.
Base URL
The base URL for all API requests is:
Domain | URL |
---|---|
api.odin.io | api.odin.io/v1 |
The endpoint for host search is:
/hosts/{ip}/
Authentication
All requests to this API must include an authentication token in the headers. Use the following header for authentication:
X-API-Key: V8qb6HJIRKY7tVH0sou90I7YX3pCuqLQfRLmUzxpQbY=
Request Parameters
The API requires the following request parameter to be included in the request body:
https://api.odin.io/v1/hosts/8.8.8.8/
Include the following parameters in the request body:
Name | Type | Description |
---|---|---|
ip | string | The IP address of the host. |
CURL
{
curl --location 'https://api.odin.io/v1/hosts/8.8.8.8/' \
--header 'Accept: application/json' \
--header 'X-API-Key: V8qb6HJIRKY7tVH0sou90I7YX3pCuqLQfRLmUzxpQbY='
}
This cURL command is a GET request to https://api.odin.io/v1/hosts/8.8.8.8/ endpoint with two headers:
'Accept: application/json': Indicates that the client (your cURL command) expects a JSON response from the server.
'X-API-Key: V8qb6HJIRKY7tVH0sou90I7YX3pCuqLQfRLmUzxpQbY=': Specifies the API key used for authentication with the value 'V8qb6HJIRKY7tVH0sou90I7YX3pCuqLQfRLmUzxpQbY='.
Response Parameters
The response from the Odin Host Information API will be in JSON format and include the following fields:
Example Response:
{
"success": true,
"data": {
"asn": {
"country_code": "JP",
"number": "AS4623",
"organization": "JD Communications Corporation"
},
"asn_updated_at": "0001-01-01T00:00:00Z",
"domains": null,
"hostnames": [
{
"last_updated_at": "2023-07-03T01:18:13.538033568Z",
"name": "i223-217-65-218.s67.a020.ap.jd.or.jp"
}
],
"ip": "8.8.8.8",
"is_ipv4": true,
"is_ipv6": false,
"last_updated_at": "2023-07-03T01:18:13.538299202Z",
"location": {
"city": "ABC",
"continent": "XY",
"coordinates": {
"latitude": "43.0763",
"longitude": "141.3654"
},
"country_code": "AB",
"country_name": "ABC",
"geo_point": "43.0763, 983.3654",
"locale_code": "en",
"network": "8.8.8.8/26",
"postal_code": "065-0011"
},
"location_updated_at": "2023-06-30T17:24:15Z",
"scan_id": 1687966710,
"services": [
{
"_meta": {
"category": "",
"desc": "",
"name": "http",
"tags": null
},
"extra_info": "",
"last_updated_at": "2023-07-01T08:41:39.267Z",
"modules": {
"http": {
"content_length": -1,
"headers": {
"accept_ranges": [
"bytes"
],
"cache_control": [
"no-cache"
],
"content_security_policy": [
"frame-ancestors 'self'"
],
"content_type": [
"text/html"
],
"date": [
"Mon, 03 Jul 2023 01:18:11 GMT"
],
"last_modified": [
"Fri, 22 Apr 2022 00:37:56 GMT"
],
"strict_transport_security": [
"max-age=15552000"
],
"vary": [
"Accept-encoding"
],
"x_frame_options": [
"SAMEORIGIN"
],
"x_xss_protection": [
"1; mode=block"
]
},
"protocol": "HTTP/1.1",
"redirects": [
{
"content_length": 211,
"location": "https://8.8.8.8:443/",
"status_code": 304,
"status_line": "302 Found"
},
{
"content_length": 209,
"location": "https://8.8.8.8/ng",
"status_code": 304,
"status_line": "302 Found"
}
],
"status_code": 200,
"transfer_encoding": null
}
},
"name": "http",
"port": 80,
"product": "",
"protocol": "tcp",
"softwares": [],
"tunnel": "",
"version": ""
}
],
"services_hash": "c454099868e24b801b0b2212dc4563482d6e7cf061bfe6623c83e85184505429",
"tags": [
{
"last_updated_at": "2023-07-01T17:19:04Z",
"name": "is_cdn",
"pretty_name": "CDN",
"value": false
},
{
"last_updated_at": "2023-06-30T17:24:15Z",
"name": "is_anonymous_proxy",
"pretty_name": "Anonymous Proxy",
"value": false
},
{
"last_updated_at": "2023-06-30T17:24:15Z",
"name": "is_satellite_provider",
"pretty_name": "Satellite Provider",
"value": false
}
],
"whois": {
"_encoding": {
"raw": "BASE89"
},
"descr": "JD DOCOMO,INC.",
"network": "8.8.8.8/17",
"organization": "JD DOCOMO,INC.",
"raw": null
},
"whois_updated_at": "2023-05-01T13:23:27Z"
}
}
success | Indicates whether the request was successful or not. |
data | The host information data. |
data.asn | Information about the Autonomous System Number (ASN). |
data.asn.country_code | The country code associated with the ASN. |
data.asn.number | The ASN number. |
data.asn.organization | The organisation associated with the ASN. |
data.asn_updated_at | The last updated timestamp for the ASN information. |
data.domains | Null value indicating no domain information available. |
data.hostnames | An array of hostnames associated with the IP address. |
data.hostnames.last_updated_at | The last updated timestamp for the hostname information. |
data.hostnames.name | The hostname associated with the IP address. |
data.ip | The IP address of the host. |
data.is_ipv4 | Indicates whether the IP address is an IPv4 address. |
data.is_ipv6 | Indicates whether the IP address is an IPv6 address. |
data.last_updated_at | The last updated timestamp for the host information. |
data.location | The geographical location information of the host. |
data.location.city | The city where the host is located. |
data.location.continent | The continent where the host is located. |
data.location.coordinates | The latitude and longitude coordinates of the location. |
data.location.country_code | The country code where the host is located. |
data.location.country_name | The country name where the host is located. |
data.location.geo_point | The combined latitude and longitude coordinates. |
data.location.locale_code | The locale code associated with the location. |
data.location.network | The network associated with the host's IP address. |
data.location.postal_code | The postal code of the host's location. |
data.location_updated_at | The last updated timestamp for the location information. |
data.services | An array of services is running on the host. |
data.services._meta | Additional metadata for the service. |
data.services._meta.category | The category of the service. |
data.services._meta.desc | The description of the service. |
data.services._meta.name | The name of the service. |
data.services._meta.tags | Null value indicating no tags available for the service. |
data.services.extra_info | Additional information about the service. |
data.services.last_updated_at | The last updated timestamp for the service information. |
data.services.modules | The modules associated with the service. |
data.services.modules.http | The HTTP-specific information for the service. |
data.services.modules.http.content_length | The content length of the HTTP response. |
data.services.modules.http.headers | The headers are included in the HTTP response. |
data.services.modules.http.protocol | The protocol used for the HTTP communication. |
data.services.modules.http.redirects | An array of redirects encountered during the HTTP request. |
data.services.modules.http.redirects.content_length | The content length of a redirect response. |
data.services.modules.http.redirects.location | The location of the redirect. |
data.services.modules.http.redirects.status_code | The status code of the redirect response. |
data.services.modules.http.redirects.status_line | The status line of the redirect response. |
data.services.modules.http.status_code | The HTTP status code of the response. |
data.services.modules.http.transfer_encoding | Null value indicating no transfer encoding used. |
data.services.name | The name of the service. |
data.services.port | The port number associated with the service. |
data.services.product | The product name associated with the service. |
data.services.protocol | The protocol used by the service. |
data.services.softwares | An array of software names associated with the service. |
data.services.tunnel | The tunneling information for the service. |
data.services.version | The version of the service. |
data.services_hash | The hash value representing the services. |
data.tags | An array of tags associated with the host. |
data.tags.last_updated_at | The last updated timestamp for the tag information. |
data.tags.name | he name of the tag. |
data.tags.pretty_name | The human-readable name of the tag. |
data.tags.value | The value of the tag. |
data.whois | WHOIS information for the host. |
data.whois._encoding | The encoding format of the raw WHOIS information. |
data.whois._encoding.raw | The raw WHOIS information encoded in BASE64. |
data.whois.descr | The description of the WHOIS information. |
data.whois.network | The network associated with the host's IP address. |
data.whois.organization | Field |
data.whois.organization | The organisation associated with the WHOIS information. |
data.whois.raw | Null value indicating no raw WHOIS information available. |
data.whois_updated_at | The last updated timestamp for the WHOIS information. |