> ## Documentation Index
> Fetch the complete documentation index at: https://docs.triqai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Node.js / TypeScript SDK

> Official Node.js / TypeScript SDK for the Triqai Transaction Enrichment API

The official [Node.js / TypeScript SDK](https://www.npmjs.com/package/triqai) for the Triqai Transaction Enrichment API.

Enrich raw bank transaction descriptions into structured data: merchants, categories, locations, intermediaries, and more — with full TypeScript support.

<Info>
  The SDK requires **Node.js 18+** (uses native `fetch`). It also works in **Bun**, **Deno**, and **Cloudflare Workers**.
</Info>

## Installation

<CodeGroup>
  ```bash npm theme={null}
  npm install triqai
  ```

  ```bash yarn theme={null}
  yarn add triqai
  ```

  ```bash pnpm theme={null}
  pnpm add triqai
  ```
</CodeGroup>

## Quick Start

```typescript theme={null}
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:

<CardGroup cols={2}>
  <Card title="Transactions" icon="arrow-right-arrow-left" href="/sdk/transactions">
    Enrich, list, get, and delete transactions with full pagination support
  </Card>

  <Card title="Resources" icon="database" href="/sdk/resources">
    Look up categories, merchants, locations, intermediaries, and issue reports
  </Card>

  <Card title="Error Handling" icon="triangle-exclamation" href="/sdk/error-handling">
    Typed error classes for every HTTP status with automatic retries
  </Card>

  <Card title="Configuration" icon="gear" href="/sdk/configuration">
    Timeouts, retries, debug hooks, custom headers, and more
  </Card>
</CardGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="Configuration" icon="gear" href="/sdk/configuration">
    Customize timeouts, retries, headers, and debug hooks
  </Card>

  <Card title="API Reference" icon="code" href="/api-reference/introduction">
    See the full REST API documentation
  </Card>
</CardGroup>
