Sub topic 2
Feeds, page markup, and merchant accounts as data sources
The previous chapter described how AI shopping answers choose products to show. This chapter covers where the data behind those answers comes from. A merchant can publish product facts through three channels. Each channel has different strengths, a different failure mode, and a different owner inside your organization.
This chapter assumes you can read simple XML and JSON, know what a product page and a SKU are, and can run a short Python script. It does not cover individual attributes in detail. Later chapters do that.
The three channels
Shopping systems cannot read your catalog database. They see only what you publish, and you publish it in three ways.
- A product feed is a file or API payload that lists every product with named attributes such as
id,title,price, andavailability. You send it to a platform. It is bulk, structured, and declared by you. - Page markup is machine-readable data embedded in each product page, usually schema.org
ProductandOfferobjects in JSON-LD. A crawler fetches the page and reads it. It is per-URL and discovered by the system. - A merchant account holds facts about you as a seller instead of any single product. Examples are business identity, country, shipping services, return policies, and which feeds are connected. Google Merchant Center is the best-known example.
A fourth source, the visible text and images on the page, also matters. A system can compare the text on the page with what the feed and markup claim.
The feed passes through the merchant account, because the account is where a feed is registered and processed. The crawler path is separate. The shopping system joins the two and compares them.
What each channel does well
Feeds
A feed is the primary channel for catalog-scale facts. It gives the platform every product in one pass, in a fixed vocabulary, without requiring a crawl. You control timing, so you can push a price change within minutes.
Feeds have three weaknesses:
- They are only as correct as your export job. A broken mapping can write the wrong currency into 40,000 items at once.
- They are a copy of the truth. Once the catalog changes, the feed is stale until the next upload.
- They do not show what a shopper sees. A feed can claim
in_stockwhile the page says "sold out".
Page markup
Markup lives where the shopper lands, so it is generated from the same template that renders the price on screen. That makes it the best check on the feed. It also lets systems find products you never submitted.
Markup also has weaknesses:
- Crawlers fetch pages on their own schedule, so changes appear with a delay you do not control.
- Pages that need JavaScript to render the markup may be read incompletely.
- Markup covers one product per URL. It cannot carry account-level facts such as a store-wide return policy as reliably as a feed or account setting can.
Merchant accounts
The account answers "who is selling this?" and "on what terms?" Typical contents:
- Verified business name, website URL, and contact details.
- Shipping services and rates, often set once and applied to many products.
- Return policy and return window.
- Feed registrations with their schedules.
- Program enrollments, such as free product listings.
- A diagnostics area that reports errors and policy problems.
Account-level data reduces repetition. If every product ships under the same rates, one setting is easier to keep correct than a thousand per-item attributes. The account is also where a platform learns that you are a real, reachable business, which affects eligibility.
| Channel | Scope | Who triggers the update | Typical delay | Main risk |
|---|---|---|---|---|
| Feed | Whole catalog | You | Minutes to a day | Stale or wrongly mapped export |
| Page markup | One URL | The crawler | Hours to days | Markup differs from visible page |
| Merchant account | The seller | You, in settings | Immediate in the account | Settings drift from real policy |
How the platform combines them
Platforms differ in the details and rarely publish exact rules, so treat the following as a working model. It is not a specification.
- The feed supplies the candidate list. Each item is validated against the attribute specification.
- The platform crawls the landing page for each item and compares price, availability, and sometimes identifiers with the feed.
- Account-level settings fill gaps such as shipping and returns, and they gate whether you are eligible at all.
- Items that pass are eligible for listings. Items that fail get a disapproval or warning in diagnostics.
The practical result is that the three channels must say the same thing. When they disagree, systems tend to trust none of them. At best the item is flagged for a mismatch. At worst it is removed. A later chapter covers consistency in depth. For now, treat it as the reason all three channels are generated from one source of truth.
Choosing which channel to start with
Most merchants end up using all three. The order you build them in depends on your situation.
- You have a catalog database and a developer. Start with markup in your product page template. It is the cheapest to ship, and it improves how crawlers read every page. Then add a feed.
- You sell through a hosted store platform. Check what it already generates. Many emit basic markup and can export a feed. Your work is to fill the missing fields and correct the defaults.
- You need to push frequent price or stock changes. Prioritize a feed with scheduled or API-based updates, because crawl timing is not under your control.
- You are opening a new account. Complete business verification and shipping and return settings early. A feed cannot make you eligible if the account is incomplete.
Inspecting your own page markup
You can see your markup the way a crawler does. The script below fetches a page, extracts every JSON-LD block, finds Product objects (including those inside @graph), and prints their price data. It uses only the Python standard library.
import json
import sys
import urllib.request
from html.parser import HTMLParser
class JsonLdParser(HTMLParser):
def __init__(self):
super().__init__()
self.in_jsonld = False
self.blocks = []
self._buffer = []
def handle_starttag(self, tag, attrs):
if tag == "script" and dict(attrs).get("type") == "application/ld+json":
self.in_jsonld = True
self._buffer = []
def handle_data(self, data):
if self.in_jsonld:
self._buffer.append(data)
def handle_endtag(self, tag):
if tag == "script" and self.in_jsonld:
self.in_jsonld = False
self.blocks.append("".join(self._buffer))
def find_products(node):
if isinstance(node, list):
for child in node:
yield from find_products(child)
elif isinstance(node, dict):
kind = node.get("@type")
kinds = kind if isinstance(kind, list) else [kind]
if "Product" in kinds:
yield node
yield from find_products(node.get("@graph", []))
def main(url):
request = urllib.request.Request(url, headers={"User-Agent": "markup-check/1.0"})
with urllib.request.urlopen(request, timeout=15) as response:
html = response.read().decode("utf-8", errors="replace")
parser = JsonLdParser()
parser.feed(html)
found = 0
for block in parser.blocks:
try:
data = json.loads(block)
except json.JSONDecodeError:
print("invalid JSON-LD block skipped")
continue
for product in find_products(data):
found += 1
offers = product.get("offers", [])
if isinstance(offers, dict):
offers = [offers]
for offer in offers:
print(product.get("name"), offer.get("price"),
offer.get("priceCurrency"), offer.get("availability"))
print("products found: " + str(found))
return 0 if found else 1
if __name__ == "__main__":
sys.exit(main(sys.argv[1]))Run it with python check_markup.py https://www.example.com/p/trail-runner-jacket. Then compare the printed price, currency, and availability with the matching feed item. If the script finds zero products, the markup is missing, invalid, or injected by JavaScript after load. Many simple crawlers do not run JavaScript, so server-rendered markup is safer.
Common errors
- Treating the feed as the only source. Markup is often what lets a crawler confirm the feed. Missing markup removes a cross-check.
- Different generators for each channel. A feed built by one team and markup by another drift apart within weeks. Generate both from one data layer.
- Leaving account settings at defaults. A shipping rate set up during onboarding and never revisited can contradict the shipping cost shown at checkout.
- Blocking the crawler. A
robots.txtrule or login wall on product pages stops the landing-page check from working. - Markup for variants only on the default. If a page offers several colors, markup that describes one while the feed describes another creates a mismatch. Variants are covered in a later chapter.
Exercise
A store's feed lists a jacket as in_stock at 89.00 USD, but the product page's JSON-LD shows OutOfStock and the same price. Which channels disagree, and what is the most reliable long-term fix?
Show answer
The feed and the page markup disagree on availability. The price agrees. The long-term fix is to generate both from the same inventory data, so one stock change updates both. Pushing a more frequent feed update treats the symptom but not the cause. Checking that the visible page matches the markup is also needed, because the page is the shopper's final view.
Exercise
Name one fact that is best stored in a merchant account instead of on each product, and say why.
Show answer
A store-wide shipping rate or return policy. It applies to many products, so one setting stays accurate more easily than thousands of per-item values that can drift apart.