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

@getlatedev/node

v0.1.7

Published

The official Node.js library for the Late API

Readme

The official Node.js SDK for the Late API — schedule and publish social media posts across Instagram, TikTok, YouTube, LinkedIn, X/Twitter, Facebook, Pinterest, Threads, Bluesky, Reddit, Snapchat, Telegram, and Google Business Profile with a single integration.

Installation

npm install @getlatedev/node

Quick Start

import Late from '@getlatedev/node';

const late = new Late(); // Uses LATE_API_KEY env var

// Publish to multiple platforms with one call
const { data: post } = await late.posts.createPost({
  body: {
    content: 'Hello world from Late!',
    platforms: [
      { platform: 'twitter', accountId: 'acc_xxx' },
      { platform: 'linkedin', accountId: 'acc_yyy' },
      { platform: 'instagram', accountId: 'acc_zzz' },
    ],
    publishNow: true,
  },
});

console.log(`Published to ${post.platforms.length} platforms!`);

Configuration

const late = new Late({
  apiKey: 'your-api-key', // Defaults to process.env['LATE_API_KEY']
  baseURL: 'https://getlate.dev/api',
  timeout: 60000,
});

Examples

Schedule a Post

const { data: post } = await late.posts.createPost({
  body: {
    content: 'This post will go live tomorrow at 10am',
    platforms: [{ platform: 'instagram', accountId: 'acc_xxx' }],
    scheduledFor: '2025-02-01T10:00:00Z',
  },
});

Platform-Specific Content

Customize content per platform while posting to all at once:

const { data: post } = await late.posts.createPost({
  body: {
    content: 'Default content',
    platforms: [
      {
        platform: 'twitter',
        accountId: 'acc_twitter',
        platformSpecificContent: 'Short & punchy for X',
      },
      {
        platform: 'linkedin',
        accountId: 'acc_linkedin',
        platformSpecificContent: 'Professional tone for LinkedIn with more detail.',
      },
    ],
    publishNow: true,
  },
});

Upload Media

// 1. Get presigned upload URL
const { data: presign } = await late.media.getMediaPresignedUrl({
  body: { filename: 'video.mp4', contentType: 'video/mp4' },
});

// 2. Upload your file
await fetch(presign.uploadUrl, {
  method: 'PUT',
  body: videoBuffer,
  headers: { 'Content-Type': 'video/mp4' },
});

// 3. Create post with media
const { data: post } = await late.posts.createPost({
  body: {
    content: 'Check out this video!',
    mediaUrls: [presign.publicUrl],
    platforms: [
      { platform: 'tiktok', accountId: 'acc_xxx' },
      { platform: 'youtube', accountId: 'acc_yyy', youtubeTitle: 'My Video' },
    ],
    publishNow: true,
  },
});

Get Analytics

const { data } = await late.analytics.getAnalytics({
  query: { postId: 'post_xxx' },
});

console.log('Views:', data.analytics.views);
console.log('Likes:', data.analytics.likes);
console.log('Engagement Rate:', data.analytics.engagementRate);

List Connected Accounts

const { data } = await late.accounts.listAccounts();

for (const account of data.accounts) {
  console.log(`${account.platform}: @${account.username}`);
}

Error Handling

import Late, { LateApiError, RateLimitError, ValidationError } from '@getlatedev/node';

try {
  await late.posts.createPost({ body: { /* ... */ } });
} catch (error) {
  if (error instanceof RateLimitError) {
    console.log(`Rate limited. Retry in ${error.getSecondsUntilReset()}s`);
  } else if (error instanceof ValidationError) {
    console.log('Invalid request:', error.fields);
  } else if (error instanceof LateApiError) {
    console.log(`Error ${error.statusCode}: ${error.message}`);
  }
}

SDK Reference

Posts

| Method | Description | |--------|-------------| | posts.listPosts() | List posts visible to the authenticated user | | posts.bulkUploadPosts() | Validate and schedule multiple posts from CSV | | posts.createPost() | Create a draft, scheduled, or immediate post | | posts.getPost() | Get a single post | | posts.updatePost() | Update a post | | posts.deletePost() | Delete a post | | posts.retryPost() | Retry publishing a failed or partial post |

Accounts

| Method | Description | |--------|-------------| | accounts.getAllAccountsHealth() | Check health of all connected accounts | | accounts.listAccounts() | List connected social accounts | | accounts.getAccountHealth() | Check health of a specific account | | accounts.getFollowerStats() | Get follower stats and growth metrics | | accounts.getGoogleBusinessReviews() | Get Google Business Profile reviews | | accounts.getLinkedInMentions() | Resolve a LinkedIn profile or company URL to a URN for @mentions | | accounts.updateAccount() | Update a social account | | accounts.deleteAccount() | Disconnect a social account |

Profiles

| Method | Description | |--------|-------------| | profiles.listProfiles() | List profiles visible to the authenticated user | | profiles.createProfile() | Create a new profile | | profiles.getProfile() | Get a profile by id | | profiles.updateProfile() | Update a profile | | profiles.deleteProfile() | Delete a profile (must have no connected accounts) |

Analytics

| Method | Description | |--------|-------------| | analytics.getAnalytics() | Unified analytics for posts | | analytics.getLinkedInAggregateAnalytics() | Get aggregate analytics for a LinkedIn personal account | | analytics.getLinkedInPostAnalytics() | Get analytics for a specific LinkedIn post by URN | | analytics.getYouTubeDailyViews() | YouTube daily views breakdown |

Account Groups

| Method | Description | |--------|-------------| | accountGroups.listAccountGroups() | List account groups for the authenticated user | | accountGroups.createAccountGroup() | Create a new account group | | accountGroups.updateAccountGroup() | Update an account group | | accountGroups.deleteAccountGroup() | Delete an account group |

Queue

| Method | Description | |--------|-------------| | queue.listQueueSlots() | Get queue schedules for a profile | | queue.createQueueSlot() | Create a new queue for a profile | | queue.getNextQueueSlot() | Preview the next available queue slot (informational only) | | queue.updateQueueSlot() | Create or update a queue schedule | | queue.deleteQueueSlot() | Delete a queue schedule | | queue.previewQueue() | Preview upcoming queue slots for a profile |

Webhooks

| Method | Description | |--------|-------------| | webhooks.createWebhookSettings() | Create a new webhook | | webhooks.getWebhookLogs() | Get webhook delivery logs | | webhooks.getWebhookSettings() | List all webhooks | | webhooks.updateWebhookSettings() | Update a webhook | | webhooks.deleteWebhookSettings() | Delete a webhook | | webhooks.testWebhook() | Send test webhook |

API Keys

| Method | Description | |--------|-------------| | apiKeys.listApiKeys() | List API keys for the current user | | apiKeys.createApiKey() | Create a new API key | | apiKeys.deleteApiKey() | Delete an API key |

Media

| Method | Description | |--------|-------------| | media.getMediaPresignedUrl() | Get a presigned URL for direct file upload (up to 5GB) |

Tools

| Method | Description | |--------|-------------| | tools.getYouTubeTranscript() | Get YouTube video transcript | | tools.checkInstagramHashtags() | Check Instagram hashtags for bans | | tools.downloadBlueskyMedia() | Download Bluesky video | | tools.downloadFacebookVideo() | Download Facebook video | | tools.downloadInstagramMedia() | Download Instagram reel or post | | tools.downloadLinkedInVideo() | Download LinkedIn video | | tools.downloadTikTokVideo() | Download TikTok video | | tools.downloadTwitterMedia() | Download Twitter/X video | | tools.downloadYouTubeVideo() | Download YouTube video or audio |

Users

| Method | Description | |--------|-------------| | users.listUsers() | List team users (root + invited) | | users.getUser() | Get user by id (self or invited) |

Usage

| Method | Description | |--------|-------------| | usage.getUsageStats() | Get plan and usage stats for current account |

Logs

| Method | Description | |--------|-------------| | logs.listLogs() | Get publishing logs | | logs.getLog() | Get a single log entry | | logs.getPostLogs() | Get logs for a specific post |

Connect (OAuth)

| Method | Description | |--------|-------------| | connect.listFacebookPages() | List Facebook Pages after OAuth (Headless Mode) | | connect.listGoogleBusinessLocations() | List Google Business Locations after OAuth (Headless Mode) | | connect.listLinkedInOrganizations() | Fetch full LinkedIn organization details (Headless Mode) | | connect.listPinterestBoardsForSelection() | List Pinterest Boards after OAuth (Headless Mode) | | connect.listSnapchatProfiles() | List Snapchat Public Profiles after OAuth (Headless Mode) | | connect.getConnectUrl() | Start OAuth connection for a platform | | connect.getFacebookPages() | List available Facebook pages for a connected account | | connect.getGmbLocations() | List available Google Business Profile locations for a connected account | | connect.getLinkedInOrganizations() | Get available LinkedIn organizations for a connected account | | connect.getPendingOAuthData() | Fetch pending OAuth selection data (Headless Mode) | | connect.getPinterestBoards() | List Pinterest boards for a connected account | | connect.getRedditSubreddits() | List Reddit subreddits for a connected account | | connect.getTelegramConnectStatus() | Generate Telegram access code | | connect.updateFacebookPage() | Update selected Facebook page for a connected account | | connect.updateGmbLocation() | Update selected Google Business Profile location for a connected account | | connect.updateLinkedInOrganization() | Switch LinkedIn account type (personal/organization) | | connect.updatePinterestBoards() | Set default Pinterest board on the connection | | connect.updateRedditSubreddits() | Set default subreddit on the connection | | connect.completeTelegramConnect() | Check Telegram connection status | | connect.connectBlueskyCredentials() | Connect Bluesky using app password | | connect.handleOAuthCallback() | Complete OAuth token exchange manually (for server-side flows) | | connect.initiateTelegramConnect() | Direct Telegram connection (power users) | | connect.selectFacebookPage() | Select a Facebook Page to complete the connection (Headless Mode) | | connect.selectGoogleBusinessLocation() | Select a Google Business location to complete the connection (Headless Mode) | | connect.selectLinkedInOrganization() | Select LinkedIn organization or personal account after OAuth | | connect.selectPinterestBoard() | Select a Pinterest Board to complete the connection (Headless Mode) | | connect.selectSnapchatProfile() | Select a Snapchat Public Profile to complete the connection (Headless Mode) |

Reddit

| Method | Description | |--------|-------------| | reddit.getRedditFeed() | Fetch subreddit feed via a connected account | | reddit.searchReddit() | Search Reddit posts via a connected account |

Invites

| Method | Description | |--------|-------------| | invites.createInviteToken() | Create a team member invite token |

Requirements

Links

License

Apache-2.0