Skip to content

Caching & freshness

Responses arrive in seconds; popular content returns in milliseconds because we cache aggressively. Caching is visible and controllable:

  • Every response carries x-cache: hit or x-cache: miss.
  • Cache hits cost the same credits as fresh fetches — the difference is latency.
  • Add fresh=true to any call to bypass the cache at the same price.
Terminal window
curl -sD - "https://api.scrapersocial.com/v1/twitter/stats?url=..." \
-H "Authorization: Bearer sk_live_..." -o /dev/null | grep -i x-cache
# x-cache: hit

Cache classes

Each endpoint has a freshness class, shown on its reference page:

ClassBehaviorTypical endpoints
Cached foreverContent that never changesTranscripts, AI summaries
Cached 7 daysMedia metadata (resolved media URLs expire within 1 hour)Downloads
Cached 12 hoursSlow-moving profile dataChannel/profile/company stats
Cached 3 hoursRecent-content lists (page 1 refreshes hourly)Channel posts, timelines
Age-awareFresher content refreshes faster (15 min floor, 7 day max)Post stats, comments, search

“Age-aware” scales with how old the content is: stats for a video posted an hour ago refresh every few minutes; stats for a two-year-old video refresh daily.

When to force freshness

r = httpx.get(f"{BASE}/v1/tiktok/stats",
params={"url": video_url, "fresh": "true"},
headers=H)

Use fresh=true for point-in-time measurements (end-of-campaign reporting, billing reconciliations). For dashboards and monitoring, the default freshness windows are almost always the better trade.

Next: Errors · Rate limits