Shopify guides · Updated 2026-11-15

How to let customers search by SKU in Shopify

If your customers know what they want by its code (trade buyers, repair shops, anyone reordering) they type the SKU into your search box and expect the product to appear. On many Shopify stores it doesn't, or it shows a nearby code instead. This guide explains why, what you can fix for free, and when an app is worth it.

What Shopify search does with SKUs today

Your store has two different searches, and they behave differently:

SearchWhere shoppers see itSKUs by default?
Predictive searchThe dropdown under the search box as they typeNo. By default it matches title, product type, variant title and vendor.
Search results page (/search)After pressing EnterUsually finds an exact, whole SKU. Partial codes and different punctuation often fail.

That explains the two most common complaints: "the dropdown shows the wrong product for a code" and "the code only works if I type it exactly". A shopper typing 7730 won't reliably reach OX-7730-B, and ox7730b or OX 7730 B may not match at all.

Free step 1: put the code in the right field

Search can only find what's stored where it looks. For every variant:

  1. Put your own code in SKU and the manufacturer's GTIN (UPC/EAN) in Barcode.
  2. Don't keep the only copy of a code in the description or an image. Many stores do this after a CSV import and then wonder why search misses it.
  3. If you also sell by manufacturer part number (MPN) or OEM number, decide on one place for it, such as a variant metafield, and fill it consistently.

Use the bulk editor (Products > select > Bulk edit > Columns > SKU) to spot gaps. Our guide to finding missing or duplicate barcodes has the spreadsheet method for big catalogs.

Free step 2: add SKUs to predictive search (Dawn, Horizon and most Online Store 2.0 themes)

Shopify's Predictive Search API lets a theme choose which fields to search with the resources[options][fields] parameter. Accepted fields include variants.sku and variants.barcode. Most themes don't send them, so SKUs are ignored in the dropdown.

  1. Go to Online Store > Themes, click ... next to your live theme and choose Duplicate. Edit the copy, not the live theme.
  2. On the copy, choose Edit code and open the predictive search script in assets (in Dawn it's predictive-search.js; in Horizon search the assets for predictive_search).
  3. Find where the request URL is built. It contains search/suggest and resources[type].
  4. Add the fields parameter to that URL:
&resources[options][fields]=title,product_type,variants.title,vendor,variants.sku,variants.barcode
  1. Save, preview the copy, and type a few real codes. When you're happy, publish the copy.

Limits to know: the change is lost when you update or switch themes, the dropdown still matches from the start of words (so a middle chunk of a code may not match), and it can't send a shopper straight to the variant. It's still a big improvement for zero cost.

Free step 3: watch what people actually type

In Analytics > Reports, open Top online store searches with no results. Any code in that list is a sale you missed. Check whether it's a missing SKU, a typo pattern (letters O and 0, extra dashes) or an old part number you should add to the product.

When an app is worth it

The free steps get exact codes working. Stores where shoppers type partial codes, mix up dashes and spaces, or search by supplier and OEM numbers usually need search that understands codes. That's what we built Oak Glen SKU Search & Synonyms to do, on top of your theme's own search:

Let shoppers find the right variant by SKU, barcode or part number. Oak Glen SKU Search & Synonyms works with your theme's own search. Free for up to 1,000 variants; Growth is $7.99/month with a 7-day free trial.

Try SKU Search & Synonyms free

Related: How to add search synonyms in Shopify · Fix searches that return no results · Part number search for parts stores.

FAQ

Does Shopify search find products by SKU?

The full search results page usually finds an exact, complete SKU. The predictive search dropdown doesn't search SKUs unless the theme asks for the variants.sku field, and partial codes or codes typed with different punctuation often find nothing.

How do I add SKU to Shopify predictive search?

Duplicate your theme, edit the predictive search script in assets and add resources[options][fields] with variants.sku (and variants.barcode) to the search/suggest request. Test on the copy before publishing it.

Can customers search by barcode or UPC in Shopify?

Yes, if the code is in the variant's Barcode field. Add variants.barcode to predictive search fields so it appears in the dropdown too.

Why does searching a code show a similar but wrong product?

Predictive search matches from the start of words and ranks loosely, so 203333 can surface 203343. Add SKUs to its fields, or use a code-aware search app that matches the exact code first.