Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@getlatedev/node

Package Overview
Dependencies
Maintainers
1
Versions
214
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@getlatedev/node

The official Node.js library for the Late API

Source
npmnpm
Version
0.1.3
Version published
Weekly downloads
2.9K
-25.02%
Maintainers
1
Weekly downloads
 
Created
Source

Late

Late Node.js SDK

npm version License

One API to post everywhere. 13 platforms, zero headaches.

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

MethodDescription
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

MethodDescription
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

MethodDescription
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

MethodDescription
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

MethodDescription
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

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

Webhooks

MethodDescription
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

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

Media

MethodDescription
media.getMediaPresignedUrl()Get a presigned URL for direct file upload (up to 5GB)

Tools

MethodDescription
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

MethodDescription
users.listUsers()List team users (root + invited)
users.getUser()Get user by id (self or invited)

Usage

MethodDescription
usage.getUsageStats()Get plan and usage stats for current account

Logs

MethodDescription
logs.listLogs()Get publishing logs
logs.getLog()Get a single log entry
logs.getPostLogs()Get logs for a specific post

Connect (OAuth)

MethodDescription
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.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.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

MethodDescription
reddit.getRedditFeed()Fetch subreddit feed via a connected account
reddit.searchReddit()Search Reddit posts via a connected account

Invites

MethodDescription
invites.createInviteToken()Create a team member invite token

Requirements

  • Node.js 18+
  • Late API key (free tier available)

License

Apache-2.0

Keywords

late

FAQs

Package last updated on 22 Jan 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts