I don't remember the specifics, but one of the values that API call returns is the ID of the latest entry or comment returned. Your client should echo that in the "I got everything up to and including" argument in the next API call. This error, IIRC, occurs when the rate limiter notices you're always using the same value for that argument.
Re: well howdy
There's an example (in perl) of how to do it in https://github.com/dreamwidth/dreamwidth/blob/main/src/jbackup/jbackup.pl.