The real-time analytics API offers a standardized set of data about traffic received by a specified service in one-second time periods up to the last complete second.
IMPORTANT: Unlike other Fastly APIs, the base URL for real-time analytics is
|Number||Value to use for subsequent requests|
|Array||A list of records, each representing one second of time|
|Number||The Unix timestamp at which this record's data was generated|
|Object||Statistics aggregated across all data centers|
|Object||Statistics grouped by data center|
|Object||Statistics for a single data center|
The keys are the same as those for historical stats, but they show some statistics that have occurred since the last request, including the following:
- Number of requests
- Number of bytes transmitted in headers
- Number of bytes transmitted in bodies
- Number of hits
- Number of misses
- Number of synthetic responses
- Number of errors
- Amount of time spent delivering hits
- Amount of time spent delivering misses
miss_histogram object is a histogram. Each key is the upper bound of a span of 10 milliseconds, and the values are the number of requests to origin during that 10ms period. Any origin request that takes more than 60 seconds to return will be in the 60000 bucket.
Get real-time data for the last second. For the first request, the timestamp can be
0. The response will then return a new timestamp field which should be used for the next request.
Get data for the 120 seconds preceding the latest timestamp available for a service.
Get data for the 120 seconds preceding the latest timestamp available for a service, up to a maximum of
The real-time analytics API is rate limited internally. However, it is also cached behind Fastly with an expiration time of 1s. Under normal use there should be no reason for customers to hit that rate limit.
User contributed notes
We welcome comments that add use cases, ideas, tips, and caveats. All comments will be moderated before publication. To post support questions, visit our support center and we'll find you the help you need.