Guide, for agent builders
A product catalog API your AI agent can call
Your agent passes on what the shopper typed, "a 4 person tent under 120". Storag searches your own catalog, applies the price, stock and sort it finds in those words, and an LLM judge drops the products that do not fit. Your agent gets back a short list it can show as it is.
1. One request, no key
Our demo store is a fictional 2,000-product outdoor catalog. Ask it the way a shopper would:
curl "https://storag.ai/api/v1/storag/demo/search?q=4+person+tent+under+120&page_size=3"Response, shortened:
{
"query": "4 person tent under 120",
"results": [
{ "rank": 1, "product": { "id": "DEMO-1942",
"title": "Larchline Brisk 4-Person Family Tent",
"price": { "amount": 97.99, "currency": "EUR" },
"availability": "in stock",
"link": "https://storag.ai/demo#DEMO-1942" } },
{ "rank": 2, "product": { "id": "DEMO-1718",
"title": "Northfold 4-Person Backpacking Tent",
"price": { "amount": 73.9, "currency": "EUR" }, ... } },
...
],
"total": 13, "page": 1, "pageSize": 3,
"meta": { "judged": true, "complete": false, "alternatives": false, "fallback": null }
}"under 120" became a price filter: every tent in the answer costs less than 120 EUR. Over 20 judged searches on the demo, the median round trip was 0.44 seconds (measured 1 December 2026).
2. Hand it to your model as a tool
One tool, one argument. The model passes the shopper's words; your code calls the API and returns the fields the model needs to answer and link. This runs as it is against the demo, and searches your catalog once STORAG_API_KEY is set:
import os, requests
STORAG = "https://storag.ai/api/v1/storag"
# The tool you hand your model (OpenAI Responses API style; other SDKs take the same JSON Schema).
SEARCH_TOOL = {
"type": "function",
"name": "search_products",
"description": "Search the store's catalogue. Pass the shopper's own words; "
"phrases like 'under 150', 'in stock' or 'cheapest' are applied as filters.",
"parameters": {
"type": "object",
"properties": {"q": {"type": "string", "description": "What the shopper asked for"}},
"required": ["q"],
},
}
def search_products(q: str) -> dict:
"""Run the tool call. Without STORAG_API_KEY it searches the keyless demo catalogue."""
key = os.environ.get("STORAG_API_KEY")
url = f"{STORAG}/search" if key else f"{STORAG}/demo/search"
headers = {"Authorization": f"Bearer {key}"} if key else {}
r = requests.get(url, params={"q": q, "page_size": 5}, headers=headers, timeout=10)
r.raise_for_status()
data = r.json()
return {
"judged": data["meta"]["judged"],
"products": [
{k: x["product"][k] for k in ("id", "title", "price", "availability", "link")}
for x in data["results"]
],
}
print(search_products("4 person tent under 120")) If your agent speaks MCP, skip the wrapper: the same search is the search_products tool on https://mcp.storag.ai/mcp.
3. When nothing fits, the list is empty
The demo store sells no sleeping mats. Keyword search finds the word "sleeping" and fills a page with sleeping bags. The judged search returns nothing, so your agent can say "we do not carry that" instead of offering a sleeping bag:
curl "https://storag.ai/api/v1/storag/demo/search?q=sleeping+mat"
# "total": 0, "results": [], "meta": { "judged": true, ... }curl "https://storag.ai/api/v1/storag/demo/search/text?q=sleeping+mat"
# "total": 125, first result "Northfold Alder 5 °C Down Sleeping Bag" Every answer carries meta, so the agent knows how far to trust the list:
4. Your own catalog
- Sign up and create a project.
- Paste the URL of your Google Merchant feed (XML, CSV or TSV). The feed guide shows which fields Storag reads.
- Copy the project's API key into
STORAG_API_KEY.
Each key reads only its own project's catalog. Free up to 5,000 products and 5,000 queries a month, no credit card.
What it does not do
- It searches and reads products. No cart, checkout or orders.
- Read-only: the catalog comes from your feed, and the API never changes it.
- Hosted only, no self-hosted version.