How do I download my logs via the API?

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 programmatically 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 GET request to our logging service, which will reply with the logs that you request. The URL you need to send the get request too is:{mm}-{dd}-{yy}/{pull_zone_id}.log

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 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.


Was this article helpful?
3 out of 6 found this helpful



  • Comment actions Permalink


    Is it possible to download logs older than 3 days?
    Because when I'm trying to do this I'm receiving: "No logs are currently found for this time range"


  • Comment actions Permalink

    Hi Radoslaw,

    Sorry for a bit of a delayed reply. Unfortunately not at the moment. Logging is currently limited to 3 days, but it's something we hope to add in the future.



  • Comment actions Permalink

    Hi Dejan,

    is {mm}-{dd}-{yy} sent in UTC?



Please sign in to leave a comment.