SSL/TLS Certificates API v2

https://api.codepunch.com/tlscerts/v2

Search certificate records sourced from Certificate Transparency data, filter them by date and hour, retrieve recent records after a configurable settling gap, and fetch parsed certificate detail by result ID.

The v2 API returns JSON. Authenticate through the standard API v2 flow described in the API v2 overview, then use the returned token in the request path.

Keyword filtering is supported, but this reference intentionally does not promise wildcard/operator syntax or a specific indexed-field scope. Use plain search terms unless your integration has separately verified additional search behaviour.

Counts and Pagination

Normal certificate searches and stats mode use the same records field for different purposes, so check the selected data mode.

normal mode

records is the number of rows in the current returned page. Use start and limit to request additional pages.

dm=stats

records is the matching count for the same keyword/date predicate. The response omits the normal data page and removes start/limit.

zero matches

A successful normal search can return records=0, data=[], and status=false without an error field. Client code should treat an explicit error as failure rather than assuming every status=false certificate-search response is an error.

# Count a filtered result set.
GET .../certificates?date=20260911&kw=example&dm=stats

# Request the first page using the same filters.
GET .../certificates?date=20260911&kw=example&start=0&limit=500

This reference does not publish a deep-offset or full-dataset traversal guarantee. Design bulk consumers around the documented page controls and the result range your integration has verified.

Recent Certificates

GET /{token}/recent

Returns the newest qualifying certificate rows that are older than a configurable settling gap. This endpoint does not implement a rolling "last N hours" window: there is no lower time bound.

With the default timegap=2, the query excludes rows whose selected timestamp is within the newest two hours, then returns the newest qualifying rows older than that cutoff.

timegap integer optional

Settling/exclusion gap in hours. Default 2; accepted range 0 through 168. The response reports timegap in seconds.

limit integer optional

Number of rows to return. Default 50; values are constrained to 10 through 5000. This endpoint has no start offset.

kw string optional

Optional keyword filter. Non-empty values shorter than three characters are ignored and produce a warning.

dts enum optional

valid_from or recorded_at. Default valid_from. recorded_at uses the certificate-recorded timestamp for the cutoff and ordering.

itc integer optional

Duration-filter control. Default 1 applies the current v2 filter valid_to - valid_from > 100000 seconds. Set itc=0 to disable that filter.

Each item is returned under certificates with subject_cn, SAN-derived hostnames, validity and recorded timestamps/UTC strings, issuer, serial, and thumprint_sha_256. The current v2 hostnames array should not be assumed to include subject_cn unless that name is also present in SAN data.

GET .../recent?timegap=2&limit=50&dts=recorded_at

{
  "status":      true,
  "date_source": "recorded_at",
  "timegap":     7200,
  "records":     1,
  "certificates": [
    {
      "hostnames":       ["www.example.com"],
      "subject_cn":      "example.com",
      "valid_from_ts":  1789084800,
      "valid_from":     "2026-09-11 00:00:00 GMT",
      "issuer_cn":      "Example CA",
      "serial":         "04A1...",
      "recorded_at_ts": 1789084920,
      "recorded_at":    "2026-09-11 00:02:00 GMT"
    }
  ]
}

The response also exposes records_from_time near the cutoff. Because the query has no lower bound, do not interpret that field as the beginning of a returned rolling window.

Certificate Detail

GET /{token}/certificate/{id}

Use the id returned by /certificates to retrieve parsed certificate detail. The v2 handler uses the indexed row to locate the original Certificate Transparency entry and can return either an X.509 certificate or a precertificate.

The top-level certificate array contains items shaped as ["x509"|"precert", parsed_certificate]. Parsed detail comes from OpenSSL certificate parsing and is augmented with validFrom_date_time, validTo_date_time, thumprint_sha_256, and the PEM-encoded certificate.

Detail retrieval depends on the original CT log entry being available. Inspect each returned certificate item as well as the top-level status: a located row whose CT entry cannot be fetched can be represented as an item with "Error": "Not found".