Enable compression
Most modern HTTP clients request compression and decode it automatically. Your application should continue to parse ordinary JSON. The SDK examples use their HTTP transport’s defaults without overridingAccept-Encoding.
Content-Encoding. In Go’s net/http and Ruby’s Net::HTTP, setting Accept-Encoding yourself can change automatic decoding behavior; prefer the client’s defaults unless you are measuring the wire response.
Check the response headers
This cURL-only diagnostic inspects the wire response. Request gzip explicitly and inspect the headers without printing the body; SDK transports may remove compression headers after decoding.cURL
Request less content
Compression should not replace endpoint-level controls:- Request Markdown instead of HTML when text is enough.
- Use
useMainContentOnly=trueto omit repeated page chrome. - Use
includeSelectorsandexcludeSelectorsto keep only relevant subtrees. - Keep
includeImages=falseunless image references are required. - Leave
shortenBase64Images=truewhen Markdown images are enabled. - Use cursor pagination or gzipped NDJSON files for large batch results.
- Bound crawl page counts instead of transferring content you will discard.
Measure the effect
Compression trades CPU work for fewer transferred bytes. Its latency effect depends on payload size, client location, network, runtime, and intermediaries. Compare representative requests withAccept-Encoding: identity and Accept-Encoding: gzip. Record:
- compressed and uncompressed bytes transferred;
- time to first byte and total response time;
- client CPU and memory during decode;
- behavior through your production proxy or gateway;
- results for small, median, and large payloads.
Reuse connections
Keep a long-lived HTTP client or connection pool per process. Compression reduces response bytes, while connection reuse avoids repeating DNS, TCP, and TLS setup. Set explicit request timeouts and cap concurrency as described in Best practices.Next steps
Scrape webpages as Markdown
Retrieve page content with the output options your application needs.
Crawl a website
Collect linked pages with explicit depth and page limits.
Rate limits
Bound concurrency and retry rate-limited requests.