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

@socialcrow/sdk

v1.0.1

Published

Official TypeScript SDK for the SocialCrow API

Readme

@socialcrow/sdk

Official TypeScript SDK for the SocialCrow API.

Installation

npm install @socialcrow/sdk
# or
pnpm add @socialcrow/sdk
# or
yarn add @socialcrow/sdk

Requires Node.js 18 or later.

Quick Start

import { SocialCrowClient } from "@socialcrow/sdk";

const client = new SocialCrowClient({ apiKey: "sk_live_..." });

const result = await client.orders.create({
  serviceId: "1234",
  link: "https://instagram.com/username",
  quantity: 1000,
});

if (!result.ok) {
  console.error(result.error.code, result.error.message);
} else {
  console.log("Order created:", result.data.orderId);
}

Error Handling

Every method returns Result<T> — it never throws. Always check result.ok before accessing result.data.

const result = await client.balance.get();

if (result.ok) {
  console.log(result.data.balance); // "12.5000"
} else {
  // result.error is typed as ApiError
  console.error(result.error.code);    // e.g. "UNAUTHORIZED"
  console.error(result.error.message); // human-readable description
}

Requests time out after 10 seconds and return { ok: false, error: { code: "NETWORK_ERROR", message: "Request timed out after 10 seconds." } }.

Resources

client.services

// List all available services
const result = await client.services.list();
// result.data → Service[]

client.orders

// Create an order
const result = await client.orders.create({
  serviceId: "1234",
  link: "https://instagram.com/username",
  quantity: 1000,
  // Optional for drip-feed services:
  runs: 10,
  interval: 60, // minutes between runs
  // Optional for comment-type services:
  comments: ["Great post!", "Love this"],
});
// result.data → { orderId: string }

// Get a single order's status
const result = await client.orders.status("ABC123456789DE");
// result.data → OrderDetail

// Get status for up to 100 orders in one request
const result = await client.orders.statusBulk(["ABC123456789DE", "BBB123456789DE"]);
// result.data → Record<string, OrderDetail | { error: string }>

// List your orders (paginated)
const result = await client.orders.list({ page: 1 });
// result.data → { orders: OrderSummary[], page, pageSize, total, totalPages }

client.balance

const result = await client.balance.get();
// result.data → { balance: "12.5000", currency: "USD" }

client.refills

Refills let you re-deliver followers/views/etc. for an order whose count has dropped. The service must have refill: true.

// Request a refill for a single order
const result = await client.refills.request("ABC123456789DE");
// result.data → { refillId: string, orderId: string, status: "pending" }
// Returns REFILL_NOT_ELIGIBLE if the service doesn't support refills.

// Get the refill status for an order
const result = await client.refills.get("ABC123456789DE");
// result.data → RefillStatusResult

// Request refills for up to 100 orders at once
const result = await client.refills.bulkRequest(["ABC123456789DE", "BBB123456789DE"]);
// result.data → Record<string, RefillCreateResult | { error: string }>

// Get refill status for up to 100 orders at once
const result = await client.refills.bulkStatus(["ABC123456789DE", "BBB123456789DE"]);
// result.data → Record<string, RefillStatusResult | { error: string }> 

Configuration

const client = new SocialCrowClient({
  apiKey: "sk_live_...",      // required
  baseUrl: "https://...",    // optional — defaults to https://www.socialcrow.co
});

Error Codes

| Code | Description | |---|---| | UNAUTHORIZED | Invalid or missing API key | | SERVICE_NOT_FOUND | The requested service does not exist | | SERVICE_INACTIVE | The service is currently disabled | | INVALID_QUANTITY | Quantity is outside the service min/max range | | INVALID_LINK | The link field is missing or malformed | | MISSING_COMMENTS | Comment-type service requires a comments array | | DRIPFEED_NOT_SUPPORTED | Drip-feed params sent for a non-drip-feed service | | INVALID_DRIPFEED_PARAMS | Invalid runs or interval values | | INSUFFICIENT_BALANCE | Account balance too low to cover the order | | ORDER_NOT_FOUND | Order ID does not exist or belongs to another account | | TOO_MANY_ORDERS | Bulk request exceeded the 100-order limit | | REFILL_NOT_ELIGIBLE | Service does not support automatic refills | | INVALID_REQUEST | General validation failure — see error.message for details | | RATE_LIMITED | Too many requests — back off and retry | | INTERNAL_ERROR | Unexpected server error | | NETWORK_ERROR | Request failed at the network level (DNS, timeout, connection refused) |

TypeScript

All request and response types are exported:

import type {
  SocialCrowClientConfig,
  Service,
  OrderCreateParams,
  OrderCreateResult,
  OrderDetail,
  OrderSummary,
  OrderListParams,
  OrderListResult,
  OrderStatus,
  BulkOrderStatusResult,
  RefillCreateResult,
  RefillStatusResult,
  RefillStatus,
  BulkRefillCreateResult,
  BulkRefillStatusResult,
  BalanceResult,
  Result,
  ApiError,
  ApiErrorCode,
} from "@socialcrow/sdk";