---
agentTools:
  projectIndex: https://spyse-dev.readme.io/llms.txt
---

# DNS history count

Returns the number of historical DNS records about the given domain name.

# OpenAPI definition

````json
{
  "openapi": "3.0.0",
  "info": {
    "description": "The purpose of this application is to provide authorized access to the data of the spyse project.",
    "title": "Data API",
    "version": "4.0.0"
  },
  "paths": {
    "/history/dns/count/{domain_name}": {
      "get": {
        "description": "Returns the number of historical DNS records about the given domain name.",
        "tags": [
          "History"
        ],
        "summary": "DNS history count",
        "operationId": "dns_history_count",
        "parameters": [
          {
            "description": "The domain name. Example: ```google.com```",
            "name": "domain_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Operation successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DNSHistoryCountResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://api.spyse.com/v4/data/"
    }
  ],
  "security": [
    {
      "api_key": []
    }
  ],
  "components": {
    "securitySchemes": {
      "api_key": {
        "type": "http",
        "scheme": "bearer"
      }
    },
    "schemas": {
      "DNSHistoryCountResponse": {
        "description": "DNSHistoryCountResponse includes returning data",
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/DNSHistoryCountResponseData"
          }
        }
      },
      "DNSHistoryCountResponseData": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DNSHistoryCounter"
            },
            "x-go-name": "Items"
          }
        }
      },
      "DNSHistoryCounter": {
        "type": "object",
        "properties": {
          "count": {
            "description": "The total number of DNS records.",
            "type": "integer",
            "format": "int64",
            "x-go-name": "Count"
          },
          "type": {
            "description": "DNS record type.",
            "type": "string",
            "x-go-name": "Type"
          }
        }
      },
      "Error": {
        "description": "Error is represents response error model",
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "x-go-name": "Code"
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FieldError"
            },
            "x-go-name": "Errors"
          },
          "message": {
            "type": "string",
            "x-go-name": "Message"
          }
        }
      },
      "ErrorResponse": {
        "description": "ErrorResponse is returned on request handling error",
        "type": "object",
        "properties": {
          "error": {
            "$ref": "#/components/schemas/Error"
          }
        }
      },
      "FieldError": {
        "description": "FieldError is represents response fields error model",
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "x-go-name": "Code"
          },
          "location": {
            "type": "string",
            "x-go-name": "Location"
          },
          "message": {
            "type": "string",
            "x-go-name": "Message"
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 96,
      "1": 116,
      "2": 57,
      "3": 140,
      "4": 54,
      "5": 155,
      "6": 214,
      "7": 2,
      "8": 125,
      "9": 74,
      "10": 155,
      "11": 87
    }
  }
}
````