The Marketo REST API supports HTTP compression of response bodies using standards defined by the HTTP 1.1 specification. Enabling compression is recommended because it reduces bandwidth usage, and time spent retrieving data.
Note: Payloads less than 1024 bytes will not be compressed.
To enable compression, include the following HTTP header in the request:
The Marketo REST API will compress the response body and include this header:
Here is an example using Curl to call the Get Leads by Filter Type endpoint to retrieve 5 leads:
$ curl -H 'Accept-Encoding: gzip' 'https://123-ABC-456.mktorest.com/rest/v1/leads.json?filterType=id&filterValues=4,5,7,12,13'