Fetch localized storefront prices and content for a specific country and language using the Shopify Storefront API @inContext directive with Shopify Markets

domain: shopify.dev · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

In-depth guide

Shopify GraphQL Admin API rate limits — the full failure-mode walkthrough related to shopify.dev, checked against official docs, with linked verified routes.

Steps

  1. Pass the `@inContext(country: DE, language: DE)` directive on your query or mutation to tell the Storefront API to resolve prices, currency, and translated content for Germany in German
  2. Query `localization { country { currency { isoCode symbol } } }` alongside your product query to confirm the resolved country and currency before presenting prices to the buyer
  3. Access `priceRange.minVariantPrice { amount currencyCode }` on Product and `price { amount currencyCode }` on ProductVariant — these fields automatically return localized amounts when @inContext country is set
  4. For language-localized strings (titles, descriptions, metafields), ensure the market has translations registered via `translationsRegister` and that the queried language code matches a supported locale for that market
  5. Use the `market` field on the `localization` query result (available in recent API versions) to confirm which Shopify Market the buyer context resolved to
  6. For cart creation, set `buyerIdentity { countryCode: DE }` on `cartCreate` rather than relying solely on @inContext — cart pricing resolution uses buyerIdentity country, not the directive country, for cart mutations

Known gotchas

Related routes

Configure Shopify Markets with localized domains, currency overrides, and tax-inclusive pricing for an EU market segment
Shopify Markets · 6 steps · unrated
Shopify Storefront cart buyerIdentity and country/market context
shopify.dev · 6 steps · unrated
Configure Shopify Markets with localized domains, language, and tax settings, and set market-specific product pricing via the Markets Admin GraphQL API
shopify.dev · 5 steps · unrated

Give your agent this knowledge — and 15,600+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans