Skip to content
OSINTtools.io

Censys API

Internet-wide scan data for hosts, services and certificates, searchable through the Censys Platform.

Base URL
https://api.platform.censys.io
Sign-in
Bearer token
Free tier
Free tier
Pricing
Credits
Format
REST
Endpoints
7

Compiled by OSINTtools.io editors from docs.censys.com · updated Nov 29, 2026Work on this API? Claim it to keep these docs currentReport a mistake

Introduction

The Censys Platform API returns Censys's internet scan data: hosts (by IP address) with their services, software, labels, location, autonomous system, DNS names and WHOIS; web properties (a hostname and port); and TLS certificates (by SHA-256 fingerprint). It also runs searches and aggregate reports written in the Censys Query Language (CenQL), and shows a host's event history.

An investigator uses it to see what an IP address exposes and how that changed over time, to read a certificate, and to find other hosts, web properties or certificates that share an indicator such as a banner, JARM or favicon hash.

Calls go to https://api.platform.censys.io with a Personal Access Token in Authorization: Bearer …. Accounts in an organization also send the organization ID as the organization_id query parameter (or the X-Organization-ID header); without it the user's free wallet is used where applicable. Responses are JSON with the data under result.

API calls consume credits: 1 per lookup, 1 per search page and 1 per aggregate report. Free users receive 100 credits a month and can only call host, web property and certificate lookups. Calls made with Try It on Censys's own docs also deduct credits.

Quick start

  1. Get a key

    Create an account with Censys and copy your bearer token (free tier). Where to get it

  2. Make your first request

    Get a host by IP address: services, software, location, AS, DNS, WHOIS. Replace YOUR_API_KEY and run it in a terminal, or use Try it on the endpoint.

    curl 'https://api.platform.censys.io/v3/global/asset/host/203.0.113.7' \
      -H 'Authorization: Bearer YOUR_API_KEY'
  3. Read the response

    A 200 response looks like this, shortened.

    {
      "result": {
        "resource": {
          "ip": "203.0.113.7",
          "location": {
            "city": "Amsterdam",
            "country": "Netherlands",
            "country_code": "NL",
            "continent": "Europe",
            "timezone": "Europe/Amsterdam"
          },
          "autonomous_system": {
            "asn": 64500,
            "name": "EXAMPLE-NET",
            "description": "Example Networks",
            "bgp_prefix": "203.0.113.0/24",
            "country_code": "NL"
          },
          "service_count": 2,
          "services": [
            {
              "port": 22,
              "protocol": "SSH",
              "scan_time": "2025-01-01T00:00:00Z"
    …

Authentication

Send your token in the Authorization header as Bearer YOUR_TOKEN.

A Personal Access Token from your Censys account settings. Organization accounts add organization_id.

Try it on this page keeps your key in your browser; it is never sent to OSINTtools.io.

Rate limits and pricing

Concurrent requests per organization: 1 on Free and Starter, 25 on Search and Core (over it: 429). 25 requests per second on all endpoints (over it: 503).

Free tier. Pricing: credits.

  • FreeFree · 100 credits per month plus 5 free Platform actions per day; basic visibility
  • Censys Starter$79/month · 500 credits a month, more API endpoints (search, aggregate, collections), tags
  • Censys Starter Pro$599/month · 4,000 credits a month, more collections and tags than Starter
  • CoreContact sales · 5+ users, 20K enrichment API calls/day, 1+ month data history
  • Adversary InvestigationContact sales · 5+ users, 3+ months history, searchable threat data, CensEye
  • Security OperationsContact sales · Unlimited users and enrichment API calls, 12+ months data history

Plans from docs.censys.com, checked Nov 25, 2026.

Errors

StatusMeaning
400Bad request
401The request does not contain a valid Authorization token
403The user does not have permission to access this data
404Not found
422Unprocessable entity: invalid input
429Concurrency limit exceeded
500General issue; try again later
503Requests-per-second limit exceeded

Lookups

  • Takes: IP address
  • Passive: the target is not contacted
  • Cost: 1 credit
  • Plan: All plans, including Free

Returns one host as Censys currently sees it, or at a past point in time with at_time. Use fields or exclude_fields (not both) to trim the response.

Path parameters

host_idstringrequiredtakes your ip address

The IP address of the host

Example: 203.0.113.7

Query parameters

organization_idstring

Censys organization ID (UUID). If omitted, the user's free wallet is used where applicable

Example: 11111111-2222-3333-4444-555555555555
at_timestring

RFC 3339 timestamp, to view the host at that point in time

Example: 2025-01-01T00:00:00Z
fieldsstring

Comma-separated fields to include, in dot notation; omit or * for all

Example: ip,location.country
exclude_fieldsstring

Comma-separated fields to leave out; cannot be combined with fields

Example: whois
Response fields · 11Show

ipstring

The host's IP address

services[]object

Services seen on the host: port, protocol, transport_protocol, software, labels, banner, cert, scan_time, threats, vulns

service_countinteger

Number of services

locationobject

city, province, country, country_code, continent, postal_code, timezone, coordinates, registered_country

autonomous_systemobject

asn, name, description, bgp_prefix, organization, country_code

dnsobject

DNS names associated with the host

whoisobject

WHOIS data for the address

operating_systemobject

Detected operating system

labels[]object

Labels Censys applied to the host

privacy[]object

Privacy services used by the IP, such as VPNs, proxies or Tor

extensionsobject

Additional data

curl 'https://api.platform.censys.io/v3/global/asset/host/203.0.113.7' \
  -H 'Authorization: Bearer YOUR_API_KEY'
Replace YOUR_API_KEY with your key
Response
{
  "result": {
    "resource": {
      "ip": "203.0.113.7",
      "location": {
        "city": "Amsterdam",
        "country": "Netherlands",
        "country_code": "NL",
        "continent": "Europe",
        "timezone": "Europe/Amsterdam"
      },
      "autonomous_system": {
        "asn": 64500,
        "name": "EXAMPLE-NET",
        "description": "Example Networks",
        "bgp_prefix": "203.0.113.0/24",
        "country_code": "NL"
      },
      "service_count": 2,
      "services": [
        {
          "port": 22,
          "protocol": "SSH",
          "scan_time": "2025-01-01T00:00:00Z"
        },
        {
          "port": 443,
          "protocol": "HTTP",
          "scan_time": "2025-01-01T00:00:00Z"
        }
      ]
    },
    "extensions": {}
  }
}

Get a host's event history between two times

GET/v3/global/asset/host/{host_id}/timeline

  • Takes: IP address
  • Passive: the target is not contacted
  • Plan: Not available to Free users (lookups only)

Lists events on a host: services scanned (including protocol changes after a new scan), forward and reverse DNS resolutions, location, route, JARM and WHOIS updates. start_time is the time closest to now and end_time the time furthest from now.

Path parameters

host_idstringrequiredtakes your ip address

IP address of the host

Example: 203.0.113.7

Query parameters

start_timestringrequired

RFC 3339 start of the timeline: the timestamp closest to now

Example: 2025-01-02T00:00:00Z
end_timestringrequired

RFC 3339 end of the timeline: the timestamp furthest from now

Example: 2025-01-01T00:00:00Z
organization_idstring

Censys organization ID (UUID)

Example: 11111111-2222-3333-4444-555555555555
Response fields · 6Show

events[]object

Events, each with resource and extensions

event_timestring

When the event happened

service_scannedobject

Set for a service scan event

forward_dns_resolvedobject

Set for a forward DNS event

whois_updatedobject

Set for a WHOIS update

scanned_tostring

Date the history has been scanned to

curl 'https://api.platform.censys.io/v3/global/asset/host/203.0.113.7/timeline?start_time=2025-01-02T00%3A00%3A00Z&end_time=2025-01-01T00%3A00%3A00Z' \
  -H 'Authorization: Bearer YOUR_API_KEY'
Replace YOUR_API_KEY with your key
Response
{
  "result": {
    "events": [
      {
        "resource": {
          "event_time": "2025-01-01T12:00:00Z",
          "service_scanned": {}
        },
        "extensions": {}
      }
    ],
    "scanned_to": "2025-01-02"
  }
}

Get a web property by hostname and port

GET/v3/global/asset/webproperty/{webproperty_id}

  • Takes: Domain
  • Passive: the target is not contacted
  • Cost: 1 credit
  • Plan: All plans, including Free

Returns one web property, identified as hostname:port (for example example.com:443): endpoints, software, certificate, TLS, JARM, labels, threats and vulnerabilities. Supports at_time, fields and exclude_fields.

Path parameters

webproperty_idstringrequired

Web property identifier: hostname and port

Example: www.example.com:443

Query parameters

organization_idstring

Censys organization ID (UUID)

Example: 11111111-2222-3333-4444-555555555555
at_timestring

RFC 3339 timestamp, to view the web property at that point in time

Example: 2025-01-01T00:00:00Z
fieldsstring

Comma-separated fields to include, in dot notation

Example: hostname,port,tls.cipher_selected
exclude_fieldsstring

Comma-separated fields to leave out; cannot be combined with fields

Example: cert,endpoints.http.body
Response fields · 9Show

hostnamestring

Hostname

portinteger

Port

scan_timestring

When it was scanned

endpoints[]object

Endpoints observed

software[]object

Software detected

certobject

Certificate presented

jarmobject

JARM fingerprint

threats[]object

Threats detected

vulns[]object

Vulnerabilities detected

curl 'https://api.platform.censys.io/v3/global/asset/webproperty/www.example.com%3A443' \
  -H 'Authorization: Bearer YOUR_API_KEY'
Replace YOUR_API_KEY with your key
Response
{
  "result": {
    "resource": {
      "hostname": "www.example.com",
      "port": 443,
      "scan_time": "2025-01-01T00:00:00Z",
      "endpoints": [],
      "software": [],
      "labels": []
    },
    "extensions": {}
  }
}

Get a certificate by its SHA-256 fingerprint

GET/v3/global/asset/certificate/{certificate_id}

  • Passive: the target is not contacted
  • Cost: 1 credit
  • Plan: All plans, including Free

Returns one certificate: fingerprints, parsed subject and issuer, validity period, serial number, names, CT log data, revocation and validation status.

Path parameters

certificate_idstringrequired

The SHA-256 certificate fingerprint

Example: 9a8b7c6d5e4f30211a2b3c4d5e6f708192a3b4c5d6e7f8091a2b3c4d5e6f7081

Query parameters

organization_idstring

Censys organization ID (UUID)

Example: 11111111-2222-3333-4444-555555555555
fieldsstring

Comma-separated fields to include, in dot notation

Example: fingerprint_sha256,parsed.subject_dn
exclude_fieldsstring

Comma-separated fields to leave out; cannot be combined with fields

Example: names,fingerprint_sha1
Response fields · 8Show

fingerprint_sha256string

SHA-256 fingerprint (the certificate's ID)

subject_dnstring

Subject distinguished name

issuer_dnstring

Issuer distinguished name

validity_periodobject

Validity period

serial_numberstring

Serial number

names[]string

Names on the certificate

added_atstring

When Censys added it

revokedboolean

Whether it is revoked

curl 'https://api.platform.censys.io/v3/global/asset/certificate/9a8b7c6d5e4f30211a2b3c4d5e6f708192a3b4c5d6e7f8091a2b3c4d5e6f7081' \
  -H 'Authorization: Bearer YOUR_API_KEY'
Replace YOUR_API_KEY with your key
Response
{
  "result": {
    "resource": {
      "fingerprint_sha256": "9a8b7c6d5e4f30211a2b3c4d5e6f708192a3b4c5d6e7f8091a2b3c4d5e6f7081",
      "parsed": {
        "subject_dn": "CN=www.example.com",
        "issuer_dn": "C=US, O=Example CA, CN=Example CA R1",
        "serial_number": "123456789"
      },
      "names": [
        "www.example.com",
        "example.com"
      ],
      "added_at": "2025-01-01T00:00:00Z"
    },
    "extensions": {}
  }
}
  • Passive: the target is not contacted
  • Cost: 1 credit per query, and 1 per further page
  • Plan: Not available to Free users (lookups only)

Runs a Censys Query Language search. Each hit is a host (host_v1), web property (webproperty_v1) or certificate (certificate_v1); matching host services come back in matched_services. Page through results with page_token.

Query parameters

organization_idstring

Censys organization ID (UUID)

Example: 11111111-2222-3333-4444-555555555555
Request body (JSON) · 4Show

querystringalways present

CenQL query string

page_sizeinteger

Results per page; default and maximum 100

page_tokenstring

Token for a specific page of results

fields[]string

Fields to return, e.g. host.ip

Response fields · 5Show

hits[]object

Matches: host_v1, webproperty_v1 or certificate_v1, plus tags

total_hitsnumber

Total number of matches

next_page_tokenstring

Token for the next page

previous_page_tokenstring

Token for the previous page

query_duration_millisinteger

Query time in milliseconds

curl -X POST 'https://api.platform.censys.io/v3/global/search/query' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"query":"host.services: (protocol=SSH and not port: 22)","page_size":1}'
Replace YOUR_API_KEY with your key
Response
{
  "result": {
    "hits": [
      {
        "host_v1": {
          "resource": {
            "ip": "198.51.100.23",
            "services": [
              {
                "port": 2222,
                "protocol": "SSH"
              }
            ]
          }
        }
      }
    ],
    "total_hits": 1520,
    "next_page_token": "EXAMPLE_PAGE",
    "previous_page_token": "",
    "query_duration_millis": 180
  }
}
  • Passive: the target is not contacted
  • Cost: 1 credit
  • Plan: Not available to Free users (lookups only)

The API form of the Report Builder: splits the results of a query into buckets by a field (country, ASN, port, ...) without fetching every record.

Query parameters

organization_idstring

Censys organization ID (UUID)

Example: 11111111-2222-3333-4444-555555555555
Request body (JSON) · 5Show

querystringalways present

CenQL query string

fieldstringalways present

Field to aggregate by

number_of_bucketsintegeralways present

Number of buckets, 1 to 2000

count_by_levelstring

Document level whose count is returned per bucket, for nested fields

filter_by_queryboolean

Count only field values that match the query (default false)

Response fields · 6Show

keystring

Bucket value

countinteger

Count in the bucket

total_countinteger

Total count

other_countinteger

Count outside the returned buckets

is_more_than_total_hitsboolean

Whether the result exceeds total hits

query_duration_millisinteger

Query time in milliseconds

curl -X POST 'https://api.platform.censys.io/v3/global/search/aggregate' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"query":"host.services.protocol=SSH","field":"host.services.port","number_of_buckets":100}'
Replace YOUR_API_KEY with your key
Response
{
  "result": {
    "buckets": [
      {
        "key": "22",
        "count": 900
      },
      {
        "key": "2222",
        "count": 120
      }
    ],
    "total_count": 1100,
    "other_count": 80,
    "is_more_than_total_hits": false,
    "query_duration_millis": 95
  }
}

Account

  • Passive: the target is not contacted
  • Cost: No credits
  • Plan: Free accounts

For Free user accounts; Starter and Enterprise accounts use the organization credit balance endpoint instead.

Response fields · 2Show

balanceinteger

Current credit balance

resets_atstring

When the credits reset

curl 'https://api.platform.censys.io/v3/accounts/users/credits' \
  -H 'Authorization: Bearer YOUR_API_KEY'
Replace YOUR_API_KEY with your key
Response
{
  "result": {
    "balance": 87,
    "resets_at": "2025-02-01T00:00:00Z"
  }
}