Rate Limits Exist for Good Reasons
Shopify's rate limits prevent any single app from monopolizing resources and affecting other merchants. Understanding these limits is essential for building reliable apps.
REST API Rate Limits
The REST API uses a leaky bucket algorithm.
How the bucket works
You have a bucket of 40 API calls. Each request removes one from the bucket. The bucket refills at 2 calls per second. Bursting uses your bucket capacity, but sustained high volume drains it.
Rate limit headers
Every REST response includes headers showing your current rate limit state:
- X-Shopify-Shop-Api-Call-Limit: shows used/available (e.g., "32/40")
Monitor this header to know when you are approaching limits.
When you exceed limits
Exceeding limits returns 429 Too Many Requests. The response includes a Retry-After header indicating when to try again.
GraphQL Rate Limits
GraphQL uses query cost rather than simple request counting.
Query cost calculation
Each GraphQL query has a calculated cost based on:
- Fields requested
- Number of objects returned
- Connection pagination depth
Simple queries cost less, complex queries with many connections cost more.
The cost bucket
You have a 1000 point bucket that refills at 50 points per second. Each query deducts its calculated cost from the bucket.
Throttled responses
When you exceed limits, GraphQL returns a response with THROTTLED in the errors. The response includes your current cost state.
Strategies for Staying Within Limits
Build apps that work reliably under rate constraints.
Request efficiently
- Request only fields you need
- Use pagination appropriately
- Batch operations where possible
- Cache responses where data does not change frequently
Implement proper backoff
When you hit limits:
- Catch the 429 or THROTTLED response
- Wait the time indicated in Retry-After or the throttle response
- Retry the request
- Use exponential backoff if retries continue failing
Queue requests
For bulk operations, queue requests and process them at a sustainable rate rather than firing all at once.
Use webhooks instead of polling
Webhooks notify you of changes without consuming API calls. Subscribe to relevant events instead of polling for changes.
Use bulk operations
For large data operations, use Shopify's bulk operations API. It allows processing large datasets without rate limit concerns.
Other API Constraints
Beyond rate limits, other constraints affect app development.
Webhook delivery limits
Shopify limits webhook delivery attempts. Your endpoint must respond quickly (within seconds) and return 200. Slow or failing endpoints get throttled or disabled.
Request size limits
API requests have size limits. Large product descriptions, many variants, or extensive metafield data may need splitting across requests.
Pagination limits
Cursor-based pagination has depth limits. Very large result sets may require multiple queries with different filters.
API version deprecation
Shopify versions its API and deprecates old versions. Plan for regular updates to maintain compatibility.
Monitoring and Alerting
Build visibility into your rate limit usage.
Track rate limit headers
Log rate limit header values from API responses. Track trends over time to identify when you are approaching limits.
Alert on throttling
When your app receives 429 or THROTTLED responses, alert so you can investigate and adjust.
Monitor bulk operation status
Track bulk operation completion times and error rates. Slow or failing bulk operations may indicate issues.
For app development guidance, see custom Shopify apps.
Working with LiftKit Digital
LiftKit Digital builds apps that respect rate limits and operate reliably at scale. We design for constraints from the start.
To discuss app development, get in touch.