Skip to main content
We are actively developing the documentation, some pages may have missing or incomplete content.
The SW Combine SDK is a TypeScript library for interacting with the Star Wars Combine API v2.0. It covers all 60+ endpoints across 11 resource categories — characters, factions, the galaxy, inventory, market, news, events, types, location, datacards, and API utilities — and handles OAuth 2.0 authentication, automatic token refresh, pagination, and retries so you can focus on building your application.

Key features

TypeScript First

Full type definitions for every endpoint, parameter, and response.

OAuth 2.0 Built-in

Complete OAuth flow with authorization URL generation, callback handling, and automatic token refresh.

Pagination

Auto-paginate through list endpoints with for await...of and control page size with pageSize.

Automatic Retries

Exponential backoff for network errors, 5xx responses, and rate limit hits. Respects Retry-After headers from the API.

Minimal Footprint

A single production dependency, axios.

Supported resources

The client exposes all 11 resource categories through a single SWCombine instance:
The SDK also exports a Timestamp utility for working with Combine Galactic Time (CGT), which uses the Star Wars Combine’s custom calendar system.

Requirements

  • Node.js 18 or higher
  • TypeScript 5.5 or higher (for TypeScript projects)

Get started

Quickstart

Install the SDK, initialize a client, and make your first API call in under five minutes.

Installation

Detailed setup instructions including environment variables, ESM vs CJS configuration, and TypeScript setup.

Authentication

Set up OAuth 2.0, obtain access tokens, and configure automatic token refresh.

API resources

Browse all available resource methods with parameters and examples.