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 query products by brand, price, and stock in real time.

Try Live Explorer

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: "Anker", maxPrice: 30 });
  console.log(res.products);
  // [{
  //   id: "anker-65w",
  //   title: "Anker 65W USB-C Charger",
  //   price: 29.99,
  //   availability: "in_stock",
  //   ...
  // }]
}

main();

Or use cURL:

curl -s "https://www.trustrails.app/api/search?query=Anker&max_price=30" \
  -H "Authorization: Bearer $TRUSTRAILS_KEY"

Getting an API key: Contact us to get started with your API key for production use. For testing, 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 with filters/api/search?query=Anker&max_price=30
GET /api/product/[id]Lookup a single product/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

Coming soon

More electronics product categories 🎧

Beyond USB-C chargers