Skip to main content
bunny.net provides raw request logs for all Pull Zones with Logging Enabled. Logs appear in near real-time and they’re retained for 3 days. For longer retention, use Permanent Log Storage to automatically archive logs to Edge Storage. We expose two HTTP APIs for accessing logs:
  • Logging API v2 - recommended. Structured JSON, rich filtering, pagination, and per-field search.
  • Logging API v1 - legacy. Streams a raw pipe-delimited file for a given day; preserved for existing integrations.

Privacy & GDPR

IP addresses are anonymized by default. To enable full IP logging, sign the Data Processing Agreement (DPA) in your account settings, then disable anonymization in your Pull Zone logging settings. When anonymization is enabled, anonymized IPs are returned by the API in one of two forms depending on your Pull Zone setting:
  • Remove last octet - IPv4 is masked to a /24 (e.g. 163.172.53.0); IPv6 is masked to a /64 (e.g. 2001:7d0:700d:db04::).
  • Drop all - IPv4 becomes 0.0.0.0 and IPv6 becomes ::.
Anonymization applies on read at the API boundary. Filtering by remoteIp adapts to the same mask width, so the filter can never reveal information beyond what the response shows.

Logging API v2

Authenticate with your account API key or a bearer JWT:
Logs are retained for the past 3 days. Both from and the range to - from must fall within that window.

Example

Query parameters

Country code, the encrypted-at-rest authorization header, and the raw client IP are not matched by the free-text search parameter. Use country, remoteIp, and the dedicated header filters for those.

Response

200 OK returns a JSON envelope with the page of entries, pagination state, and an echoed query summary:

Log entry fields

Extended logging fields

When extended logging is enabled for the Pull Zone (contact support), entries also include: Null fields are omitted from the JSON response.

Cache status values

Pagination

The response sets pagination.hasMore to true when more results are available beyond the current page. To fetch the next page, repeat the request with offset advanced by limit:

Error responses

Errors return a structured JSON envelope:

Logging API v1 (Legacy)

The v1 API is preserved for existing integrations. New work should use Logging API v2, which returns structured JSON, supports rich filtering and pagination, and avoids the pipe-injection issues inherent to the v1 format.
Download raw log files from the logging API:
Authenticate with your account API key:
Use gzip compression to reduce download size:
Example:

Query parameters

Log format

Each request is stored as a pipe-separated line:
Pipe (|) characters in user-controllable fields (Referer, URL, User-Agent, Content-Range, Authorization) are stripped from the v1 output to keep the delimiter unambiguous. If you need the original byte sequence, use v2.

Extended logging

Extended logging adds three additional fields (contact support to enable):

HTTP status codes

These codes apply to logged responses served by the CDN edge and are surfaced via both API versions.

2XX Success

3XX Redirection

4XX Client Errors

A 499 status code appears in logs when a client closes the connection before the server finishes responding. This commonly occurs due to mobile network interruptions, ad blockers, or users navigating away. It’s normal and doesn’t indicate a server problem.

5XX Server Errors

502 and 504 errors typically indicate the CDN edge nodes cannot reach your origin. Check if your origin firewall is blocking bunny.net IPs.
Last modified on June 26, 2026