Skip to content

Rate limits and pagination

This guide covers two things you meet once you build a real integration. First, what the API limits and what to do when it says slow down. Second, how to read a long list one page at a time.

There is no per-key rate limit on the Store API today. A secret key that calls the Store API is not counted per minute or per day, and the API does not send rate limit headers on those calls, except on the routes in the table below (purchase order send and PDF, test email send). Those send X-RateLimit-Limit-<name> and X-RateLimit-Remaining-<name> on every response and Retry-After-<name> on a 429. Do not read this as a promise of unlimited speed. EcomWeb can add limits later, and a client that loops as fast as it can will load the store’s data and the shared service. Keep your own pace, for example a few parallel requests at most, and handle a 429.

The API limits these things today, besides the Storefront API limits described below:

What Limit Counted by
Storefront customer sign-in routes that check a password or send an email: register, login, resend-verification, forgot-password, otp/request and anonymous 5 requests per minute Store and client IP address
The other Storefront customer sign-in routes: refresh, verify-email, reset-password, change-email/confirm, otp/verify, google/url, google/exchange and config 20 requests per minute Store and client IP address
Purchase order send and PDF download in the Store API 20 requests per minute Client IP address
Test email send for store email templates in the Store API 20 requests per hour Client IP address

The sign-in limits are counted per store, so a burst against one store does not block the shoppers of another.

When you hit a sign-in limit, the API answers 429 with the code AUTH_RATE_LIMITED:

{
"code": "AUTH_RATE_LIMITED",
"message": "Too many requests. Please try again in a moment.",
"timestamp": "2026-11-17T09:30:00.000Z"
}

Routes with other limits answer 429 as well, and their body can be the plain shape described in the errors guide.

Every Storefront API route, the paths under /storefront/, is also limited per minute, and each count is kept per store. A count resets 60 seconds after the first request it counted. A count that goes over its limit is blocked for 60 seconds, and Retry-After gives the seconds left:

Limit Counted by
500 requests per minute Store key and store, for a publishable key or a storefront secret key
2000 requests per minute Platform key and store
100 requests per minute Store and client IP address, only for requests with a publishable key or with no key

A request with a secret key is never counted by IP address for these limits, only by key. The IP limit is checked first, and a request it refuses does not count against the key. On the store lookup routes (/storefront/stores/{ref}, /storefront/stores/{ref}/sitemap-data and /storefront/stores/domain/{domain}) a platform secret key is counted per store ref or domain.

The sign-in limits above do count by IP address. For those, a server that calls with the store’s own storefront secret key can send each shopper’s address in X-Forwarded-For, and the API counts the shopper’s address and not your server’s. See Send a storefront secret key.

The sign-in routes are counted by both the sign-in limits above and these limits.

When you hit a Storefront API limit, the API answers 429 with the code STOREFRONT_RATE_LIMITED and a plain Retry-After header with the wait in seconds:

{
"code": "STOREFRONT_RATE_LIMITED",
"message": "Too many requests. Please try again in a moment.",
"timestamp": "2026-11-18T09:30:00.000Z"
}
  1. Stop sending requests of that kind.
  2. Read the wait from the response headers if your client can see them. A Storefront API limit sends the plain Retry-After header. A sign-in limit names the header after the limit that was hit, for example Retry-After-auth-strict or Retry-After-auth-standard, and the plain name is not sent for it. The value is a number of seconds. Browser code on another origin can read the storefront Retry-After but not the sign-in Retry-After-<name> headers, so for a sign-in limit use the backoff in step 3.
  3. Wait that long, or if there is no header, wait a few seconds and double the wait after each further 429.
  4. Retry the request. Give up after a few tries and show the shopper or operator the message.
async function withBackoff(send: () => Promise<Response>, tries = 5) {
let wait = 2000
for (let attempt = 1; attempt <= tries; attempt++) {
const res = await send()
if (res.status !== 429) return res
const header = [...res.headers.entries()].find(([name]) => name.startsWith("retry-after"))
const seconds = header ? Number(header[1]) : NaN
await new Promise((r) => setTimeout(r, Number.isFinite(seconds) ? seconds * 1000 : wait))
wait *= 2
}
throw new Error("Still rate limited after retries")
}

List routes take these query parameters:

Parameter Meaning Default
limit Items per page, 1 to 10000 in the Store API. Storefront lists cap it at 100, and autocomplete at 20 20
offset How many items to skip 0
sort_by The field to sort by. The allowed fields depend on the list, for example created_at or name for products Depends on the list
sort_order asc or desc Depends on the list, desc for products

In the Storefront API, a limit above the cap is lowered to the cap and is not refused. Blog search takes page_size with a cap of 100, and autocomplete takes limit with a cap of 20. Catalog search per_page still refuses a value above 100 with a 400. Product reviews are capped at 100 as well.

Lists are paged by offset, not by a cursor. The response has the items in data and the paging state in meta:

{
"data": [{ "id": 101, "name": "Linen shirt" }],
"meta": {
"total": 134,
"limit": 20,
"offset": 0,
"page": 1,
"totalPages": 7,
"hasNext": true,
"hasPrev": false
}
}

page and totalPages are worked out from offset and limit. To read page 3, send offset=40 with limit=20.

Terminal window
curl "https://apibase.ecomweb.app/api/v1/stores/<store ref>/products?limit=50&offset=100&sort_by=created_at&sort_order=desc" \
-H "x-api-key: <secret key>"

The blog comments route, GET /storefront/stores/{storeRef}/blog/posts/{postId}/comments, takes limit (default and maximum 100, a larger value is lowered) and offset (default 0). The body is the array of comments. The total is in the X-Total-Count response header. Browser code on another origin can read it.

To read every item, keep asking until hasNext is false:

const base = "https://apibase.ecomweb.app/api/v1"
async function* listProducts(storeRef: string, apiKey: string) {
const limit = 100
let offset = 0
while (true) {
const url = `${base}/stores/${storeRef}/products?limit=${limit}&offset=${offset}`
const res = await fetch(url, { headers: { "x-api-key": apiKey } })
if (!res.ok) throw new Error(`HTTP ${res.status}`)
const { data, meta } = await res.json()
yield* data
if (!meta.hasNext) return
offset += limit
}
}
for await (const product of listProducts("<store ref>", process.env.ECOMWEB_API_KEY!)) {
console.log(product.id)
}

If items are added or removed while you read, an offset can skip or repeat an item. For a one-time export, sort by created_at ascending, so new items land at the end, and compare the number you read with meta.total when you finish.

Some lists filter by creation or update time with ISO 8601 timestamps:

Parameter Keeps items
created_after Created after this time
created_before Created before this time
updated_after Updated after this time
updated_before Updated before this time

The orders list supports all four. The payments list and the admin product reviews list also take them. The products list does not. Check the operation in the API reference before you rely on a filter, because an unsupported parameter is ignored.

Terminal window
curl "https://apibase.ecomweb.app/api/v1/stores/<store ref>/orders?updated_after=2026-11-01T00:00:00.000Z&limit=100" \
-H "x-api-key: <secret key>"

To sync changes, store the time you started the last run and pass it as updated_after the next time.