shopify-api
Shopify API Skill
This skill allows you to effectively interact with Shopify's ecosystem through its various APIs.
API Selection Guide
Choose the right API for your task:
- Admin GraphQL API (Preferred): Use for most backend operations. It's the primary API for Shopify, offering more features and efficiency than REST.
- Admin REST API: Use for simple resource management if GraphQL is too complex for the specific task or if dealing with legacy systems.
- Storefront API: Use for building custom shopping experiences (headless commerce). It is unauthenticated or uses public access tokens.
Authentication
Admin API (Custom Apps)
Most internal apps use a custom app access token.
- Header:
X-Shopify-Access-Token: <shpat_...> - URL:
https://{shop}.myshopify.com/admin/api/{version}/{endpoint}
OAuth (Public Apps)
For apps distributed on the App Store.
- Header:
X-Shopify-Access-Token: <access_token> - Flow: Requires an OAuth exchange to get the offline/online token.
1. Admin GraphQL API
Endpoint
POST https://{shop}.myshopify.com/admin/api/{version}/graphql.json
Common Patterns
Querying Products
query getProducts($first: Int!) {
products(first: $first) {
edges {
node {
id
title
handle
}
cursor
}
pageInfo {
hasNextPage
}
}
}
Mutation (Update Product)
mutation productUpdate($input: ProductInput!) {
productUpdate(input: $input) {
product {
id
title
}
userErrors {
field
message
}
}
}
Pagination
GraphQL uses cursor-based pagination. Always request pageInfo { hasNextPage } and the cursor of the last edge to fetch the next page using the after argument.
2. Admin REST API
Endpoint
https://{shop}.myshopify.com/admin/api/{version}/{resource}.json
Pagination
REST API uses link headers for pagination. Do not use page parameter for most resources; use page_info.
Example Request:
GET /admin/api/2025-10/products.json?limit=50
Response Header:
Link: <...page_info=...>; rel="next", <...>; rel="previous"
3. Storefront API
Endpoint
POST https://{shop}.myshopify.com/api/{version}/graphql.json
Authentication
- Header:
X-Shopify-Storefront-Access-Token: <public_token>
Example Query
query {
shop {
name
}
products(first: 5) {
edges {
node {
title
priceRange {
minVariantPrice {
amount
currencyCode
}
}
}
}
}
}
Rate Limits
Shopify APIs use a leaky bucket algorithm.
- REST: 40 requests/bucket, refilled at 2/sec (Standard).
- GraphQL: Cost-based. 1000 cost points/bucket, refill rate varies (50/sec standard).
Handling: Check X-Shopify-Shop-Api-Call-Limit header (REST) or extensions.cost (GraphQL). Implement exponential backoff for 429 Too Many Requests.
More from toilahuongg/google-antigravity-kit
shopify-liquid
Guide for using the Liquid template language within Shopify Theme App Extensions and Themes. Use this skill when building App Embed Blocks, App Blocks, or modifying Shopify Themes.
50shopify-polaris-design
Design and implement Shopify Admin interfaces using the Polaris Design System. Use this skill when building Shopify Apps, Admin extensions, or any interface that needs to feel native to Shopify.
47docusaurus-generator
Generate end-user documentation site using Docusaurus 3.x from the current project. Use this skill when the user asks to create documentation, generate docs, build a docs site, or set up Docusaurus for their project. Supports analyzing project structure, generating markdown docs, configuring Docusaurus, and creating user guides.
31shopify-remix-template
Guide for developing Shopify apps using the official Shopify Remix Template. Covers structure, authentication, API usage, and deployment.
19remotion-best-practices
Best practices for Remotion - Video creation in React
18remixjs-best-practices
Best practices for Remix (2025-2026 Edition), focusing on React Router v7 migration, server-first data patterns, and error handling.
15