AliExpress API
A practical guide to AE rate-limit retry-with-backoff
Key takeaways
- A frequency-limit error is not a failed order; it is the API asking you to try again in a moment, so your code must actually retry rather than skip the row.
- The right pattern is retry with exponential backoff: wait, retry, and double the wait on each failure (1s, 2s, 4s, 8s) up to a capped number of attempts.
- Add a small random jitter to each wait so a batch of retries does not all fire at once and re-trigger the limit.
- Never mark a row done on error; a rate-limited order should stay in the queue for the next run instead of being written blank or added to the skip list.
- Fetch Order Tracking bakes in paced batches, auto-chaining, and retry-with-backoff, so rate-limited orders quietly carry over and finish on the next pass.
You're 180 orders into a 300-order sync when the AliExpress API starts spitting back Api access frequency exceeds the limit. The rows that hit the wall stay blank. You re-run, hit the wall again somewhere else, and now you genuinely don't know which orders got updated and which didn't.
This is the single most common way a homemade tracking sync loses data. The fix isn't “call the API less” in some vague way — it's a specific, well-worn pattern: retry with exponential backoff. Here's how it works and how to apply it without losing a single order.
What the frequency limit actually is
The AliExpress Dropshipping API caps how many calls you can make in a short window. The exact ceiling depends on your app and the specific endpoint, and AliExpress doesn't always publish a clean number — which is the whole problem. You can't simply “stay under X” when X is fuzzy and shared across every call your app makes.
When you cross it, you don't get a partial result. You get an error response — commonly the Api access frequency exceeds the limit message — and that order simply didn't get fetched. If your script treats that as “no data” and moves on, you've now got a silent gap.
A rate-limit error is not a failure of the order. It's the API saying “not right now, ask again in a moment.” The whole job of your code is to actually ask again — correctly.
The pattern: retry with exponential backoff
Backoff means: when a call is rate-limited, wait, then retry — and each time it fails, wait longer before the next attempt. The waits grow geometrically instead of linearly, which lets a brief spike clear without you abandoning the order.
- Call the API for an order.
- If it succeeds, write the row and move on.
- If you get a frequency-limit error, wait a base delay (say 1 second), then retry.
- Still limited? Double the wait: 2s, then 4s, then 8s.
- Cap the number of attempts (e.g. 5) so a genuinely dead order doesn't hang the run forever.
Add jitter so you don't self-collide
If every retry fires at exactly the same doubled interval, a batch of retries can land all at once and re-trigger the limit. Add a small random jitter to each wait — a few hundred random milliseconds — so retries spread out instead of stampeding.
Prevention beats cure: pace the batch
Backoff is your safety net, but the cheaper win is not hitting the limit in the first place. Two levers do most of the work:
- Modest batch size. Processing roughly 25 orders per click keeps any single burst well-behaved.
- A deliberate inter-call delay. A ~1.5-second gap between calls keeps your steady-state rate comfortably under the ceiling, so backoff only kicks in for genuine spikes.
That batching-and-delay rhythm is also what stops a run from looping or stalling — the same mechanics we cover in why your auto-update keeps looping on the same 25 rows. Pacing and backoff are two halves of one healthy sync.
The rule that saves your data: never mark a row done on error
This is the part DIY scripts get wrong most often. A row should only be marked complete when you got a real response. If a call exhausts its retries, the order must stay in the queue for the next run — not get written as blank, and not get added to your skip list.
- Success → write the row, skip it next time.
- Terminal status (Delivered, Cancelled & Refunded) → skip it forever.
- Rate-limited after all retries → leave it untouched so the next run picks it up.
Get this right and a rate limit becomes a non-event: worst case, a handful of orders roll to the next run and finish then. Get it wrong and you create silent gaps that surface days later as a buyer asking where their parcel is — and one missed update can be genuinely expensive, as we break down in the hidden cost of a missed AliExpress tracking update.
Why this is worth not building yourself
Backoff with jitter, capped attempts, per-order retry state, and a queue that correctly distinguishes “done” from “deferred” is a deceptive amount of code to get right — and it has to keep being right as AliExpress tweaks its limits. One off-by-one in the retry logic and you're back to silent gaps.
Fetch Order Tracking bakes the whole pattern in: paced batches with a 1.5-second delay, auto-chaining across the full sheet, retry-with-backoff on frequency errors, and a skip list that only ever marks genuinely finished orders as done. Rate-limited orders quietly carry over and complete on the next pass.
The result is the boring kind of reliability you actually want: you click once, every order gets its real data, and Api access frequency exceeds the limit stops being something you ever have to think about. With Fetch Order Tracking, the retry logic is just handled — and because plans are flat monthly with no per-order fees, retries never cost you a penny extra.
Frequently asked questions
What does Api access frequency exceeds the limit actually mean?
It means you crossed the AliExpress Dropshipping API cap on how many calls you can make in a short window, and that single call returned an error instead of order data. The order itself is fine; the API is simply saying not right now. If your script treats that error as no data and moves on, you get a silent gap in your sheet.
What is retry with exponential backoff and why use it here?
When a call is rate-limited you wait, then retry, and each time it fails again you wait longer, doubling the delay from one second to two, four, then eight, up to a capped number of attempts. The growing waits let a brief spike clear without you abandoning the order. Adding a small random jitter to each wait stops a batch of retries from all firing at once and re-triggering the limit.
How do I avoid losing orders when a rate limit hits mid-batch?
Never mark a row done on error. Only write a row complete when you got a real response, and if a call exhausts its retries leave the order untouched so the next run picks it up, rather than writing it blank or adding it to the skip list. Pacing helps too: roughly 25 orders per click with a 1.5-second gap between calls keeps you under the ceiling. Fetch Order Tracking handles this retry logic for you.
Related guides
- Why your auto-update keeps looping on the same 25 rows
- Why batch processing beats one-by-one for AE tracking calls
- The hidden cost of a missed AliExpress tracking update