Skip to main content

Search Hosts

Accepts queries for host or service attributes provided in the Censys Search Language and returns a list of matching hosts with some summary fields.

Cursor Pagination

Search endpoints rely on using cursors for efficient pagination.

Each search result may return a next and prev cursor value which can be used to fetch additional pages of results.

{
"links":{
"prev":"prevCursorToken",
"next":"nextCursorToken"
},
[Rest of Response]
}

The returned cursor token values can be added to the search endpoint as a cursor parameter to fetch either the next page of results or the previous page.

The entire set of results can be iterated page-by-page using returned cursors. If no cursor is given, the first page will be returned.

Basic Parameters

ParameterDescription
FieldsComma separated list of up to 25 fields to be returned for each result. (This parameter is only available to paid users.).
QueryQuery used to search for hosts with matching attributes. Uses the Censys Search Language.

Advanced Parameters

ParameterDescription
CursorCursor token from the API response, which fetches the next or previous page of hits when added to the endpoint URL.
Per PageThe maximum number of hits to return in each response (minimum of 1, maximum of 100).
SortSort the results.
Virtual HostsDetermine how to query Virtual Hosts. The default is EXCLUDE which will ignore any virtual hosts entries.When set to INCLUDE or ONLY virtual hosts will be present in the returned list of hits, with the laterreturning only virtual hosts.To learn more, see the Help Desk article on Virtual Hosts.

Example Output

{
"code": 200,
"result": {},
"status": "OK"
}

Workflow Library Example

Search Hosts with Censys and Send Results Via Email

Workflow LibraryPreview this Workflow on desktop