Hosts View API

The Hosts View API exposes a single endpoint, /api/v2/hosts/{ip}, which can be used to fetch the request host by ip address and return the most recent view of the Host and its Services.

Details

Description

Fetches the most recent view of a host and its services by a given IP address.

Endpoint
GET /api/v2/hosts/{ip}
Path Parameters
  • ip [required string]
    The IP Address of the requested host.
Example: /api/v2/hosts/8.8.8.8
Query Parameters
  • at_time [optional RFC3339 timestamp]
    Fetches a host and its services at the given point in time. Requires historical API access.
    Nanosecond precision is allowed.
Example: /api/v2/hosts/8.8.8.8?at_time=2021-03-01T17:49:05Z
Body Parameters
(none)
Success Response
200 SUCCESS
The host was successfully retrieved.
Example:
            {
   "last_updated_at":"2021-04-14T14:08:40.067Z",
   "ip":"8.8.8.8",
   "autonomous_system_updated_at":"2021-04-09T17:33:12.118684Z",
   "autonomous_system":{
      "bgp_prefix":"8.8.8.0/24",
      "country_code":"US",
      "asn":15169,
      "name":"GOOGLE",
      "description":"GOOGLE"
   },
   "location_updated_at":"2021-03-30T14:53:12.980328Z",
   "location":{
      "country":"United States",
      "coordinates":{
         "latitude":37.751,
         "longitude":-97.822
      },
      "registered_country":"United States",
      "registered_country_code":"US",
      "postal_code":"",
      "country_code":"US",
      "timezone":"America/Chicago",
      "continent":"North America"
   },
   "services":[
      {
         "transport_protocol":"UDP",
         "truncated":false,
         "service_name":"DNS",
         "_decoded":"dns",
         "source_ip":"74.120.14.55",
         "extended_service_name":"DNS",
         "observed_at":"2021-04-14T14:06:07.562948499Z",
         "dns":{
            "server_type":"FORWARDING"
         },
         "perspective_id":"PERSPECTIVE_TELIA",
         "port":53,
         "software":[
            
         ]
      },
      {
         "transport_protocol":"TCP",
         "_encoding":{
            "banner":"DISPLAY_UTF8",
            "certificate":"DISPLAY_HEX"
         },
         "http":{
            "_encoding":{
               "body_hash":"DISPLAY_HEX"
            },
            "request":{
               "headers":{
                  "_encoding":{
                     "User_Agent":"DISPLAY_UTF8",
                     "Accept":"DISPLAY_UTF8"
                  },
                  "User_Agent":[
                     "Mozilla/5.0 (compatible; CensysInspect/1.1; +https://about.censys.io/)"
                  ],
                  "Accept":[
                     "*/*"
                  ]
               },
               "method":"GET",
               "uri":"https://8.8.8.8/"
            },
            "response":{
               "body":"<!DOCTYPE html>\n<html lang=en>\n  <meta charset=utf-8>\n  <meta name=viewport content=\"initial-scale=1, minimum-scale=1, width=device-width\">\n  <title>Error 404 (Not Found)!!1</title>\n  <style>\n    *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}\n  </style>\n  <a href=//www.google.com/><span id=logo aria-label=Google></span></a>\n  <p><b>404.</b> <ins>That\u2019s an error.</ins>\n  <p>The requested URL <code>/</code> was not found on this server.  <ins>That\u2019s all we know.</ins>\n",
               "_encoding":{
                  "body":"DISPLAY_UTF8",
                  "html_tags":"DISPLAY_UTF8"
               },
               "protocol":"HTTP/1.1",
               "body_size":1561,
               "status_code":404,
               "headers":{
                  "Content_Length":[
                     "<REDACTED>"
                  ],
                  "_encoding":{
                     "Content_Length":"DISPLAY_UTF8",
                     "X_Xss_Protection":"DISPLAY_UTF8",
                     "Server":"DISPLAY_UTF8",
                     "Alt_Svc":"DISPLAY_UTF8",
                     "Content_Type":"DISPLAY_UTF8",
                     "Date":"DISPLAY_UTF8",
                     "X_Frame_Options":"DISPLAY_UTF8"
                  },
                  "X_Xss_Protection":[
                     "0"
                  ],
                  "Server":[
                     "HTTP server (unknown)"
                  ],
                  "Alt_Svc":[
                     "h3-29=\":443\"; ma=2592000,h3-T051=\":443\"; ma=2592000,h3-Q050=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\""
                  ],
                  "Content_Type":[
                     "text/html; charset=UTF-8"
                  ],
                  "Date":[
                     "<REDACTED>"
                  ],
                  "X_Frame_Options":[
                     "SAMEORIGIN"
                  ]
               },
               "html_tags":[
                  "<title>Error 404 (Not Found)!!1</title>",
                  "<meta charset=utf-8>",
                  "<meta name=viewport content=\"initial-scale=1, minimum-scale=1, width=device-width\">"
               ],
               "status_reason":"Not Found"
            },
            "body_hash":"736861313a39303531343663373339393433636531383937393565323334663163366562636162326635376139"
         },
         "certificate":"e58e89a726d80bb0219b218c3ab9d818b4be75d77959508400d660ebe1c1be3d",
         "truncated":false,
         "service_name":"HTTP",
         "_decoded":"http",
         "source_ip":"74.120.14.40",
         "tls":{
            "version_selected":"TLSv1_2",
            "certificates":{
               "_encoding":{
                  "chain_fps_sha_256":"DISPLAY_HEX",
                  "leaf_fp_sha_256":"DISPLAY_HEX"
               },
               "chain_fps_sha_256":[
                  "95c074e35902a14abd9d19afb6e7f80e669ff8e2363270539d963613f04aaa21"
               ],
               "leaf_data":{
                  "pubkey_algorithm":"RSA",
                  "subject_dn":"C=US, ST=California, L=Mountain View, O=Google LLC, CN=dns.google",
                  "pubkey_bit_size":2048,
                  "issuer_dn":"C=US, O=Google Trust Services, CN=GTS CA 1O1",
                  "names":[
                     "*.dns.google.com",
                     "8.8.4.4",
                     "8.8.8.8",
                     "8888.google",
                     "dns.google",
                     "dns.google.com",
                     "dns64.dns.google"
                  ],
                  "tbs_fingerprint":"d1927fb7868d80b299a9613ba58c6828cfd25e7ad05993be66d9a6860f78053e"
               },
               "leaf_fp_sha_256":"e58e89a726d80bb0219b218c3ab9d818b4be75d77959508400d660ebe1c1be3d"
            },
            "cipher_selected":"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256"
         },
         "extended_service_name":"HTTP",
         "observed_at":"2021-04-14T10:33:42.157566479Z",
         "perspective_id":"PERSPECTIVE_TELIA",
         "banner":"HTTP/1.1 404 Not Found\nServer: HTTP server (unknown)\nContent-Length: <REDACTED>\nContent-Type: text/html; charset=UTF-8\nDate: <REDACTED>\nX-Xss-Protection: 0\nAlt-Svc: h3-29=\":443\"; ma=2592000,h3-T051=\":443\"; ma=2592000,h3-Q050=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"\nX-Frame-Options: SAMEORIGIN",
         "port":443,
         "software":[
            
         ]
      }
   ]
}