# Get Domain

Returns the current data about the given domain. In addition to the current data, you also get the current statistics associated with a particular record. For example, for a records you'll get how many other domains have the same IP.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "SecurityTrails API",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.securitytrails.com/v1"
    }
  ],
  "security": [
    {}
  ],
  "paths": {
    "/domain/{hostname}": {
      "get": {
        "summary": "Get Domain",
        "description": "Returns the current data about the given domain. In addition to the current data, you also get the current statistics associated with a particular record. For example, for a records you'll get how many other domains have the same IP.",
        "operationId": "get-domain-old",
        "parameters": [
          {
            "name": "hostname",
            "in": "path",
            "schema": {
              "type": "string",
              "default": "oracle.com"
            },
            "required": true
          },
          {
            "name": "apikey",
            "in": "query",
            "description": "Your SecurityTrails API key. See [authentication documentation](https://docs.securitytrails.com/docs/authentication)",
            "required": true,
            "schema": {
              "type": "string",
              "default": "your_api_key"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"hostname\": \"securitytrails.com\",\n  \"alexa_rank\": 83756,\n  \"current_dns\": {\n    \"a\": {\n      \"first_seen\": \"2017-05-26\",\n      \"values\": [\n        {\n          \"ip\": \"200.121.20.1\",\n          \"ip_count\": 10231\n        }\n      ]\n    },\n    \"aaaa\": {\n      \"first_seen\": \"2017-05-26\",\n      \"values\": [\n        {\n          \"ip\": \"2001:0db8:85a3:0000:0000:8a2e:0370:7334\",\n          \"ip_count\": 10231\n        }\n      ]\n    },\n    \"mx\": {\n      \"first_seen\": \"2017-05-26\",\n      \"values\": [\n        {\n          \"priority\": 50,\n          \"host\": \"aspmx5.googlemail.com\",\n          \"host_count\": 102341\n        },\n        {\n          \"priority\": 40,\n          \"host\": \"aspmx4.googlemail.com\",\n          \"host_count\": 200123\n        }\n      ]\n    },\n    \"ns\": {\n      \"first_seen\": \"2017-05-26\",\n      \"values\": [\n        {\n          \"nameserver\": \"ns4.dnsmadeeasy.com\",\n          \"nameserver_count\": 5213\n        },\n        {\n          \"nameserver\": \"ns3.dnsmadeeasy.com\",\n          \"nameserver_count\": 1223\n        }\n      ]\n    },\n    \"soa\": {\n      \"first_seen\": \"2017-05-26\",\n      \"values\": [\n        {\n          \"ttl\": 43200,\n          \"email\": \"dns.dnsmadeeasy.com\",\n          \"email_count\": 10\n        }\n      ]\n    },\n    \"txt\": {\n      \"first_seen\": \"2017-05-26\",\n      \"values\": [\n        {\n          \"value\": \"v=spf1 a mx include:spf.google.com include:sendgrid.net  include:spf.mandrillapp.com\"\n        },\n        {\n          \"value\": \"include:datadrivenemail.com ?all, google-site-verification=GbnLta6smBzoW8Oes1WafBhRoBwx4YSnvY8SFoQHmpI\"\n        }\n      ]\n    }\n  }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "hostname": {
                      "type": "string",
                      "example": "securitytrails.com"
                    },
                    "alexa_rank": {
                      "type": "integer",
                      "example": 83756,
                      "default": 0
                    },
                    "current_dns": {
                      "type": "object",
                      "properties": {
                        "a": {
                          "type": "object",
                          "properties": {
                            "first_seen": {
                              "type": "string",
                              "example": "2017-05-26"
                            },
                            "values": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "ip": {
                                    "type": "string",
                                    "example": "200.121.20.1"
                                  },
                                  "ip_count": {
                                    "type": "integer",
                                    "example": 10231,
                                    "default": 0
                                  }
                                }
                              }
                            }
                          }
                        },
                        "aaaa": {
                          "type": "object",
                          "properties": {
                            "first_seen": {
                              "type": "string",
                              "example": "2017-05-26"
                            },
                            "values": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "ip": {
                                    "type": "string",
                                    "example": "2001:0db8:85a3:0000:0000:8a2e:0370:7334"
                                  },
                                  "ip_count": {
                                    "type": "integer",
                                    "example": 10231,
                                    "default": 0
                                  }
                                }
                              }
                            }
                          }
                        },
                        "mx": {
                          "type": "object",
                          "properties": {
                            "first_seen": {
                              "type": "string",
                              "example": "2017-05-26"
                            },
                            "values": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "priority": {
                                    "type": "integer",
                                    "example": 50,
                                    "default": 0
                                  },
                                  "host": {
                                    "type": "string",
                                    "example": "aspmx5.googlemail.com"
                                  },
                                  "host_count": {
                                    "type": "integer",
                                    "example": 102341,
                                    "default": 0
                                  }
                                }
                              }
                            }
                          }
                        },
                        "ns": {
                          "type": "object",
                          "properties": {
                            "first_seen": {
                              "type": "string",
                              "example": "2017-05-26"
                            },
                            "values": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "nameserver": {
                                    "type": "string",
                                    "example": "ns4.dnsmadeeasy.com"
                                  },
                                  "nameserver_count": {
                                    "type": "integer",
                                    "example": 5213,
                                    "default": 0
                                  }
                                }
                              }
                            }
                          }
                        },
                        "soa": {
                          "type": "object",
                          "properties": {
                            "first_seen": {
                              "type": "string",
                              "example": "2017-05-26"
                            },
                            "values": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "ttl": {
                                    "type": "integer",
                                    "example": 43200,
                                    "default": 0
                                  },
                                  "email": {
                                    "type": "string",
                                    "example": "dns.dnsmadeeasy.com"
                                  },
                                  "email_count": {
                                    "type": "integer",
                                    "example": 10,
                                    "default": 0
                                  }
                                }
                              }
                            }
                          }
                        },
                        "txt": {
                          "type": "object",
                          "properties": {
                            "first_seen": {
                              "type": "string",
                              "example": "2017-05-26"
                            },
                            "values": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "value": {
                                    "type": "string",
                                    "example": "v=spf1 a mx include:spf.google.com include:sendgrid.net  include:spf.mandrillapp.com"
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"message\": \"The requested domain has invalid characters\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "The requested domain has invalid characters"
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```