GZIP compression

GZIP compression helps you save bandwidth efficiently by ensuring the proper compression of selected responses in outbound API traffic.

An easy and efficient way to optimize the performance of your API, GZIP compression lets you reduce the size of data packets included in your API responses. API Gateway compresses the responses as they exit the ​Akamai​ network, which contributes to improved transfer speeds and bandwidth savings. This in turn facilitates faster communication between your API and the clients.

In API Gateway you can decide either to compress all API responses, or to apply the same compression rules that you set for your origin server.


860 bytes is the smallest object that Akamai edge servers will gzip compress and serve to the client. Any smaller than this, and the overhead required to compress and decompress the content eliminates any advantage gained by compression.

Configure GZIP compression

With GZIP compression enabled, you can save bandwidth and reduce loading times by compressing API responses as they exit the ​Akamai​ network. You can specify the response types that you want to deliver in a compressed format.



You can also complete this task by using the API Endpoints API. Run the Edit GZIP settings operation. Learn more about Akamai's APIs.

  1. On the API Definitions page, in the Registered APIs section, click the ellipsis icon (...) associated with the API configuration you want to configure GZIP compression settings for.

  2. From the menu, select Manage versions.

  3. In the Version history panel, click the ellipsis icon (...) associated with the API configuration version you want to configure GZIP compression settings for.

  4. From the list of delivery options, select GZIP compression.

  5. On the GZIP compression page, from the Compress response menu, select one of the following options:

    • Always.
      Compresses all file types to reduce delivery time. Then the client decompresses the files locally.
    • Same as origin.
      Uses the same compression settings as the host property. Select this to make your property check if your origin server supports the gzip compression, to determine if gzip compression should be used. For example, if you want to have some of your delivered content compressed, and other content decompressed, you can set up your origin server to deliver the Accept-Encoding: gzip, per object, and then select Same as origin.
    • Never.
      Delivers all file types uncompressed even if the origin server supports the gzip compression. The Accept-Encoding: gzip header is ignored.
  6. Click Save.