Skip to main content

GraphQL Admin API rate limits

Calls to the GraphQL Admin API are limited based on calculated query cost, which means you should consider the cost of requests over time rather than the number of requests.

GraphQL Admin API rate limits are based on the combination of the app and store. Calls from one app don't affect the rate limits of another app, even on the same store. Similarly, calls to one store don't affect the rate limits of another store, even from the same app.

Each combination of app and store is given a bucket size and restore rate based on the store's plan. By making simpler, lower-cost queries, you can maximize your throughput and make more queries over time.

PlanRate limit
Standard100 points/second
Advanced Shopify200 points/second
Shopify Plus1000 points/second
Shopify for enterprise (Commerce Components)2000 points/second

Limits are enforced with a leaky bucket: your quota refills continuously, so short bursts are fine as long as your average cost stays under the restore rate.


Every field in the schema has an integer cost value assigned to it. The cost of a query is the maximum of possible fields selected. Running a query is the best way to find out its true cost.

By default, a field's cost is based on what the field returns:

Field returnsCost value
Scalar0
Enum0
Object1
InterfaceMaximum of possible selections
UnionMaximum of possible selections
ConnectionSized by first and last arguments
Mutation10

Although these default costs are in place, Shopify also reserves the right to set manual costs on fields.


Anchor to Requested and actual costRequested and actual cost

Shopify calculates the cost of a query both before and after execution.

  • The requested cost is based on the composition of fields selected in the request.
  • The actual cost is based on the query results, and may be lower than requested cost due to the actual objects returned or connections that return fewer edges than requested.

Rate limits use a combination of the requested and actual query cost. Before execution begins, an app's bucket must have enough capacity for the requested cost of a query. When execution is complete, the bucket is refunded the difference between the requested cost and the actual cost of the query.


A single query may not exceed a cost of 1,000 points, regardless of plan limits. This limit is enforced before a query is executed based on the query's requested cost.


Input arguments that accept an array have a maximum size of 250, on every Shopify API. Requests return an error if an input array exceeds 250 items.


The response includes information about the cost of the request and the state of the throttle. This data is returned under the extensions key:

"extensions": {
"cost": {
"requestedQueryCost": 101,
"actualQueryCost": 46,
"throttleStatus": {
"maximumAvailable": 1000,
"currentlyAvailable": 954,
"restoreRate": 50
}
}
}

To get a detailed breakdown of how each field contributes to the requested cost, you can include the header Shopify-GraphQL-Cost-Debug=1 in your request.

"extensions": {
"cost": {
"requestedQueryCost": 101,
"actualQueryCost": 46,
"throttleStatus": ...,
"fields": [
{
"path": [
"shop"
],
"definedCost": 1,
"requestedTotalCost": 101,
"requestedChildrenCost": 100
},
...
]
}
}

Anchor to Resource-based rate limitsResource-based rate limits

Once a store has 500,000 product variants, no more than 10,000 new variants can be created per day, on any API.

Past that threshold, the following GraphQL Admin API mutations are subject to the daily throttle, and an app that reaches it receives a 429 Too Many Requests response with a message that a throttle has been applied.

In certain cases, Shopify needs to enforce rate limiting in order to prevent abuse of the platform. Therefore, your app should be prepared to handle rate limiting on all endpoints, rather than just those listed here.

Plus

These additional limits don't apply to stores on the Shopify Plus plan.


To query and fetch large amounts of data, you should use bulk operations instead of single queries. Bulk operations are designed for handling large amounts of data, and they don't have the max cost limits or rate limits that single queries have.


Anchor to Avoiding rate limit errorsAvoiding rate limit errors

The practices for staying under a rate limit are the same on every Shopify API. Refer to avoiding rate limit errors.



Was this page helpful?