Picture a shopper asking an AI tool for a wool throw blanket under 60 dollars that is in stock right now and can arrive before the weekend. The tool has to answer with a price, a yes or no on stock, and a sense of whether the price is a sale price or the usual price. If your page only shows those facts as styled text, the tool has to hunt for the right number and guess which one is current. If your page also carries those facts in a labeled block, the tool can read them straight off. That labeled block is built from a Product with an Offer inside it, and this guide covers the two facts inside the Offer that shoppers ask about most: price and availability.
It changes nothing your customers see. It lives in the code behind the page. It speaks a shared vocabulary from schema.org, so Google, Bing, and AI tools can all read the same block.
Start with the Offer, not the price alone
A price on its own is not enough. It needs to sit inside an Offer, and the Offer needs to sit inside a Product. The Product names the item. The Offer says what it costs right now, in which currency, and whether it can be bought. Google splits product markup into two uses: product snippets for pages where people cannot buy the product directly, and merchant listings for pages where customers can buy from you. If your page is a shop page, you are in merchant listing territory, and the rules there are stricter.
For a merchant listing, Google requires the Product to carry a name, an image, and a nested Offer. Inside the Offer, the price and the currency are required. The price must be greater than zero for a merchant listing. That sounds obvious, but it catches shops that mark up a free sample, a gift with purchase, or a placeholder price of zero while the real price loads somewhere else. If the price is zero in the code, the listing is not eligible.
Here is a complete example for one product with one offer. Swap in your own business, product, and web address. The example business here is a home goods shop selling a wool throw blanket.
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Product",
"name": "Highland Wool Throw Blanket, Oat",
"image": [
"https://example-shop.com/images/highland-wool-throw-oat.jpg"
],
"description": "A woven wool throw blanket in oat, sized for a sofa or the foot of a bed.",
"sku": "HW-TB-OAT",
"brand": {
"@type": "Brand",
"name": "Highland Home Goods"
},
"offers": {
"@type": "Offer",
"url": "https://example-shop.com/products/highland-wool-throw-blanket-oat",
"price": "54.00",
"priceCurrency": "USD",
"availability": "https://schema.org/InStock",
"itemCondition": "https://schema.org/NewCondition"
}
}
</script>
What each part does, in plain terms:
- Price: the price a shopper pays today. Write it as a plain number, with no currency symbol inside the value. The symbol belongs on the visible page, not in the code.
- Currency: the three letter code for the currency, such as USD. Google requires a currency whenever a price is given. A bare number tells nobody whether you mean dollars, pounds, or euros.
- Availability: one value from a fixed list, written as a full schema.org address. This is the field AI tools lean on when someone asks if an item is in stock.
- Offer address: the address of the page a shopper can buy from. Use the one true address for the product, not a short link or a tracking link.
- Condition: NewCondition for a new item, UsedCondition for a used item, RefurbishedCondition for a refurbished item. Add it so tools can filter used or refurbished items out when a shopper wants new.
The availability values, and when to use each one
Google lists the availability values it supports for an Offer. Use only one value per Offer. Do not list two, such as InStock and PreOrder together, hoping to cover both cases. Pick the one that matches the item today.
- InStock: the item is in stock and can be bought now.
- OutOfStock: the item is currently out of stock.
- PreOrder: the item is available for pre-order.
- BackOrder: the item is on back order.
- Discontinued: the item has been discontinued.
- SoldOut: the item has been sold out.
- LimitedAvailability: the item has limited availability.
- InStoreOnly: the item is only available for purchase in store.
- OnlineOnly: the item is available online only.
- PreSale: the item is available for ordering and delivery before general availability.
Most shops use the first four most of the time. The rest matter when your stock situation is genuinely one of those cases. Do not use LimitedAvailability as a vague way to create urgency when the item is simply in stock. The value should describe your real stock position, not your marketing mood.
When an item sells out, change the value to OutOfStock and leave the page up. Deleting the page removes the product from every tool at once, and a shopper who asks about it gets nothing. Keeping the page with an honest OutOfStock value lets the tool say it is out of stock instead of guessing. When it comes back, change the value back. The code should follow your inventory, not lead it.
For a pre-order, use PreOrder and make sure the visible page says the same thing, including when the item is expected to ship if you state that on the page. If the page says pre-order but the code says InStock, a tool may tell a shopper the blanket is ready to ship today, and the order that follows will disappoint them.
Sale prices need two numbers, not one
A sale price is not just a lower number. It is a lower number plus the usual price it replaces, so a tool can tell the difference between a product that always costs 54 dollars and a product that usually costs 72 dollars and is on sale at 54 dollars. Google recognizes three kinds of prices: the active price, the strikethrough price, and the member price. The active price is the price at which the product is currently offered. The strikethrough price is the higher regular price at which the product is normally offered. The member price is the price offered to a member of a loyalty program.
To mark up a sale, keep the active price in the Offer price field, and add a second price inside a priceSpecification with a priceType of StrikethroughPrice. Do not mark the active price itself with a priceType. Google says the active price has neither a priceType nor a member tier property, and a price specification that carries both a priceType and a member tier is ignored.
"offers": {
"@type": "Offer",
"url": "https://example-shop.com/products/highland-wool-throw-blanket-oat",
"price": "54.00",
"priceCurrency": "USD",
"availability": "https://schema.org/InStock",
"itemCondition": "https://schema.org/NewCondition",
"priceSpecification": {
"@type": "UnitPriceSpecification",
"priceType": "https://schema.org/StrikethroughPrice",
"price": "72.00",
"priceCurrency": "USD"
}
}
The visible page has to show the same two numbers. If the page shows 54 dollars with 72 dollars struck through, the code above matches. If the page shows only 54 dollars and the code claims a strikethrough price of 72 dollars, the tool sees a sale the shopper cannot see, and it may trust neither number. Google's general rule for structured data is that the code describes the content of the page. Do not add facts to the code that are not visible to readers of the page.
A member price works the same way, but with a member tier instead of a priceType. Mark it with a validForMemberTier property and do not add a priceType to the same price specification. If you do not run a loyalty program with tiered pricing, you do not need this at all. Leave it out rather than guessing at a tier name.
Give the sale a start and an end
A sale price without an end is a sale that never ends, and tools have no way to know when to stop quoting it. Google lets you set the sale period with a start and an end in ISO 8601 format, which is the standard date and time format the web uses. Use validFrom for the start. For the end, use either validThrough or priceValidUntil. Google recommends providing both a start and an end so the sale period is clearly defined, and recommends including the time and timezone for accuracy.
You can put these properties on the Offer itself, where they apply to the active price, or on a price specification node, where they apply to the price inside that node. Either way, the start must be earlier than or equal to the end. And watch the end date: Google says a listing may not display if the priceValidUntil value indicates a past date. When a sale ends, update the code the same day. A stale sale end is one of the easiest ways for an AI tool to quote a price you no longer honor.
Do not use a sale end date as a substitute for updating the price. When the sale is over, the active price goes back to the usual price, the strikethrough block comes out, and the sale dates come out with it. All three change together, because they describe one fact: what the product costs today.
Keep the code and the page on the same data
The most common failure in price markup is a price in the code that differs from the price on the page. It happens when the code is typed by hand once and the page price is changed later, or when the code comes from one system and the page price comes from another. If the code says 54 dollars and the page shows 62 dollars, Google may ignore the block, and an AI tool that spots the clash may trust neither figure. The fix is structural, not careful typing: generate the code from the same product data that renders the page, so a price change updates both at once.
The same rule applies to availability. If your inventory system says the blanket is out of stock but the code still says InStock, the tool will keep recommending it to shoppers who cannot buy it. Build the availability value from the same stock count the page uses. A block that is generated from live data can go stale for a short while between updates, but a block typed by hand and left alone will drift out of sync and stay wrong.
Check for a block before you add one. Many sites already carry a product block from a theme, a reviews app, or an SEO app. Open a product page, view the page source, and search for application/ld+json. If a block is already there, improve that block. Fill its gaps and fix its values. Adding a second block beside it creates two competing sets of facts, and tools may pick one at random or drop both.
Test it before you trust it
Two free tools need no signup, and they check different things.
Google's Rich Results Test shows which product fields Google finds on a page, with errors and warnings per field. Paste a product address and read what it finds for price, currency, and availability.
The Schema Markup Validator checks your JSON-LD against the schema.org vocabulary, which catches misspelled field names the Google tool may miss.
Run both on a few pages. Include a product on sale, a product at its usual price, and an out of stock product. The out of stock check is the important one. Validators will not tell you a stock value is stale. Only a comparison against real inventory tells you that. Check the sale product too: confirm the strikethrough price in the code matches the struck through price on the page, and that the sale end has not already passed.
What price markup alone cannot do
Markup makes your price and stock readable. It does not bring crawlers to your pages, keep prices fresh as stock changes, or let an AI tool finish a purchase. Those are separate jobs: crawler access, monitoring, and checkout. It also does not guarantee a rich result. Google says it does not guarantee that structured data will show up in search results, and the same holds for AI tools: readable facts are a requirement for being quoted with confidence, not a promise of being quoted.
Start with readable prices and honest stock, then work through the rest.
Frequently Asked Questions
Does the price in the code have to match the price on the page?
Yes. Generate both from the same product data. If they differ, Google may ignore the block, and an AI tool that spots the clash may trust neither figure.
What currency code should I use?
The three letter ISO code for the currency you charge in, such as USD. Google requires a currency whenever a price is given. A bare number with no currency is not a complete price.
How do I mark up a sale price?
Keep the sale price as the active price in the Offer, and add the usual price in a priceSpecification with a priceType of StrikethroughPrice. Do not mark the active price with a priceType. Give the sale a start and an end as well.
What should the code say when an item sells out?
Change availability to OutOfStock and leave the page up. Deleting the page removes the product from every tool, while an honest OutOfStock value lets a tool say it is out of stock instead of guessing.
Does adding price markup guarantee a rich result?
No. It makes your page eligible for richer display and makes your facts checkable. Google does not guarantee that structured data will show up in search results, and no tool can promise placement.
Verified Sources & Technical Documentation
- Google Search Central, Merchant listing structured data Specific https://developers.google.com/search/docs/appearance/structured-data/merchant-listing
- Google Search Central, Product structured data Specific https://developers.google.com/search/docs/appearance/structured-data/product
- Schema.org, Offer type Specific https://schema.org/Offer
- Schema.org, ItemAvailability type Specific https://schema.org/ItemAvailability
- Google Rich Results Test General Docs https://search.google.com/test/rich-results
- Schema Markup Validator General Docs https://validator.schema.org/
links marked specific point to the page that supports the claim in this guide. Links marked general docs point to the vendor's general docs section for that topic, not to a page that proves every step. Check the vendor docs for the current path before relying on a menu name or click path in this guide.