← Documentation
Shopify
Use the Shopify app for zero-config setup, or integrate directly via the Storefront API for full control over your OCP implementation.
Option A — Shopify App (recommended)
1
Install from the Shopify App Store
Search for Open Commerce Protocol in the Shopify App Store and click Install. No configuration needed — the app reads your products and store settings automatically.
2
Verify the manifest
https://your-shop.myshopify.com/.well-known/ocp.json
3
Validate
npx @opencommerceprotocol/cli validate https://your-shop.myshopify.com ✓ /.well-known/ocp.json — valid ✓ /ocp.md — found ✓ /ocp/products.jsonl — 312 products, all valid Score: 98/100
Option B — Storefront API adapter
For headless storefronts or custom themes, use the OCP JavaScript adapter that wraps the Shopify Storefront API.
1
Install the adapter
npm install @opencommerceprotocol/runtime @opencommerceprotocol/adapter-shopify
2
Initialize the runtime with Shopify handlers
ocp-init.js
import { OCP } from '@opencommerceprotocol/runtime';
import { createShopifyHandlers } from '@opencommerceprotocol/adapter-shopify';
OCP.init({
handlers: createShopifyHandlers({
storeUrl: 'https://your-shop.myshopify.com',
storefrontAccessToken: process.env.SHOPIFY_STOREFRONT_TOKEN,
}),
});Shopify limitations
- Shopify does not allow serving arbitrary files from
/.well-known/on the default storefront. Use the app or a custom server to host the manifest. - The Storefront API rate-limits to 2 requests/second per app. The adapter batches product queries automatically.
- Custom domains (not
.myshopify.com) require the app to be re-installed with the custom domain.
Generated endpoints
/.well-known/ocp.jsonManifest — auto-populated from Shopify store settings/ocp.mdNatural language description from store metafields/ocp/products.jsonlFull product catalog, rebuilt every 6 hours