DEV Community

Cover image for 128.1B certs, 244ms: I probed ctlogs.dev free API
frank chu
frank chu

Posted on

128.1B certs, 244ms: I probed ctlogs.dev free API

128.1 billion log entries, 30.3 billion certificates, and google.com alone has 106,575 certificates in the current window. That's ctlogs.dev, a searchable index of every public Certificate Transparency log, and I probed its free JSON API to see if the speed claims survive contact with a real client.

The pitch: all 84 active CT logs plus 115 archived ones, 6.8 billion distinct hostnames, history back to 2013, domain lookups in 25–30 ms server-side. Anonymous use is free (200 requests/day per address, 100/hour, first 10 pages). No key needed for a quick look, so I took one.

What I measured

import requests, time
S = requests.Session()
for path in ['/v1/domain/example.com', '/v1/hosts/google.com',
             '/v1/org?q=PayPal%2C%20Inc.', '/v1/subdomains/example.com']:
    t = time.perf_counter()
    r = S.get('https://api.ctlogs.dev' + path, timeout=30)
    print(path, r.status_code, round((time.perf_counter()-t)*1000), 'ms',
          'server duration_ms:', r.json().get('duration_ms'))
Enter fullscreen mode Exit fullscreen mode
/v1/domain/example.com        e2e median 244ms   duration_ms 36
/v1/hosts/google.com          e2e ~206-247ms     duration_ms 544
/v1/org?q=PayPal, Inc.        e2e ~259-267ms     duration_ms 458
/v1/subdomains/example.com    e2e ~231-233ms     duration_ms 97
Enter fullscreen mode Exit fullscreen mode

Two things stand out. First, end-to-end from my VM is ~240 ms, dominated by network, not the index — fine. Second, the reported duration_ms was identical across repeated calls (36, 36, 36) and for hosts/org it was slower than my end-to-end time, which means it's the cached computation time of the result, not your request's. Not a scandal, but don't build dashboards on that field.

The data is the interesting part

google.com        certs: 106,575   (apex alone, current window)
*.google.com      certs: 524
github.com        53 hostnames total, 31 certs on the apex
example.com       17 certificates, newest issued 2026-11-24
Enter fullscreen mode Exit fullscreen mode

Google's apex count is what automated issuance at scale looks like — and paging into /v1/domain/google.com shows certificates valid for exactly one day (2026-10-21 to 2026-10-22). Short-lived certs plus CT logging equals a firehose: 128.1B entries over 30.3B certificates is 4.2 log entries per certificate, because every cert lands in multiple logs as both precertificate and final entry.

The free tier's edges are also exactly where the docs say. Domain search paginates anonymously (page 2 of google.com returned 200). Hosts search does not: page 2 answered 403 {"error":"paging /v1/hosts requires an API key"}. The 90-day window applies to every plan for hosts/serial/SPKI; deep archive back to 2013 is Pro. Responses carry history_truncated: true when older records exist beyond the window, which is the honest way to do it.

Verdict

The index is real and fast enough that network latency is your bottleneck. For attack-surface mapping — every hostname that ever held a cert under a domain — this is crt.sh with an actual API and cursor pagination. The caveats: anonymous quota is for a quick look, not a pipeline (200/day, org search counts as 10), and the full-history product is the paid tier. If you only need the current 90-day surface, the free key's 10,000 credits/month goes a long way.

What I didn't verify: the 128.1B total itself (I can't recount 199 logs from here), ingestion freshness per log, and paid-plan behavior. The counts above are the API's own answers to my queries on December 5, 2026.

Sources: ctlogs.dev, API docs for agents.

Top comments (2)

Collapse
 
userxnom profile image
Abdullah Naseer •

Frank, the measurement that sticks with me is the one that should not be possible: /v1/hosts/google.com reporting duration_ms 544 while your end-to-end was 206-247 ms. Server time cannot exceed total time, so that field has to be the cached computation time, as you say — which makes it a trap for anyone building a latency dashboard on it. The cleanest test would be a cold query: pick a domain nobody has looked up recently, hit it once, and see whether duration_ms on the first call is much larger than on the repeat. If the first call is slower and the repeat drops to a stable number, that confirms the cache story and gives you the real compute cost. And the 4.2 entries per certificate (128.1B over 30.3B) reframes the 106,575 google.com certs nicely — most of that is precert plus final across 84 active logs, not 106k distinct issuances. Did the one-day certs (2026-10-21 to 2026-10-22) show up as one precert/final pair per log, or did you see more entries per cert than that?

Collapse
 
member_7c8c7e8d profile image
Max K. •

Good catch on duration_ms being larger than end-to-end latency. I have seen teams wire server-reported timing fields straight into p95 alerts and then spend an afternoon chasing phantom slowdowns that were actually cached query costs. Also appreciate that ctlogs.dev returns history_truncated explicitly rather than silently cutting off results at 90 days, which is a trap with a lot of security APIs. Did you notice whether the 200 requests per day anonymous quota resets on a rolling window or at UTC midnight?