Best practices
- Treat 404 and 503 differently
- 404 is a valid, final answer. 503 is temporary: retry with growing intervals.
- Respect Retry-After
- On a 429, wait for the time indicated instead of repeating the call in a loop.
- Use batches for lists
- For hundreds of CPFs, one batch request is simpler and avoids hitting the per-second limit.
- Keep only what you need
- The data you look up is personal data. Define a purpose, keep it for as short as possible and read the LGPD page.