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

# Search count

Returns the precise number of search results that matched the search query.

[block:api-header]
{
  "title": "Options for search params:"
}
[/block]

[block:html]
{
  "html": "<div class=\"rdmd-table\">\n    <div class=\"rdmd-table-inner\">\n        <table>\n            <thead>\n            <tr>\n                <th style=\"text-align: left;\">Search parameter</th>\n                <th style=\"text-align: left;\">Operator</th>\n                <th style=\"text-align: left;\">Value</th>\n            </tr>\n            </thead>\n            <tbody>\n            <tr>\n                <td style=\"text-align: left;\"><strong>domain</strong><br>\n                </td>\n                <td style=\"text-align: left;\"><code class=\"rdmd-code lang-\" data-lang=\"\" name=\"\">\n                    <div class=\"cm-s-neo\">eq</div>\n                </code></td>\n                <td style=\"text-align: left;\">Search autonomous systems where the provided domain name is hosted.<br>\n                    <code class=\"rdmd-code lang-\" data-lang=\"\" name=\"\">\n                        <div class=\"cm-s-neo\">string</div>\n                    </code></td>\n            </tr>\n            <tr>\n                <td style=\"text-align: left;\"><strong>ip</strong><br>\n                </td>\n                <td style=\"text-align: left;\"><code class=\"rdmd-code lang-\" data-lang=\"\" name=\"\">\n                    <div class=\"cm-s-neo\">eq</div>\n                </code></td>\n                <td style=\"text-align: left;\">Search the autonomous system the provided IP address belongs to.<br>\n                    <code class=\"rdmd-code lang-\" data-lang=\"\" name=\"\">\n                        <div class=\"cm-s-neo\">string</div>\n                    </code></td>\n            </tr>\n            <tr>\n                <td style=\"text-align: left;\"><strong>as_org</strong><br>\n                </td>\n                <td style=\"text-align: left;\"><code class=\"rdmd-code lang-\" data-lang=\"\" name=\"\">\n                    <div class=\"cm-s-neo\">eq</div>\n                </code>, <code class=\"rdmd-code lang-\" data-lang=\"\" name=\"\">\n                    <div class=\"cm-s-neo\">contains</div>\n                </code>, <code class=\"rdmd-code lang-\" data-lang=\"\" name=\"\">\n                    <div class=\"cm-s-neo\">starts</div>\n                </code></td>\n                <td style=\"text-align: left;\">Search the autonomous systems by the associated organization name.<br>\n                    <code class=\"rdmd-code lang-\" data-lang=\"\" name=\"\">\n                        <div class=\"cm-s-neo\">string</div>\n                    </code></td>\n            </tr>\n            <tr>\n                <td style=\"text-align: left;\"><strong>asn</strong></td>\n                <td style=\"text-align: left;\"><code class=\"rdmd-code lang-\" data-lang=\"\" name=\"\">\n                    <div class=\"cm-s-neo\">eq</div>\n                </code></td>\n                <td style=\"text-align: left;\">Search the autonomous system by its number.<br>\n                    <code class=\"rdmd-code lang-\" data-lang=\"\" name=\"\">\n                        <div class=\"cm-s-neo\">string</div>\n                    </code></td>\n            </tr>\n            </tbody>\n        </table>\n    </div>\n</div>"
}
[/block]

# 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": {
    "/as/search/count": {
      "post": {
        "description": "Returns the precise number of search results that matched the search query.",
        "tags": [
          "Autonomous Systems"
        ],
        "summary": "Search count",
        "operationId": "as_search_count",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchASCountRequest"
              }
            }
          },
          "x-go-name": "Body"
        },
        "responses": {
          "200": {
            "description": "Operation successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TotalCountResponse"
                }
              }
            }
          },
          "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": {
      "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"
          }
        }
      },
      "SearchASCountRequest": {
        "type": "object",
        "required": [
          "search_params"
        ],
        "properties": {
          "search_params": {
            "description": "A list of AS attributes to filter the search results by. A comprehensive list of valid search parameters is shown in the table below.",
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {
                "$ref": "#/components/schemas/SearchParam"
              }
            },
            "x-go-name": "SearchParams"
          }
        }
      },
      "SearchParam": {
        "description": "Search parameter name.",
        "type": "object",
        "title": "search parameter",
        "required": [
          "operator",
          "value"
        ],
        "properties": {
          "operator": {
            "description": "Search parameter operator.",
            "type": "string",
            "x-go-name": "Operator",
            "example": "eq"
          },
          "value": {
            "description": "Search parameter value.",
            "type": "string",
            "x-go-name": "Value"
          }
        }
      },
      "TotalCountResponse": {
        "description": "TotalCountResponse includes returning data",
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/TotalCountResponseData"
          }
        }
      },
      "TotalCountResponseData": {
        "type": "object",
        "properties": {
          "total_items": {
            "description": "The precise number of search results that matched the search query.",
            "type": "integer",
            "format": "int64",
            "x-go-name": "TotalCount"
          }
        }
      }
    }
  },
  "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
    }
  }
}
```