Skip to main content
Membit’s Python SDK provides a simple interface to the Membit API. Add intelligent search and content discovery directly to your apps with sync and async support.

Installing

Or with uv:
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

Async Support

For applications that need high performance or handle multiple concurrent requests:

Defaults and Configuration

All search methods support these options (defaults shown):
  • limit: 10 — Maximum number of results to return
  • output_format: “json” — “json” for structured data, “llm” for text
  • timeout: 60 — Request timeout in seconds

Environment Variables

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

Examples

Complete working examples are available in membit-python’s examples/ directory:
  • examples/client.py — Synchronous client usage
  • examples/async_client.py — Asynchronous client usage