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

@zernio/node

v0.2.37

Published

The official Node.js library for the Zernio API

Readme

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

Installation

npm install @zernio/node

Quick Start

import Zernio from '@zernio/node';

const zernio = new Zernio(); // Uses ZERNIO_API_KEY env var

// Publish to multiple platforms with one call
const { data: post } = await zernio.posts.createPost({
  body: {
    content: 'Hello world from Zernio!',
    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 zernio = new Zernio({
  apiKey: 'your-api-key', // Defaults to process.env['ZERNIO_API_KEY']
  baseURL: 'https://zernio.com/api',
  timeout: 60000,
});

Examples

Schedule a Post

const { data: post } = await zernio.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 zernio.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 zernio.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 zernio.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 zernio.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 zernio.accounts.listAccounts();

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

Error Handling

import Zernio, { ZernioApiError, RateLimitError, ValidationError } from '@zernio/node';

try {
  await zernio.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 ZernioApiError) {
    console.log(`Error ${error.statusCode}: ${error.message}`);
  }
}

SDK Reference

Posts

| Method | Description | |--------|-------------| | posts.listPosts() | List posts | | posts.bulkUploadPosts() | Bulk upload from CSV | | posts.createPost() | Create post | | posts.getPost() | Get post | | posts.updatePost() | Update post | | posts.updatePostMetadata() | Update post metadata | | posts.deletePost() | Delete post | | posts.retryPost() | Retry failed post | | posts.unpublishPost() | Unpublish post |

Accounts

| Method | Description | |--------|-------------| | accounts.getAllAccountsHealth() | Check accounts health | | accounts.listAccounts() | List accounts | | accounts.getAccountHealth() | Check account health | | accounts.getFollowerStats() | Get follower stats | | accounts.getGoogleBusinessReviews() | Get reviews | | accounts.getLinkedInMentions() | Resolve LinkedIn mention | | accounts.getTikTokCreatorInfo() | Get TikTok creator info | | accounts.updateAccount() | Update account | | accounts.deleteAccount() | Disconnect account |

Profiles

| Method | Description | |--------|-------------| | profiles.listProfiles() | List profiles | | profiles.createProfile() | Create profile | | profiles.getProfile() | Get profile | | profiles.updateProfile() | Update profile | | profiles.deleteProfile() | Delete profile |

Analytics

| Method | Description | |--------|-------------| | analytics.getAnalytics() | Get post analytics | | analytics.getBestTimeToPost() | Get best times to post | | analytics.getContentDecay() | Get content performance decay | | analytics.getDailyMetrics() | Get daily aggregated metrics | | analytics.getInstagramAccountInsights() | Get Instagram account-level insights | | analytics.getInstagramDemographics() | Get Instagram audience demographics | | analytics.getLinkedInAggregateAnalytics() | Get LinkedIn aggregate stats | | analytics.getLinkedInPostAnalytics() | Get LinkedIn post stats | | analytics.getLinkedInPostReactions() | Get LinkedIn post reactions | | analytics.getPostingFrequency() | Get posting frequency vs engagement | | analytics.getPostTimeline() | Get post analytics timeline | | analytics.getYouTubeDailyViews() | Get YouTube daily views |

Account Groups

| Method | Description | |--------|-------------| | accountGroups.listAccountGroups() | List groups | | accountGroups.createAccountGroup() | Create group | | accountGroups.updateAccountGroup() | Update group | | accountGroups.deleteAccountGroup() | Delete group |

Queue

| Method | Description | |--------|-------------| | queue.listQueueSlots() | List schedules | | queue.createQueueSlot() | Create schedule | | queue.getNextQueueSlot() | Get next available slot | | queue.updateQueueSlot() | Update schedule | | queue.deleteQueueSlot() | Delete schedule | | queue.previewQueue() | Preview upcoming slots |

Webhooks

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

API Keys

| Method | Description | |--------|-------------| | apiKeys.listApiKeys() | List keys | | apiKeys.createApiKey() | Create key | | apiKeys.deleteApiKey() | Delete key |

Media

| Method | Description | |--------|-------------| | media.getMediaPresignedUrl() | Get presigned upload URL |

Tools

| Method | Description | |--------|-------------| | tools.getYouTubeTranscript() | Get YouTube transcript | | tools.checkInstagramHashtags() | Check IG hashtag bans | | tools.downloadBlueskyMedia() | Download Bluesky media | | tools.downloadFacebookVideo() | Download Facebook video | | tools.downloadInstagramMedia() | Download Instagram media | | tools.downloadLinkedInVideo() | Download LinkedIn video | | tools.downloadTikTokVideo() | Download TikTok video | | tools.downloadTwitterMedia() | Download Twitter/X media | | tools.downloadYouTubeVideo() | Download YouTube video |

Users

| Method | Description | |--------|-------------| | users.listUsers() | List users | | users.getUser() | Get user |

Usage

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

Logs

| Method | Description | |--------|-------------| | logs.listConnectionLogs() | List connection logs | | logs.listPostsLogs() | List publishing logs | | logs.getPostLogs() | Get post logs |

Connect (OAuth)

| Method | Description | |--------|-------------| | connect.listFacebookPages() | List Facebook pages | | connect.listGoogleBusinessLocations() | List GBP locations | | connect.listLinkedInOrganizations() | List LinkedIn orgs | | connect.listPinterestBoardsForSelection() | List Pinterest boards | | connect.listSnapchatProfiles() | List Snapchat profiles | | connect.getConnectUrl() | Get OAuth connect URL | | connect.getFacebookPages() | List Facebook pages | | connect.getGmbLocations() | List GBP locations | | connect.getLinkedInOrganizations() | List LinkedIn orgs | | connect.getPendingOAuthData() | Get pending OAuth data | | connect.getPinterestBoards() | List Pinterest boards | | connect.getRedditFlairs() | List subreddit flairs | | connect.getRedditSubreddits() | List Reddit subreddits | | connect.getTelegramConnectStatus() | Generate Telegram code | | connect.getYoutubePlaylists() | List YouTube playlists | | connect.updateFacebookPage() | Update Facebook page | | connect.updateGmbLocation() | Update GBP location | | connect.updateLinkedInOrganization() | Switch LinkedIn account type | | connect.updatePinterestBoards() | Set default Pinterest board | | connect.updateRedditSubreddits() | Set default subreddit | | connect.updateYoutubeDefaultPlaylist() | Set default YouTube playlist | | connect.completeTelegramConnect() | Check Telegram status | | connect.connectBlueskyCredentials() | Connect Bluesky account | | connect.connectWhatsAppCredentials() | Connect WhatsApp via credentials | | connect.handleOAuthCallback() | Complete OAuth callback | | connect.initiateTelegramConnect() | Connect Telegram directly | | connect.selectFacebookPage() | Select Facebook page | | connect.selectGoogleBusinessLocation() | Select GBP location | | connect.selectLinkedInOrganization() | Select LinkedIn org | | connect.selectPinterestBoard() | Select Pinterest board | | connect.selectSnapchatProfile() | Select Snapchat profile |

Reddit

| Method | Description | |--------|-------------| | reddit.getRedditFeed() | Get subreddit feed | | reddit.searchReddit() | Search posts |

Account Settings

| Method | Description | |--------|-------------| | accountSettings.getInstagramIceBreakers() | Get IG ice breakers | | accountSettings.getMessengerMenu() | Get FB persistent menu | | accountSettings.getTelegramCommands() | Get TG bot commands | | accountSettings.deleteInstagramIceBreakers() | Delete IG ice breakers | | accountSettings.deleteMessengerMenu() | Delete FB persistent menu | | accountSettings.deleteTelegramCommands() | Delete TG bot commands | | accountSettings.setInstagramIceBreakers() | Set IG ice breakers | | accountSettings.setMessengerMenu() | Set FB persistent menu | | accountSettings.setTelegramCommands() | Set TG bot commands |

Ad Audiences

| Method | Description | |--------|-------------| | adAudiences.listAdAudiences() | List custom audiences | | adAudiences.createAdAudience() | Create a custom audience (Meta only) | | adAudiences.getAdAudience() | Get audience details | | adAudiences.deleteAdAudience() | Delete a custom audience | | adAudiences.addUsersToAdAudience() | Add users to a customer list audience |

Ad Campaigns

| Method | Description | |--------|-------------| | adCampaigns.listAdCampaigns() | List campaigns with aggregate metrics | | adCampaigns.updateAdCampaignStatus() | Pause or resume a campaign |

Ads

| Method | Description | |--------|-------------| | ads.listAdAccounts() | List ad accounts for a social account | | ads.listAds() | List ads | | ads.createStandaloneAd() | Create a standalone ad with custom creative | | ads.getAd() | Get ad details | | ads.getAdAnalytics() | Get ad analytics with daily breakdown | | ads.updateAd() | Update ad (pause/resume, budget, targeting, name) | | ads.deleteAd() | Cancel an ad | | ads.boostPost() | Boost an existing post as a paid ad | | ads.searchAdInterests() | Search targeting interests | | ads.syncExternalAds() | Sync external ads from platform ad managers |

Broadcasts

| Method | Description | |--------|-------------| | broadcasts.listBroadcastRecipients() | List broadcast recipients | | broadcasts.listBroadcasts() | List broadcasts | | broadcasts.createBroadcast() | Create a broadcast draft | | broadcasts.getBroadcast() | Get broadcast details | | broadcasts.updateBroadcast() | Update a broadcast | | broadcasts.deleteBroadcast() | Delete a broadcast (draft only) | | broadcasts.addBroadcastRecipients() | Add recipients to a broadcast | | broadcasts.cancelBroadcast() | Cancel a broadcast | | broadcasts.scheduleBroadcast() | Schedule broadcast for later | | broadcasts.sendBroadcast() | Trigger immediate send |

Comment Automations

| Method | Description | |--------|-------------| | commentAutomations.listCommentAutomationLogs() | List trigger logs for an automation | | commentAutomations.listCommentAutomations() | List comment-to-DM automations | | commentAutomations.createCommentAutomation() | Create a comment-to-DM automation | | commentAutomations.getCommentAutomation() | Get automation details with recent logs | | commentAutomations.updateCommentAutomation() | Update automation settings | | commentAutomations.deleteCommentAutomation() | Delete automation and all logs |

Comments (Inbox)

| Method | Description | |--------|-------------| | comments.listInboxComments() | List commented posts | | comments.getInboxPostComments() | Get post comments | | comments.deleteInboxComment() | Delete comment | | comments.hideInboxComment() | Hide comment | | comments.likeInboxComment() | Like comment | | comments.replyToInboxPost() | Reply to comment | | comments.sendPrivateReplyToComment() | Send private reply | | comments.unhideInboxComment() | Unhide comment | | comments.unlikeInboxComment() | Unlike comment |

Contacts

| Method | Description | |--------|-------------| | contacts.listContacts() | List contacts | | contacts.bulkCreateContacts() | Bulk create contacts | | contacts.createContact() | Create a contact | | contacts.getContact() | Get contact with channels | | contacts.getContactChannels() | List channels for a contact | | contacts.updateContact() | Update a contact | | contacts.deleteContact() | Delete a contact |

Custom Fields

| Method | Description | |--------|-------------| | customFields.listCustomFields() | List custom field definitions | | customFields.createCustomField() | Create a custom field definition | | customFields.updateCustomField() | Update a custom field definition | | customFields.deleteCustomField() | Delete a custom field definition | | customFields.clearContactFieldValue() | Clear a custom field value | | customFields.setContactFieldValue() | Set a custom field value |

GMB Attributes

| Method | Description | |--------|-------------| | gmbAttributes.getGoogleBusinessAttributes() | Get attributes | | gmbAttributes.updateGoogleBusinessAttributes() | Update attributes |

GMB Food Menus

| Method | Description | |--------|-------------| | gmbFoodMenus.getGoogleBusinessFoodMenus() | Get food menus | | gmbFoodMenus.updateGoogleBusinessFoodMenus() | Update food menus |

GMB Location Details

| Method | Description | |--------|-------------| | gmbLocationDetails.getGoogleBusinessLocationDetails() | Get location details | | gmbLocationDetails.updateGoogleBusinessLocationDetails() | Update location details |

GMB Media

| Method | Description | |--------|-------------| | gmbMedia.listGoogleBusinessMedia() | List media | | gmbMedia.createGoogleBusinessMedia() | Upload photo | | gmbMedia.deleteGoogleBusinessMedia() | Delete photo |

GMB Place Actions

| Method | Description | |--------|-------------| | gmbPlaceActions.listGoogleBusinessPlaceActions() | List action links | | gmbPlaceActions.createGoogleBusinessPlaceAction() | Create action link | | gmbPlaceActions.deleteGoogleBusinessPlaceAction() | Delete action link |

Messages (Inbox)

| Method | Description | |--------|-------------| | messages.listInboxConversations() | List conversations | | messages.getInboxConversation() | Get conversation | | messages.getInboxConversationMessages() | List messages | | messages.updateInboxConversation() | Update conversation status | | messages.deleteInboxMessage() | Delete message | | messages.addMessageReaction() | Add reaction | | messages.editInboxMessage() | Edit message | | messages.removeMessageReaction() | Remove reaction | | messages.sendInboxMessage() | Send message | | messages.sendTypingIndicator() | Send typing indicator | | messages.uploadMediaDirect() | Upload media file |

Reviews (Inbox)

| Method | Description | |--------|-------------| | reviews.listInboxReviews() | List reviews | | reviews.deleteInboxReviewReply() | Delete review reply | | reviews.replyToInboxReview() | Reply to review |

Sequences

| Method | Description | |--------|-------------| | sequences.listSequenceEnrollments() | List enrollments for a sequence | | sequences.listSequences() | List sequences | | sequences.createSequence() | Create a sequence | | sequences.getSequence() | Get sequence with steps | | sequences.updateSequence() | Update a sequence | | sequences.deleteSequence() | Delete a sequence | | sequences.activateSequence() | Activate a sequence | | sequences.enrollContacts() | Enroll contacts in a sequence | | sequences.pauseSequence() | Pause a sequence | | sequences.unenrollContact() | Unenroll a contact from a sequence |

Twitter Engagement

| Method | Description | |--------|-------------| | twitterEngagement.bookmarkPost() | Bookmark a tweet | | twitterEngagement.followUser() | Follow a user | | twitterEngagement.removeBookmark() | Remove bookmark | | twitterEngagement.retweetPost() | Retweet a post | | twitterEngagement.undoRetweet() | Undo retweet | | twitterEngagement.unfollowUser() | Unfollow a user |

Validate

| Method | Description | |--------|-------------| | validate.validateMedia() | Validate media URL | | validate.validatePost() | Validate post content | | validate.validatePostLength() | Validate post character count | | validate.validateSubreddit() | Check subreddit existence |

WhatsApp

| Method | Description | |--------|-------------| | whatsapp.listWhatsAppGroupChats() | List active groups | | whatsapp.listWhatsAppGroupJoinRequests() | List join requests | | whatsapp.bulkDeleteWhatsAppContacts() | Bulk delete contacts | | whatsapp.bulkUpdateWhatsAppContacts() | Bulk update contacts | | whatsapp.createWhatsAppBroadcast() | Create broadcast | | whatsapp.createWhatsAppContact() | Create contact | | whatsapp.createWhatsAppGroupChat() | Create group | | whatsapp.createWhatsAppGroupInviteLink() | Create invite link | | whatsapp.createWhatsAppTemplate() | Create template | | whatsapp.getWhatsAppBroadcast() | Get broadcast | | whatsapp.getWhatsAppBroadcastRecipients() | List recipients | | whatsapp.getWhatsAppBroadcasts() | List broadcasts | | whatsapp.getWhatsAppBusinessProfile() | Get business profile | | whatsapp.getWhatsAppContact() | Get contact | | whatsapp.getWhatsAppContacts() | List contacts | | whatsapp.getWhatsAppDisplayName() | Get display name and review status | | whatsapp.getWhatsAppGroupChat() | Get group info | | whatsapp.getWhatsAppGroups() | List contact groups | | whatsapp.getWhatsAppTemplate() | Get template | | whatsapp.getWhatsAppTemplates() | List templates | | whatsapp.updateWhatsAppBusinessProfile() | Update business profile | | whatsapp.updateWhatsAppContact() | Update contact | | whatsapp.updateWhatsAppDisplayName() | Request display name change | | whatsapp.updateWhatsAppGroupChat() | Update group settings | | whatsapp.updateWhatsAppTemplate() | Update template | | whatsapp.deleteWhatsAppBroadcast() | Delete broadcast | | whatsapp.deleteWhatsAppContact() | Delete contact | | whatsapp.deleteWhatsAppGroup() | Delete group | | whatsapp.deleteWhatsAppGroupChat() | Delete group | | whatsapp.deleteWhatsAppTemplate() | Delete template | | whatsapp.addWhatsAppBroadcastRecipients() | Add recipients | | whatsapp.addWhatsAppGroupParticipants() | Add participants | | whatsapp.approveWhatsAppGroupJoinRequests() | Approve join requests | | whatsapp.cancelWhatsAppBroadcastSchedule() | Cancel scheduled broadcast | | whatsapp.importWhatsAppContacts() | Bulk import contacts | | whatsapp.rejectWhatsAppGroupJoinRequests() | Reject join requests | | whatsapp.removeWhatsAppBroadcastRecipients() | Remove recipients | | whatsapp.removeWhatsAppGroupParticipants() | Remove participants | | whatsapp.renameWhatsAppGroup() | Rename group | | whatsapp.scheduleWhatsAppBroadcast() | Schedule broadcast | | whatsapp.sendWhatsAppBroadcast() | Send broadcast | | whatsapp.sendWhatsAppBulk() | Bulk send template messages | | whatsapp.uploadWhatsAppProfilePhoto() | Upload profile picture |

WhatsApp Phone Numbers

| Method | Description | |--------|-------------| | whatsappPhoneNumbers.getWhatsAppPhoneNumber() | Get phone number | | whatsappPhoneNumbers.getWhatsAppPhoneNumbers() | List phone numbers | | whatsappPhoneNumbers.purchaseWhatsAppPhoneNumber() | Purchase phone number | | whatsappPhoneNumbers.releaseWhatsAppPhoneNumber() | Release phone number |

Invites

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

Requirements

Links

License

Apache-2.0