Which API calls count as traffic?
All outgoing traffic, whether cached or uncached, counts as traffic on our end. This includes assets (uploading via Storyblok UI and delivered via Image Service), the APIs (content delivery API, Management API, GraphQL API), Webhook payloads, etc. In essence, every API call contributes to the overall traffic count. And yes, the size of what's being sent matters.
You can review the specifics of your API requests for your space on your dashboard .
Let's explore a couple of examples:
Understanding Asset Requests
- Consider the default size of the image below. 1
- You can utilize Storyblok's Image Service to reduce the image size. 12
/m/
at the end of the image URL significantly reduces its size, reducing your overall traffic. - For even more traffic savings, if you need a smaller image, check out the example below. 12
Understanding API Request Sizes
- Let's examine an API request fetching a single story. 1
- Now, consider another API request fetching all stories. 1
By optimizing both asset and API request sizes, you ensure efficient traffic management and contribute to a faster, more optimized website.
Let's say that you have an image size of around 1MB and it is used on a page that receives 100,000 visitors daily, your total traffic would be 100,000 MB or 100 GB daily. In cases like this, it’s best to check if there is a way to reduce the image size. If it’s an animated GIF or a video file, optimizing them can help reduce your total traffic usage. Alternatively, you can serve those images statically from your codebase via your hosting service if that costs you less, reducing overall Storyblok traffic usage.
For insights on optimizing your API calls and implementing effective caching strategies, we recommend exploring our comprehensive guide: Optimizing Your Caching Strategy with Storyblok.