CachingMenu
Caching
Re-read data you already fetched for free. You decide, per request, how old a result is allowed to be.
How it works
Every successful live request is stored for 14 days. When you add cache_days to a request, we first look for a stored result for the same endpoint and target that is at most that many days old.
- Found: you get the stored result immediately, for 0 credits, with
meta.cached: trueand theX-Cache: HITheader. - Not found: the request goes to the platform like any live request, is charged normally, and its result becomes available for later cache hits.
Without cache_days every request returns live data. Cache windows are set in whole days, from 1 to 14.
Example
curl -X POST https://api.scrapeeverything.com/v1/instagram/profile \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"username":"kumsal.studio","cache_days":3}'What counts as the same request
Results are matched on the endpoint and its normalized parameters. nasa, @nasa and https://www.instagram.com/nasa/ all point to the same cached profile. A different limit on a feed endpoint is a different request.
Your cache is private
Cached results belong to your account. Another customer requesting the same profile never receives your result, and your cache hits never reveal what others fetched.
When to use it
| Use case | Suggested cache_days |
|---|---|
| Showing a profile card or preview on your site | 1 to 3 |
| Daily reports and dashboards | 1 |
| Enriching CRM or lead records | 7 to 14 |
| Live counters, giveaways, real-time monitoring | Leave it out |