Concepts

Freshness and caching

Choose how fresh your data must be, and pay less when older data is acceptable.

Every read accepts a freshness parameter: live, 24h, 7d, or 30d. Fresher costs more. If you do not pass the parameter, the default is 24h.

curl "https://api.openhandle.dev/v1/tiktok/profiles/@tiktok?freshness=7d" \
  -H "Authorization: Bearer $OPENHANDLE_API_KEY"

The tiers

FreshnessYou getPrice behavior
liveData fetched right nowLive price, always
24hData at most 24 hours oldCache price on a hit, live price on a miss
7dData at most 7 days oldCache price on a hit, live price on a miss
30dData at most 30 days oldFree on a hit, live price on a miss

See pricing for the exact per-request rates.

Cache misses cost the live price

A freshness tier is a maximum acceptable age, not a guaranteed discount. When no answer within your accepted age exists, we fetch live data and the request bills at the live price. Every successful answer meets the freshness limit you selected.

Know what you received

The envelope always tells you the truth about what you got:

  • source is live or cache.
  • capturedAt is when the data was actually captured.

If your application logs these two fields, you can audit exactly what you paid for and how old every answer was.

Choosing a tier

  • Rendering a dashboard someone refreshes often: 24h is usually right.
  • Analytics or trend jobs over many accounts: 7d or 30d cuts cost sharply.
  • Moderation, alerting, or anything user-triggered: live.

On this page