What is the correct way to handle API rate limits during bulk schedule exports?

Is there a clean way to handle API rate limits when pulling historical schedule data for 500+ agents via the WFM API? The /api/v2/wfm/schedules endpoint throws 429 errors mid-request, breaking our weekly compliance export script.

Thanks for the help.