Skip to main content
bridgly is the official TypeScript/JavaScript client for the Bridgly API. It wraps every LinkedIn, X (Twitter), and Reddit endpoint — plus API-key and billing management — in typed methods, so your editor autocompletes each request field and knows the exact shape of every response.

Fully typed

Request and response types are generated from the same schemas the API validates against, so they never drift.

No exceptions to catch

Every method returns a discriminated result you branch on — success or error, always typed.

One client, every platform

Grouped namespaces: client.x, client.reddit, client.linkedin, plus client.apiKeys and client.billing.

Zero dependencies to manage

Uses the built-in fetch. Works in Node.js 18+ and modern runtimes.

Install

npm install bridgly
pnpm add bridgly
yarn add bridgly
bun add bridgly

Create a client

Construct the client once with your API key and reuse it across your app. Get a key from the API Keys page of your dashboard.
import { Bridgly } from 'bridgly';

const client = new Bridgly({ apiKey: process.env.BRIDGLY_API_KEY });
Keep your key server-side. Never ship it in a browser bundle, mobile app, or public repository — anyone with the key can spend your credits.

Configuration

new Bridgly({
  apiKey: 'bgly_...', // required
  baseUrl: 'https://api.bridgly.app', // optional — override the API base URL
});
apiKey
string
required
Your Bridgly API key. Starts with bgly_. The client throws immediately if this is missing or empty.
baseUrl
string
Override the API base URL. Defaults to the hosted Bridgly API. Useful for pointing at a staging environment.

Next steps

Quickstart

Make your first typed call and read the result.

Functions

Every scraping function across X, Reddit, and LinkedIn.

Account management

Create keys and manage credits from code.

Errors

Handle API and network failures predictably.