Create product availability freshness signal via feeds/schema.
- User
Create product availability freshness signal via feeds/schema.
Assistant
Create product availability freshness signal via feeds/schema.
The user wants to create a "freshness signal" for product availability using feeds or schema. This likely means they want to tell a system (like Google Search, Merchant Center, or an e-commerce platform) how "fresh" or up-to-date the product availability data is. The goal is usually to improve SEO (Structured Data) or Feed Quality (Google Merchant Center).
I need to cover two main aspects:
1. Schema.org (On-site)
availability (ItemAvailability). This is the primary signal (InStock, OutOfStock, etc.).dateModified: When the product data was last changed.priceValidUntil: Signals how long the price is valid, implying a review cycle.dateModified on Product structured data for ranking purposes, but it's useful for debugging. However, for freshness, simply having the correct availability is the most direct signal.priceValidUntil is a strong signal for pricing freshness.2. Feeds (Google Merchant Center / XML)
availability (in stock, out of stock, preorder, backorder).expiration_date (When the item info expires).custom_label (Sometimes used to batch update frequencies, but that's a hack).Structuring the Answer: I should structure this as a practical guide for developers or SEO specialists.
Offer and ItemAvailability.priceValidUntil (indicates maintenance).seller details (trust).availability, expiration_date.Refining the "Freshness Signal" Concept: What does the user actually mean by "availability freshness"? It likely means: "Don't show my product as 'In Stock' if it's actually 'Out of Stock' because my feed is 3 days old." So, the solution must address:
InStock vs OutOfStock).dateModified or file upload time).Drafting the Schema Example:
{
"@context": "https://schema.org/",
"@type": "Product",
"name": "...",
"offers": {
"@type": "Offer",
"availability": "https://schema.org/InStock",
"priceValidUntil": "2024-12-31", // Indicates knowledge of time
"url": "..." // Canonical URL
}
}
Drafting the Feed Example (XML):
<item>
<title>...</title>
<g:availability>in stock</g:availability>
<g:expiration_date>2024-01-01T00:00:00Z</g:expiration_date>
</item>
Adding "Best Practices" for Freshness:
lastmod (crawling hint).Let's synthesize this into a clear, actionable response. I will separate it into "On-Page (Schema)" and "Data Feed" strategies.
Detailed Plan:
offers.availability.offers.priceValidUntil to show maintenance.offers.availabilityStarts/Ends for pre-orders/sales.availability attribute.expiration_date attribute (Critical for freshness).<lastmod>.Last-Modified).This looks comprehensive. I will generate the response based on this structure. To create a strong product availability freshness signal, you need to implement a strategy that tells search engines and marketplaces two things:
Here is a guide to implementing freshness signals via Schema.org (On-Page) and Data Feeds (XML/CSV).
While Google does not have a specific "freshness" property for products, it calculates freshness by checking the lastModified timestamp and the consistency of your availability status.
You should use JSON-LD format in the <head> or <body> of your product pages.
Use the ItemAvailability types to signal status immediately.
<script type="application/ld+json">
{
"@context": "https://schema.org/",
"@type": "Product",
"name": "Fresh Roasted Coffee Beans",
"sku": "COFFEE-01",
"offers": {
"@type": "Offer",
"url": "https://www.example.com/coffee",
"priceCurrency": "USD",
"price": "12.00",
"priceValidUntil": "2024-12-31",
"availability": "https://schema.org/InStock",
"seller": {
"@type": "Organization",
"name": "Fresh Coffee Inc."
}
}
}
</script>
To explicitly signal that a page is "fresh," you should implement the lastReviewed or dateModified pattern (often used in conjunction with Product or WebPage).
Note: Google Search Central documentation suggests that simply keeping your sitemap updated is the strongest freshness signal for crawling, but you can explicitly stamp the data.
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebPage",
"name": "Fresh Roasted Coffee Beans",
"dateModified": "2023-10-27T14:30:00+00:00",
"mainEntity": {
"@type": "Product",
"name": "Fresh Roasted Coffee Beans",
"sku": "COFFEE-01",
"offers": {
"@type": "Offer",
"availability": "https://schema.org/InStock",
"price": "12.00"
}
}
}
</script>
dateModified on the WebPage tells search engines exactly when the content (including stock status) last changed. If a bot sees a timestamp from 2 years ago, it assumes the availability data is stale.If you are submitting feeds to Google Merchant Center, Facebook, or Amazon, freshness is determined by the fetch frequency and specific expiration attributes.
You can explicitly tell the system "If you don't hear from me by this time, consider this data old."
Attribute: expiration_date (Defined as [expiration_date] in Google Shopping specs).
XML Example:
<item>
<title>Fresh Roasted Coffee Beans</title>
<link>https://www.example.com/coffee</link>
<g:price>12.00 USD</g:price>
<g:availability>in stock</g:availability>
<!-- FRESHNESS SIGNAL: Expire this data in 2 days to force a re-check logic -->
<g:expiration_date>2023-10-29</g:expiration_date>
</item>
expiration_date to 24–48 hours in the future relative to when you generate the feed. This forces the marketplace to treat the data as "perishable," ensuring that if you stop updating the feed, the products are flagged as stale/invalid rather than showing incorrect stock to users.Use custom_label to categorize products by how often they need to be refreshed.
<g:custom_label_0>high_turnover_refresh_daily</g:custom_label_0>
For true freshness, static files (XML/CSV) are inherently "stale" the moment they are generated. The industry standard for a "Freshness Signal" is the Google Content API for Shopping.
Instead of a batch file, you send a real-time JSON payload when a purchase happens.
Scenario: A customer buys the last item. Action: Your server immediately sends:
{
"merchantId": "12345",
"resourceId": "COFFEE-01",
"content": {
"availability": "out of stock"
}
}
https://schema.org/InStock or OutOfStock precisely.dateModified in your JSON-LD to timestamp the last inventory check.expiration_date attribute to prevent old data from persisting if your feed generation fails.<lastmod> tag every time a product page changes availability status.