v1

latestOpenAPI 3.1.02026-07-2481742657.4 KB
Collections

Run a search query within a collection

Run a search query across a collection's assets. Reference the documentation on Censys Query Language for information about query syntax. Host services that match your search criteria will be returned in a matched_services object.

post/v3/collections/{collection_uid}/search/query

Path parameters

collection_uidstring required

The UID for the collection

The UID for the collection

Query parameters

organization_idstring uuid required

The ID of a Censys organization to associate the request with. See the Getting Started docs for more information.

Example:11111111-2222-3333-4444-555555555555

The ID of a Censys organization to associate the request with. See the Getting Started docs for more information.

Headers

X-Organization-IDstring uuid

The ID of a Censys organization to associate the request with. See the Getting Started docs for more information. Note: The header parameter is supported for atypical use cases; we recommend always providing this field via the query parameter.

Example:11111111-2222-3333-4444-555555555555

The ID of a Censys organization to associate the request with. See the Getting Started docs for more information. Note: The header parameter is supported for atypical use cases; we recommend always providing this field via the query parameter.

Request body

fieldsstring[] nullable

Specify fields to only return in the response. If you provide fields and omit host.services.port, host.services.transport_protocol, and host.services.protocol, then matched_services will not be returned in the response.

page_sizeinteger nullable

Number of results to return to per page. The default and maximum is 100.

page_tokenstring

page token for the requested page of search results

querystring required

CenQL query string to search upon

Example request

{
  "query": "host.services: (protocol=SSH and not port: 22)"
}

Response

OK