You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
importLatefrom'@getlatedev/node';constlate=newLate();// Uses LATE_API_KEY env var// Publish to multiple platforms with one callconst{data: post}=awaitlate.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
constlate=newLate({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}=awaitlate.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}=awaitlate.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 URLconst{data: presign}=awaitlate.media.getMediaPresignedUrl({body: {filename: 'video.mp4',contentType: 'video/mp4'},});// 2. Upload your fileawaitfetch(presign.uploadUrl,{method: 'PUT',body: videoBuffer,headers: {'Content-Type': 'video/mp4'},});// 3. Create post with mediaconst{data: post}=awaitlate.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 }=awaitlate.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 }=awaitlate.accounts.listAccounts();for(constaccountofdata.accounts){console.log(`${account.platform}: @${account.username}`);}