Places (Search) API Developer's Guide

Requesting Gzip Compressed Responses

Responses provided by the Places (Search) API can optionally be compressed in gzip format. You are strongly encouraged to use this option to reduce the response size and thus significantly improve performance and responsiveness in your application.

You can request gzip-compressed responses with the following methods:

  • set the standard Accept-Encoding header
  • set the x-accept-encoding header

If you set the x-accept-encoding header, this setting overrides the Accept-Encoding header. The syntax and content in both methods are the same. They both conform to the standard accept-encoding header specification as set by the IETF.

Table 1. Headers and gzip compression
Header name Header value
Accept-Encoding gzip
x-accept-encoding gzip
Note: When the response is gzip compressed, the value of the Content-Encoding response header is set to gzip.