Skip to main content
The official Node.js / TypeScript SDK for the Triqai Transaction Enrichment API. Enrich raw bank transaction descriptions into structured data: merchants, categories, locations, intermediaries, and more — with full TypeScript support.
The SDK requires Node.js 18+ (uses native fetch). It also works in Bun, Deno, and Cloudflare Workers.

Installation

npm install triqai

Quick Start

import Triqai from "triqai";

const triqai = new Triqai("triq_your_api_key");

const result = await triqai.transactions.enrich({
  title: "STARBUCKS SEATTLE WA",
  country: "US",
  type: "expense",
});

console.log(result.data.transaction.category.primary.name);
// => "Food & Dining"

console.log(result.data.entities);
// => [{ type: "merchant", data: { name: "Starbucks", ... } }, ...]

What’s Included

The SDK provides typed methods for every Triqai API endpoint:

Transactions

Enrich, list, get, and delete transactions with full pagination support

Resources

Look up categories, merchants, locations, intermediaries, and issue reports

Error Handling

Typed error classes for every HTTP status with automatic retries

Configuration

Timeouts, retries, debug hooks, custom headers, and more

Next Steps

Configuration

Customize timeouts, retries, headers, and debug hooks

API Reference

See the full REST API documentation