Please note: The logging API is a work-in-progress, we are releasing this guide now so that you can begin to obtain logs via the API.
You can programatically download your BunnyCDN logs via our API. Logs are pushed out from our worldwide CDN servers to our logging system every 20 seconds, and should generally appear within 30-120 seconds after being generated.
In order to do this, you need to craft a POST request to our logging service, which will reply with the logs that you request. The URL you need to send the post request too is:
In this request, mm is the 2 digit number to represent the month, dd is the number day of the month you want logs for, and yy is the year. You also need to put your Pull Zone ID for the pull_zone_id. This is obtainable from the dashboard, by going to your Pull Zone and getting the number out of the URL. For example, if the URL to my Pull Zone is https://bunnycdn.com/dashboard/pullzones/edit/60367 then my ID is 60367. For example, if I wanted to request the logs for the 20th of May 2018, for a Pull Zone ID of 60637, my URL would be:
You will also need to authenticate any requests you send to the logging service. In order to do this, include an HTTP header with the name AccessKey and your API key as the value. Your API key is located here.
In addition, you can send an Accept-Encoding: gzip header in order to get a GZip encoded stream back for faster download.