Caching/Latency

Freshness windows, stored snapshots, batches, and timeouts.

maxAgeHours: 0 asks for live data and stores successful results with a timestamp.

maxAgeHours > 0 allows a stored snapshot when the snapshot is fresh enough. Stored results usually return faster and bill at half the live credit rate.

Batches

The API accepts up to 200 URLs per request. URLs are fetched concurrently, but the request finishes when the slowest live lookup finishes.

Use smaller live batches when latency matters. Use a freshness window for enrichment jobs where a recent stored result is good enough.

Timeouts

The public API wrapper has a 25 second maximum duration. The origin worker times out live origin work before that so it can return a short upstream_timeout error.

If a request times out, retry with fewer URLs or set maxAgeHours to allow stored results.

Storage

The app stores successful snapshots in PostgreSQL today. The Cloudflare origin worker also stores successful live fetches in the edge cache for later freshness-window requests, but that cache is opportunistic rather than durable.

Payload size varies by company:

  • compact company payloads are commonly around 1 to 3 KB
  • products, locations, funding, and posts increase payload size
  • stored snapshots are overwritten when a live refresh returns newer data