Skip to main content
Successful JSON responses from GET /v1/pm/* support gzip compression. Send Accept-Encoding: gzip to opt in. Compression reduces the bytes transferred; the decoded JSON fields and authentication requirements stay the same. Browsers normally advertise gzip support automatically. Many HTTP libraries also negotiate compression and decode responses for you.

Enable compression

These examples request the public sports-leagues endpoint, which needs no API key. Keep the usual authentication headers when calling authenticated endpoints.
An encoded response includes these headers:
After decompression, the response contains ordinary JSON. For example, the leagues array includes entries like this:

Handle both response formats

Allow both gzip and uncompressed responses. Compression applies to eligible 200 OK JSON responses of at least 1 KiB. Small responses, errors, write operations, health checks, range requests, and WebSocket upgrades remain uncompressed. Responses marked Cache-Control: no-transform or carrying an existing encoding or validator pass through unchanged. Use your HTTP library’s automatic decompression. If you handle raw response bytes yourself, decompress only when Content-Encoding is gzip.
With Go’s default transport, leave Accept-Encoding unset to enable automatic gzip negotiation and decompression. If you set that header yourself, you must handle decompression yourself. Clients must continue accepting uncompressed responses; do not require gzip with identity;q=0.
To request an uncompressed response explicitly:
gzip;q=0 also disables gzip. Clients that omit Accept-Encoding continue to receive uncompressed responses. Request-body encoding and HMAC signing do not change.