ShopifyQL
ShopifyQL turns a store's commerce data into structured results your app and its users can chart, embed, and act on. It's Shopify's commerce analytics query language, and the same query runs in the Shopify admin, your app, or a notebook.
Anchor to How it worksHow it works
Every query has the same shape. FROM picks a dataset, SHOW lists the metrics and dimensions to return, and clauses such as WHERE, TIMESERIES, and ORDER BY shape the rest. It returns tableData, a rendering-agnostic set of typed columns and rows, so the same result takes a different form on each surface:
- Shopify admin: The ShopifyQL editor in the Shopify admin runs your query and draws the
columnsandrowsas a chart or table, so you can learn the language before you write any code. - GraphQL Admin API: Your app sends the query through the
shopifyqlQueryfield, then renders the samecolumnsandrowsin its own UI. - Python SDK: The client returns the results as a pandas or polars DataFrame, ready to analyze, join, and export.
- Web components: A prebuilt
s-shopifyql-metric-cardruns the query and renders the samecolumnsandrowsas a chart, table, or list in an embedded app.
Anchor to Prototype your first query with the ShopifyQL editorPrototype your first query with the Shopify QL editor
Start in the Shopify admin. You write a query against a real store and see the results render as you type, with no app to build, no access token to manage, and no GraphQL to wire up. Learn the shape of the language, refine a query until it returns what you want, then take the exact query to code.
Anchor to Build reporting into your app with the GraphQL Admin APIBuild reporting into your app with the Graph QL Admin API
Bring store analytics into the apps you build. Send a query through the shopifyqlQuery field, get back structured tableData, and render it in your own UI as the dashboards, reports, and insights your users act on. The query you prototyped in the Shopify admin runs unchanged from code.
Anchor to Analyze store data with the Python SDKAnalyze store data with the Python SDK
Get store data into a DataFrame you can analyze, join, and export. The Python SDK runs ShopifyQL from a notebook or a script and returns results as pandas or polars DataFrames, so data analysts and scientists work in the tools they already use. It's the same query language as the Shopify admin and the GraphQL Admin API, so a query you refined in the admin runs unchanged in your notebook.
Anchor to Add analytics into your app with web componentsAdd analytics into your app with web components
Add live analytics to an embedded app without building your own charts. A prebuilt s-shopifyql-metric-card runs a ShopifyQL query and renders the result as a chart, table, or list, so your app shows a store's metrics with no charting code of your own. It's the same query you prototyped in the Shopify admin, wrapped in a component you drop into your app's UI.