Build AI agents that access live, trusted product data.

TrustRails standardises messy retailer feeds into one predictable API. Use our SDK or REST API to search products by query, brand, category, and price range in real time.

Why use TrustRails?

Without TrustRails → 20 feeds, 10 CSV formats, constant breakage
With TrustRails → 1 API, 1 schema, live structured data

Save weeks of integration time and focus on building your project, not babysitting product feeds.

Quickstart

import TrustRails from "@trustrails/sdk";

const trustrails = new TrustRails(process.env.TRUSTRAILS_KEY);
// The SDK sets Authorization: Bearer <TRUSTRAILS_KEY> automatically

async function main() {
  const res = await trustrails.search({
    query: "laptop",
    brand: "HP",
    minPrice: 400,
    maxPrice: 600,
    category: "Laptops"
  });
  console.log(res.products);
  // [{
  //   id: "hp-laptop-001",
  //   title: "HP 15.6\" Laptop - Intel Core i5, 512GB SSD",
  //   brand: "HP",
  //   price: 549,
  //   availability: "in_stock",
  //   category: "Laptops",
  //   product_type: "product",
  //   ...
  // }]
}

main();

Or use cURL:

curl -s "https://trustrails.app/api/search?query=laptop&brand=HP&min_price=400&max_price=600" \
  -H "Authorization: Bearer $TRUSTRAILS_KEY"

Free API Key: Use mcp-public-2026 for free access (100 requests/hour). For higher limits, contact us for a production key. Or try the Live Explorer (no auth required).

Error responses

All errors return a consistent JSON structure:

{
  "error": {
    "type": "auth_error",
    "message": "Missing or invalid token",
    "request_id": "req_abc123"
  }
}

API Endpoints

EndpointDescriptionExample
GET /api/searchSearch products. Returns summary data (title, price, availability). For full specs, use /api/product/[id]/api/search?query=laptop&lite=true&limit=10
GET /api/product/[id]Full details: complete specs, description, stock, delivery, and retailer source/api/product/usb001
GET /api/healthCheck API status (no auth)/api/health

Install the SDK

npm install @trustrails/sdk

The SDK handles everything for you:

TypeScript types

Full type safety and autocomplete

Error handling

Clear error messages with status codes

Simple method names

search(), product()

Auto-includes provenance

Currency helpers & data freshness