Skip to main content
Membit’s JavaScript/TypeScript SDK provides a simple, strongly-typed interface to the Membit API. Add intelligent search and content discovery directly to your apps with first-class TypeScript support and automatic type inference.

Installing

Discover trending topics and clusters of related content. Ideal for understanding what’s trending and grouping related discussions.

Usage

Membit Cluster Info

Fetch detailed information about a specific cluster. Use this to dive deeper into topics discovered via cluster search.

Usage

Membit Post Search

Search for individual posts across the Membit corpus. Perfect for finding specific content and examples.

Usage

TypeScript Benefits

Method Overloads

Format Options

Configuration Options

Default Parameters

All search methods use these defaults when options are not specified:
  • limit: 10 — Maximum number of results to return
  • format: “json” — Return structured data as objects
  • timeout: 60 — Request timeout in seconds

Environment Variables

You can set your API key via environment variable:
If apiKey is not provided in the client options, the SDK will automatically use MEMBIT_API_KEY.

Examples

See membit-js’s examples/ directory for more comprehensive usage:
  • examples/basic-usage.ts — Complete workflow with realistic API usage