# DNS history by record type

Lists out specific historical information about the given hostname parameter

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "SecurityTrails API",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.securitytrails.com/v1"
    }
  ],
  "security": [
    {}
  ],
  "paths": {
    "/history/{hostname}/dns/{type}": {
      "get": {
        "summary": "DNS history by record type",
        "description": "Lists out specific historical information about the given hostname parameter",
        "operationId": "dns-history-by-record-type-old",
        "parameters": [
          {
            "name": "hostname",
            "in": "path",
            "schema": {
              "type": "string",
              "default": "oracle.com"
            },
            "required": true
          },
          {
            "name": "type",
            "in": "path",
            "description": "allowed values: a, aaaa, mx, ns, soa or txt",
            "schema": {
              "type": "string",
              "default": "a"
            },
            "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"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "The page of the returned results",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"pages\": 1,\n  \"type\": \"a/ipv4\",\n  \"records\": [\n    {\n      \"first_seen\": \"2017-05-26\",\n      \"values\": [\n        {\n          \"ip\": \"200.121.20.1\",\n          \"ip_count\": 10231\n        }\n      ],\n      \"organizations\": [\n        \"netDNA\"\n      ],\n      \"last_seen\": \"2016-05-31\"\n    },\n    {\n      \"first_seen\": \"2017-05-26\",\n      \"values\": [\n        {\n          \"ip\": \"200.121.20.1\",\n          \"ip_count\": 10231\n        }\n      ],\n      \"organizations\": [\n        \"netDNA\"\n      ],\n      \"last_seen\": \"2016-05-31\"\n    },\n    {\n      \"first_seen\": \"2017-05-26\",\n      \"values\": [\n        {\n          \"ip\": \"200.121.20.1\",\n          \"ip_count\": 10231\n        }\n      ],\n      \"organizations\": [\n        \"netDNA\"\n      ],\n      \"last_seen\": \"2016-05-31\"\n    }\n  ]\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "pages": {
                      "type": "integer",
                      "example": 1,
                      "default": 0
                    },
                    "type": {
                      "type": "string",
                      "example": "a/ipv4"
                    },
                    "records": {
                      "type": "array",
                      "items": {
                        "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
                                }
                              }
                            }
                          },
                          "organizations": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "example": "netDNA"
                            }
                          },
                          "last_seen": {
                            "type": "string",
                            "example": "2016-05-31"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "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
  }
}
```