APIs and integrations
Storefront API
The Storefront API is the GraphQL interface meant for the buyer side: it reads products, collections and content, and creates and updates carts. It is designed to be used from the browser or an app with a public token, and it is what a headless store is built on.
Also called: Storefront GraphQL API, buyer-side API
The usual confusion is thinking it is “the other API” and that it does not matter which one you use. It does: the Admin API is private and manages the store, the Storefront one is public and is for buying.
Public means public
The Storefront API token travels to the browser, so anybody can read it and use it. That is normal and intended, but it has a consequence worth understanding: whatever you expose through it is visible to everyone.
On a B2C store that rarely matters, because the catalog is public anyway. On a wholesale portal it matters a great deal: if you build a component with the Storefront API that returns B2B catalog prices, you are publishing your price list. That is why on the portals I build the wholesale price is decided in Liquid, on the server, and never requested from the browser.
You do not have to go headless to use it
It is associated with headless and it works perfectly well inside a normal theme, for one specific piece: a fast search, a complex product picker, a configurator. It is a decision per component, not per store.
Documentation: Storefront API.