logoalt Hacker News

Show HN: CommerceTXT – An open standard for AI shopping context (like llms.txt)

18 pointsby tsazanlast Tuesday at 3:12 PM35 commentsview on HN

Hi HN, author here.

I built CommerceTXT because I got tired of the fragility of extracting pricing and inventory data from HTML. AI agents currently waste ~8k tokens just to parse a product page, only to hallucinate the price or miss the fact that it's "Out of Stock".

CommerceTXT is a strict, read-only text protocol (CC0 Public Domain) designed to give agents deterministic ground truth. Think of it as `robots.txt` + `llms.txt` but structured specifically for transactions.

Key technical decisions v1.0:

1. *Fractal Architecture:* Root -> Category -> Product files. Agents only fetch what they need (saves bandwidth/tokens).

2. *Strictly Read-Only:* v1.0 intentionally excludes transactions/actions to avoid security nightmares. It's purely context.

3. *Token Efficiency:* A typical product definition is ~380 tokens vs ~8,500 for the HTML equivalent.

4. *Anti-Hallucination:* Includes directives like @INVENTORY with timestamps and @REVIEWS with verification sources.

The spec is live and open. I'd love your feedback on the directive structure and especially on the "Trust & Verification" concepts we're exploring.

Spec: https://github.com/commercetxt/commercetxt Website: https://commercetxt.org


Comments

theturtletalkstoday at 5:08 PM

I’m working on a decentralized marketplace and for now, we tap into the store’s e-commerce platform API to get the inventory, handle cart creation, etc.

I commend you for trying to start a standard. Letting the established players establish standards and protocols just gives them a bigger moat and more influence.

Pay very close attention to e-commerce and conversational commerce, rent seekers are pushing protocols.

show 1 reply
reddalotoday at 12:23 PM

We should stop polluting website roots with these files (including llms.txt).

All these files should be registered with IANA and put under the .well-known namespace.

https://en.wikipedia.org/wiki/Well-known_URI

show 1 reply
amitav1today at 12:57 PM

Wait, am I dumb, or did the authors hallucinate? @INVENTORY says that 42 are in stock, but the text says "Only 3 left". Am I misunderstanding this or does stock mean something else?

show 1 reply
throwaway_20357today at 2:07 PM

Can shops not just embed Schema/JSON-LD in the page if they want their information to be machine readable?

show 1 reply
hrimfaxitoday at 3:27 PM

How do you avoid downloading the whole haystack to search through the data? How does the hierarchy work? I have to keep a bunch of .txt files updated in my web root? Doesn't this require essentially mirroring the inventory db as text files (if the intent is for accurate counts of items, etc they would need to be updated in real time)?

show 1 reply
pdntspatoday at 4:10 PM

This would have been great if it was adopted while I was still working on shopping site scrapers

show 1 reply
duskdozertoday at 1:16 PM

I'm not sure I understand the point of this as opposed to something like a json file, and also, assuming there is any type of structured format, why one would use an LLM for this task instead of a normal parser.

show 1 reply
captn3m0today at 2:38 PM

How is "schema.org compatibility" related to Legal Compliance?

show 1 reply