SocialAPI.ai

The social media API for Node.js

SocialAPI.ai is a REST social media API for Node.js and TypeScript. Call it with fetch or axios using a bearer API key to read comments, send DMs, publish posts, and reply to reviews across 13 networks, with fully typed normalized JSON and no per-platform SDKs.

  • Free tier available
  • Instant API key
  • MCP server included

Read and reply from Node.js

TypeScript
const API = "https://api.social-api.ai/v1";
const headers = {
  Authorization: "Bearer sapi_key_...",
  "Content-Type": "application/json",
};

// List comments on a post (any platform, same shape)
const res = await fetch(`${API}/inbox/comments/${postId}?account_id=${accountId}`, { headers });
const { data: comments } = await res.json();

// Reply to the first comment
await fetch(`${API}/inbox/comments/${postId}`, {
  method: "POST",
  headers,
  body: JSON.stringify({
    account_id: accountId,
    comment_id: comments[0].id,
    text: "Thanks for your comment!",
  }),
});

Authenticate with a bearer token and call the endpoints with fetch. The same code shape works for every connected platform because responses are normalized.

Why: Node.js has no unified social media package.

Every network has its own npm SDK with a different client, auth flow, and response model, so a project that spans several platforms maintains several integrations. SocialAPI.ai replaces them with one REST API you call using fetch or axios. The same request returns the same typed JSON for every platform, so you build the integration once.

Where it lands: One call, every network

The same request lands on each platform as that platform draws it.

  • On TikTok
    31 comments
    • maya.r

      Do these come in black?

      2h

      ledge.skateCreator

      Yes, black with a gum sole, sizes 36 to 46.

      1m
    • jin.k

      Skated mine all weekend, the grip is unreal.

      5hLiked by creator
    • View hidden comments (1)
    POST/v1/inbox/comments/{postId}200 OK
  • On Instagram

    Jin K.

    jin.k

    Sat 6:42 PM

    Is grip tape free?

    Free with any deck.

    Today 9:12 AM

    ❤️

    Broke it on the 5-stair. Got an 8.25?

    You replied to jin.k

    Three in 8.25. Want it gripped?

    Seen

    Grip itI'll do it
    POST/v1/inbox/conversations/{id}/messages200 OK
  • On Facebook

    Ledge Skate & Shoe

    October 6 at 2:00 PM

    New white lows just landed. In store Saturday, all sizes.

    POST/v1/posts201 Created

Works across every connected network.

Capabilities: What the Node.js Social Media API covers

One REST API for social media, called from Node.js and TypeScript.

  • fetch or axios

    Call the API with native fetch, axios, or any HTTP client. No SDK to install.

    Authorization: Bearer sapi_key_…
  • Comments

    List, reply to, hide, and like comments across all connected platforms.

    • GET/v1/inbox/comments/{postId}
    • POST/v1/inbox/comments/{postId}
  • Direct Messages

    Read conversations and send replies through one messaging endpoint.

    • GET/v1/inbox/conversations
    • POST/v1/inbox/conversations/{id}/messages
  • Publishing

    Create and schedule posts across every network from a single request.

    • POST/v1/posts
  • Webhooks

    Receive real-time events in your Node service the moment something happens.

    • comment.received
    • dm.received
    • mention.received

In depth: Node.js Social Media API, in depth

Works with fetch, axios, and any runtime

There is no SocialAPI.ai npm package to learn. Call the API with native fetch or axios from Node, Bun, Deno, or an edge function. Because it is plain REST, it drops into any JavaScript or TypeScript project without generated clients or extra dependencies.

The same code for every network

SocialAPI.ai normalizes Instagram, Facebook, TikTok, LinkedIn, YouTube, X, and Threads, so the function that reads comments or posts a reply is identical across platforms. You write and type it once instead of maintaining a separate client per network.

TypeScript-friendly responses

Every endpoint returns the same normalized JSON, so you can model the response once with a TypeScript type and reuse it everywhere. Stable, reversible interaction IDs make read-then-reply flows easy to type and test.

MCP-native for JavaScript AI agents

If you are building an AI agent in JavaScript or TypeScript, SocialAPI.ai also exposes a Model Context Protocol server so the agent can call social tools directly. See the Social Media API for AI Agents page at https://social-api.ai/solutions/social-media-api-for-ai-agents.

Frequently asked questions

What developers ask before they ship.

What is the best social media API for Node.js?

The best social media API for Node.js is one REST API that covers every network with a consistent, typed response shape, so you avoid maintaining a separate npm SDK per platform. SocialAPI.ai does this: call it with fetch or axios and read or respond across all 13 platforms.

How do I post to Instagram with JavaScript?

Connect your Instagram account in the SocialAPI.ai dashboard, then send an authenticated POST to the publishing endpoint with fetch or axios. The same request publishes to Instagram, TikTok, LinkedIn, and the other supported networks because the API is normalized.

Is there a TypeScript social media API?

Yes. SocialAPI.ai is plain REST that returns the same normalized JSON for every platform, so you model it once with a TypeScript type and reuse it across networks. There is no per-platform client to wrap or maintain.

How do I read comments or DMs in Node.js?

Send an authenticated GET with fetch to the comments or conversations endpoint and read the normalized JSON. The same call returns data for Instagram, TikTok, and the other supported networks, so one function covers them all.

Can I build a social media bot in Node.js?

Yes. Combine SocialAPI.ai webhooks with the reply and DM endpoints to build a bot that reacts to comments and messages in real time. It runs on Node, Bun, Deno, or an edge function, and there is a free tier with an instant API key.

Ready to unify your social interactions?

Free tier available. No credit card required. Ships with the MCP server.