decoindex
Agent-readable mirrors of ecommerce storefronts.
Put decoindex.com/ in front of any VTEX or Shopify storefront URL and get
normalized Markdown instead of a megabyte of client-rendered HTML:
https://www.farmrio.com.br/moda-feminina/acessorios
https://decoindex.com/farmrio.com.br/moda-feminina/acessorios
That is the whole convention. Strip the scheme and www., keep the path. No
extension, no key, no login, no SDK — the URL is the API, because the agents we
want are already holding a URL and have nothing installed.
Nothing is crawled ahead of time. The first request resolves that one URL
against the merchant's own public catalog API, renders it, and stores it — so any
URL works immediately, and costs nothing the second time.
Surfaces
| Route | Returns |
|---|
/{domain} | Storefront overview: categories, best sellers, the terms its own shoppers search for. Start here. |
/{domain}/{any storefront path} | Product or category listing as Markdown |
?page=N | Paginate a listing |
?sort=price_asc | Order the whole catalog, not just the page you were handed. Also price_desc, name_asc, name_desc, discount, new. |
/{domain}/search?q= | Search that storefront. /busca/{words} works too — it is the path the store itself uses. |
....json | Any of the above as structured JSON instead of Markdown |
/llms.txt | Machine index: the convention, and the storefronts checked to work |
/benchmark | Measured cost of reading a storefront both ways |
POST /feedback | Tell us a document is wrong. Public, unauthenticated, rate-limited per IP. |
/mcp | The same reads as MCP tools, for hosts that prefer a tool to a fetch |
/about, /opt-out | The service itself |
Markdown is the default representation — no extension needed. .md is
accepted and identical; .json is the same document structured.
A product page carries frontmatter (canonical URL, platform, currency, observed
price, availability), a variant table with a cart link per in-stock SKU that
builds a cart on the merchant's own checkout, the facts the platform asserts, and
an explicit statement of what is not verified.
What it does not answer
Live stock for a chosen variant, final price after cart promotions and coupons,
delivery dates for an address, anything priced for one shopper. Those belong to
the merchant and change by the second. Every response states the boundary rather
than guessing — an agent that promises what a merchant cannot honour costs the
merchant a return, a support ticket and a customer.
Supported platforms
VTEX and Shopify — both address their catalog JSON with the same paths
their storefront uses, which is what makes a URL swap possible without a crawl.
See src/server/platform/detect.ts.
Wake requires a per-merchant TCS-Access-Token, so it cannot work zero-config; it
belongs to the paid tier. Everything else returns an honest "could not read this"
rather than a guess.
Architecture
One Cloudflare Worker, two bindings, no build step.
GET /{domain}/{...path}[.md|.json]
1. Cache API hit -> return
2. KV md:{domain}{path} hit -> return (+ refresh in waitUntil if stale)
3. miss: registry -> platform (detect once, ever)
resolve() <= 2 upstream calls, 6s each
render -> Markdown or JSON
waitUntil: KV put (no TTL), D1 event
D1 holds the registry (which domain is on which platform, at which origin)
plus the append-only events table and agent feedback. KV holds the rendered
documents, written without a TTL — that is the index, not a cache. Only
negative results expire.
Reads are bounded and never crawl: at most two upstream calls, rate-limited per
merchant domain, negative-cached. A read never enumerates a catalog and never
renders HTML. That bound is what stops anyone using this as an amplifier against a
storefront — and it is why ?q= and ?sort= are served by the merchant's own
search and catalog endpoints rather than by an index of ours.
/mcp serves the same reads over MCP, in two tiers off one URL. Anonymous
callers get navigate_storefront, search_storefront and list_storefronts —
each one resolves through the same readThrough() as a GET, so a tool call and
its URL twin share a cache entry. A caller holding MCP_AUTH_TOKEN additionally
gets the operator control plane (feedback triage, traffic stats). Tools a caller
may not invoke are never advertised to it.
More detail, including the gotchas already paid for, in CLAUDE.md.
Run it
npm install
npm run db:local # apply migrations to the local D1
npm run dev # http://127.0.0.1:8799
npm run smoke # end-to-end checks against live storefronts
npm run check # tsc --noEmit