npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@bridgly/sdk

v0.2.2

Published

Official TypeScript/JavaScript SDK for the Bridgly social scraping API

Readme

Bridgly SDK

Official TypeScript/JavaScript client for the Bridgly social scraping API. Fully typed requests and responses for every LinkedIn, X (Twitter), Reddit, GitHub, Instagram, and TikTok endpoint, plus API-key and billing management.

Install

npm install @bridgly/sdk
# or
pnpm add @bridgly/sdk

Quick start

import { Bridgly } from '@bridgly/sdk';

const client = new Bridgly({ apiKey: 'bgly_...' });

const res = await client.reddit.getUser({ username: 'spez' });
if (res.type === 'success') {
  console.log(res.data); // typed Reddit user profile
  console.log(res.creditsCost); // credits this call consumed
} else {
  console.error(res.status, res.message);
}

API and network failures return a discriminated union. Invalid request inputs can throw a Zod validation error before a request is sent, and the constructor throws if the API key is missing or empty.

Scraping results use this union:

type ApiResult<T> =
  | { type: 'success'; data: T; timeMs: number; creditsCost: number }
  | { type: 'error'; status: number; message: string };

Configuration

new Bridgly({
  apiKey: 'bgly_...', // required
  baseUrl: 'https://api.bridgly.app', // optional, defaults to the hosted API
});

Namespaces

The client groups endpoints by platform. Inputs and outputs are typed from the shared API schemas, so your editor autocompletes every field.

client.x — X (Twitter)

getTweetDetail, search, searchUsers, getUser, getUserTweets, getUserReplies, getUserMedia, getFollowers, getFollowing, getTweetRetweeters, getTweetQuotes

const tweets = await client.x.getUserTweets({ userId: '44196397', count: 10 });

client.reddit — Reddit

getPost, getComment, getSubreddit, getUser, listUserPosts, listUserComments, listUserOverview, listSubredditPosts, listSubredditComments, searchAll, searchCommunities, searchPosts, searchUsers, searchComments

const posts = await client.reddit.listSubredditPosts({
  subreddit: 'programming',
  sort: 'top',
  count: 10,
});

client.linkedin — LinkedIn

getCompanyFromUrl, getProfileFromUrl, getJob, getPostsFromCompany, getPostsFromProfile, getPostDetail, getActivityComments, getProfileComments, getProfileReactions, getPostReactions, and the search verticals searchAll, searchCompanies, searchCourses, searchEvents, searchGroups, searchJobs, searchPeople, searchPosts, searchProducts, searchSchools, searchServices

const jobs = await client.linkedin.searchJobs({
  keyword: 'engineer',
  location: 'Remote',
  count: 10,
});

client.github — GitHub

getProfile, getContributions, listRepositories, listStarred, listProjects, and the search functions searchRepositories, searchCode, searchCommits, searchIssues, searchPullRequests, searchDiscussions, searchUsers, searchTopics (each takes structured filters compiled into GitHub search qualifiers)

const profile = await client.github.getProfile({ username: 'torvalds' });
if (profile.type === 'success') {
  console.log(profile.data.pinnedRepos);
}

client.instagram — Instagram

getUser, getUserPosts, getFollowers, getFollowing, getPost, getPostComments, searchUsers

const followers = await client.instagram.getFollowers({
  username: 'instagram',
  count: 10,
});

Use a username for profiles, posts, followers, and following. For individual posts and comments, use the shortcode from the post URL.

client.tiktok — TikTok

getUser

const profile = await client.tiktok.getUser({ uniqueId: 'tiktok' });
if (profile.type === 'success') console.log(profile.data);

client.youtube — YouTube

getVideo

const video = await client.youtube.getVideo({
  url: 'https://www.youtube.com/watch?v=dQw4w9WgXcQ',
  includeTranscript: true,
});

Account management

client.apiKeys

const created = await client.apiKeys.create({ name: 'production' });
if (created.type === 'success') {
  console.log(created.data.rawKey); // shown once — store it now
}

const keys = await client.apiKeys.list();
await client.apiKeys.revoke({ id: 'key_123' });

client.billing

const info = await client.billing.getInfo();
if (info.type === 'success') console.log(info.data.credits);

const checkout = await client.billing.buyCredits({ amountUsd: 20 });
await client.billing.updateAutoTopUp({
  enabled: true,
  thresholdCredits: 500,
  amountUsd: 20,
});

Importing types

Every request and response type is re-exported:

import type {
  GetXUserRequest,
  XUserResponse,
  RedditUserResponse,
  GetTikTokUserRequest,
  TikTokUserResponse,
  TikTokUser,
} from '@bridgly/sdk';

License

MIT