Censys API

Security / API Key Intermediate HTTPS
Varies by plan (check documentation)

Overview

Censys is an internet-wide scanning platform that lets you search for any internet-connected host, device, or certificate using its REST API. Researchers and security teams use it to discover exposed services, map attack surfaces, and track certificate issuance. It indexes billions of records and refreshes data frequently.

💡

Beginner Tip

Use the /v2/hosts/search endpoint to start exploring — simple queries like "services.port: 443 and location.country: JP" work without any special syntax knowledge. Sign up for a free account to get API credentials immediately.

Available Data

Censys data via REST API
JSON-formatted response data
Requires API key authentication

Example Response

JSON Response
{
  "status": "success",
  "data": {
    "result": "Data from Censys",
    "description": "Search engine for Internet connected host and devices",
    "timestamp": "2025-01-15T10:00:00Z"
  }
}

Field Reference

result.hits List of host objects matching the search query.
result.hits[].ip IP address of the discovered internet host.
result.hits[].services List of services detected on the host, each with port and protocol info.
result.total Total number of hosts matching the query across all pages.
result.links.next Cursor token to retrieve the next page of results.

Implementation Example

// ⚠️ Note: This URL may be a documentation page. Check official docs for actual API endpoint.
const url = "https://search.censys.io/api";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "X-API-Key": "YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

401 Unauthorized The API ID or secret is wrong, or Basic Auth is not encoded correctly.
Censys uses HTTP Basic Auth — encode your App ID and Secret as "APP_ID:APP_SECRET" in Base64.
429 Rate Limit Exceeded Free accounts have a low request-per-minute limit.
Add sleep between requests or upgrade to a paid plan. Check your quota at account.censys.io.
400 Bad Request The query syntax is invalid or uses an unsupported field name.
Use the Censys query playground at search.censys.io to validate your query before using the API.

Matrix Score Breakdown

🌐 Reachability 0/30
⚡ Speed 20/20
🔒 Security 15/15
🛠 Developer XP 9/20
✓ Reliability 0/15

Partially tested on Apr 5, 2026

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS NO
Category Security
Difficulty Intermediate
Verified: 2026-04-04

Similar APIs

View All →