Getting Less From Yahoo! Search

Several people have asked us about compressing the XML we return from Yahoo! Search Web Services. We'd been reluctant to do it because some browsers and platforms claim to support compression without actually doing so. However, we can now return compressed data to clients that support compression while working well with systems that don't support it so well.

If you want the data we return to be compressed, do the following:

1) Use HTTP 1.1.
2) Pass in an 'Accept-Encoding: gzip' header.
3) Spoof your user-agent to be Mozilla/5.0 (or higher).

Don't forget to do the expansion on the other end!

Will this save you time? Quite possibly. XML compresses nicely, and savings of 50% on the data size are not uncommon. Depending on how busy your processor is, less data over the network may be fast enough to offset the cost of decompression.