<?xml version="1.0" encoding="UTF-8"?>
<response><data><post><id>109</id><slug>rate-limit-headers-explained-part-6-109</slug><title>Rate limit headers explained, part 6</title><excerpt>For part 6, we revisit the basics with a fresh example and a few lessons learned the hard way. A well-behaved API tells you how many requests you have left before it starts saying no. Reading those…</excerpt><seriesName>Rate limit headers explained</seriesName><seriesPart>6</seriesPart><sections><item><heading>Introduction</heading><paragraphs><item>For part 6, we revisit the basics with a fresh example and a few lessons learned the hard way. A well-behaved API tells you how many requests you have left before it starts saying no. Reading those headers turns rate limiting from a surprise into a plan.</item></paragraphs></item><item><heading>Putting it into practice</heading><paragraphs><item>Read the site's terms of service before you start. Many sites welcome automated access within limits and say so explicitly; others ask you to use an API instead.</item><item>Log every request with its URL, status code and duration. When something goes wrong at two in the morning, those logs are the difference between a quick fix and a long investigation.</item><item>Treat HTTP 429 responses as a signal, not an obstacle. Read the Retry-After header, back off, and resume at a slower pace.</item></paragraphs></item><item><heading>Common pitfalls</heading><paragraphs><item>Be careful with relative URLs. Resolve every link against the page it came from, not against the site root, or you will request pages that do not exist.</item><item>Deduplicate as you go. The same item often appears on several listing pages, and a stable identifier such as a SKU or ID makes duplicates easy to spot.</item></paragraphs></item><item><heading>Key takeaway</heading><paragraphs><item>Track X-RateLimit-Remaining, slow down as it approaches zero, and when you receive a 429, wait for the number of seconds in Retry-After before trying again.</item></paragraphs></item></sections><authorId>8</authorId><authorName>Hannah Novak</authorName><authorSlug>hannah-novak</authorSlug><category>APIs</category><tags><item>selenium</item><item>http</item></tags><publishedAt>2025-06-22T00:00:00.000Z</publishedAt><wordCount>210</wordCount><readingTimeMinutes>2</readingTimeMinutes></post></data></response>
