#engineering

"Designing a sub-200ms enrichment API: caches, tiers, and confidence scores"

"The engineering principles behind Scrapeeg's request path: edge caching, tiered fetching, confidence scoring instead of binary flags, and backpressure that protects everyone."

An enrichment API lives or dies on two numbers: latency and honesty. Here are the design principles we build Scrapeeg around.

The request path

Every lookup follows the same three-stage path:

  1. Edge cache — hot domains (the top few thousand companies) are served from cache with a strict TTL. This is where sub-200ms comes from for most traffic.
  2. Index lookup — a miss hits the structured index: canonical entity, known contacts, provenance timestamps.
  3. Tiered live fetch — only cold or stale domains trigger live collection, routed through the cheapest fetch tier that meets the target's protection level.

The rule: live fetching is the exception, not the path. That keeps latency low and keeps us polite to the web.

Confidence scores, not binary flags

"Verified / not verified" hides reality. We score every record: source agreement, recency, mailbox behavior, pattern risk. The API surfaces the score so your pipeline can decide — a recruiting workflow tolerates different risk than a cold-email workflow. Binary flags force one threshold on every customer; scores respect yours.

Backpressure and fairness

Rate limits are per key and per target tier, enforced before work starts. A single customer's burst must never degrade another customer's p95. When limits trip, requests are rejected with retry semantics rather than silently degrading results — predictable failure beats quiet corruption.

Logging as a product feature

Every request logs: tier used, latency, score distribution, credits charged. That log is what powers usage dashboards, and what lets us answer a customer's "why this record?" question with evidence instead of vibes.

Why this matters to you

Architecture is a procurement document. When you evaluate us — or anyone — ask how cache TTLs interact with freshness claims, and how verification labels are produced. We publish our compliance posture on the trust page, our schemas in the docs, and the economic case for renting this complexity in build vs. buy.

Written by Scrapeeg Engineering

We build enrichment infrastructure and write about what we learn: data quality, deliverability, compliance, and API design. Corrections and questions welcome via the contact page.

Put this into production

Get 250 free enrichment credits — no credit card required.

Get your API key

Related reading

← Back to all articles