Censys · JSON Structure

Platform Searchaggregateinputbody Structure

SearchAggregateInputBody schema from Censys Platform API

Type: object Properties: 5 Required: 3
SecurityInternet IntelligenceAttack Surface ManagementThreat Huntingcyber-threat-intelligenceOSINTInternet ScanningCertificatesAsset Discovery

SearchAggregateInputBody is a JSON Structure definition published by Censys, describing 5 properties, of which 3 are required. It conforms to the https://json-structure.org/meta/core/v0/# meta-schema.

Properties

count_by_level field filter_by_query number_of_buckets query

Meta-schema: https://json-structure.org/meta/core/v0/#

JSON Structure

Raw ↑
{
  "$schema": "https://json-structure.org/meta/core/v0/#",
  "$id": "https://raw.githubusercontent.com/api-evangelist/censys/refs/heads/main/json-structure/platform-searchaggregateinputbody-structure.json",
  "name": "SearchAggregateInputBody",
  "description": "SearchAggregateInputBody schema from Censys Platform API",
  "type": "object",
  "required": [
    "query",
    "field",
    "number_of_buckets"
  ],
  "additionalProperties": false,
  "properties": {
    "count_by_level": {
      "type": "string",
      "description": "Specifies which document level's count is returned per term bucket, primarily for nested fields. This is the same functionality available in the Count By dropdown in the Report Builder UI. When aggregating on nested fields like 'host.services.port': empty string (default) counts documents at the deepest level containing the field; '.' counts root documents (e.g. counts matching 'host'); 'host.services' counts documents at the specified nested level."
    },
    "field": {
      "type": "string",
      "description": "field to aggregate by"
    },
    "filter_by_query": {
      "type": "boolean",
      "description": "Controls whether aggregation results are limited to values that match the query. When true, only field values that satisfy the query constraints are included in aggregation counts. When false, aggregation includes all field values from records that match the query, even if those specific field values don't match the query constraints. For example, if the query is 'host.services.protocol=SSH' and you are aggregating by 'host.services.port' - when true, only shows SSH ports; when false, shows all ports on hosts that have SSH services.",
      "default": false
    },
    "number_of_buckets": {
      "type": "int64",
      "description": "number of buckets to split results into",
      "minimum": 1,
      "maximum": 2000
    },
    "query": {
      "type": "string",
      "description": "CenQL query string to search upon"
    }
  }
}

Work with this as data

Every JSON Structure here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for json structure

4 MCP tools reach this
  • find_json_structuresBrowse and filter every JSON Structure in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Structure
curl "https://apis.io/api/v1/json-structures/platform-searchaggregateinputbody-structure"
All json structure
curl "https://apis.io/api/v1/json-structures?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.