LinkedIn comment API

Let your AI agent or product engage on LinkedIn. Automate comments and interactions to build visibility.

< 4
s

Avg Response

+ 50

Endpoints

99.9
%

Uptime

1import requests
2
3response = requests.post(
4    "https://api.linkupapi.com/v2/content",
5    headers={"x-api-key": "YOUR_API_KEY"},
6    json={
7        "account_id": "YOUR_ACCOUNT_ID",
8        "action": "comment",
9        "params": {
10            "post_url": "https://www.linkedin.com/posts/johndoe_ai-agents-activity-7300000000000000000",
11            "comment_text": "Great insights, thanks for sharing!"
12        }
13    }
14)
15
16print(response.json())
1const response = await fetch("https://api.linkupapi.com/v2/content", {
2  method: "POST",
3  headers: {
4    "x-api-key": "YOUR_API_KEY",
5    "Content-Type": "application/json"
6  },
7  body: JSON.stringify({
8    account_id: "YOUR_ACCOUNT_ID",
9    action: "comment",
10    params: {
11      post_url: "https://www.linkedin.com/posts/johndoe_ai-agents-activity-7300000000000000000",
12      comment_text: "Great insights, thanks for sharing!"
13    }
14  })
15});
16
17const data = await response.json();
18console.log(data);
1<?php
2$payload = [
3    "account_id" => "YOUR_ACCOUNT_ID",
4    "action" => "comment",
5    "params" => [
6        "post_url" => "https://www.linkedin.com/posts/johndoe_ai-agents-activity-7300000000000000000",
7        "comment_text" => "Great insights, thanks for sharing!"
8    ]
9];
10
11$ch = curl_init("https://api.linkupapi.com/v2/content");
12curl_setopt($ch, CURLOPT_POST, true);
13curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
14curl_setopt($ch, CURLOPT_HTTPHEADER, [
15    "x-api-key: YOUR_API_KEY",
16    "Content-Type: application/json"
17]);
18curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
19
20$response = curl_exec($ch);
21curl_close($ch);
22echo $response;
1package main
2
3import (
4    "bytes"
5    "fmt"
6    "io"
7    "net/http"
8)
9
10func main() {
11    payload := []byte(`{
12  "account_id": "YOUR_ACCOUNT_ID",
13  "action": "comment",
14  "params": {
15    "post_url": "https://www.linkedin.com/posts/johndoe_ai-agents-activity-7300000000000000000",
16    "comment_text": "Great insights, thanks for sharing!"
17  }
18}`)
19
20    req, _ := http.NewRequest("POST", "https://api.linkupapi.com/v2/content", bytes.NewBuffer(payload))
21    req.Header.Set("x-api-key", "YOUR_API_KEY")
22    req.Header.Set("Content-Type", "application/json")
23
24    res, err := http.DefaultClient.Do(req)
25    if err != nil {
26        panic(err)
27    }
28    defer res.Body.Close()
29    body, _ := io.ReadAll(res.Body)
30    fmt.Println(string(body))
31}
1import java.net.URI;
2import java.net.http.HttpClient;
3import java.net.http.HttpRequest;
4import java.net.http.HttpResponse;
5
6public class Main {
7    public static void main(String[] args) throws Exception {
8        String payload = "{\"account_id\": \"YOUR_ACCOUNT_ID\", \"action\": \"comment\", \"params\": {\"post_url\": \"https://www.linkedin.com/posts/johndoe_ai-agents-activity-7300000000000000000\", \"comment_text\": \"Great insights, thanks for sharing!\"}}";
9
10        HttpRequest request = HttpRequest.newBuilder()
11            .uri(URI.create("https://api.linkupapi.com/v2/content"))
12            .header("x-api-key", "YOUR_API_KEY")
13            .header("Content-Type", "application/json")
14            .POST(HttpRequest.BodyPublishers.ofString(payload))
15            .build();
16
17        HttpResponse<String> response = HttpClient.newHttpClient()
18            .send(request, HttpResponse.BodyHandlers.ofString());
19        System.out.println(response.body());
20    }
21}

Engage Through LinkedIn Comments

Your AI agent or platform can automatically engage with relevant content from your network. Perfect for increasing brand presence, nurturing leads, and staying top-of-mind with prospects.

The API handles comment posting with natural timing and supports text-based interactions on any public or connection post.

Automatically engage with content from your target audience, industry leaders, or prospects to build meaningful relationships at scale. The system intelligently processes your comments while maintaining authentic engagement patterns.

Ideal for thought leadership campaigns, lead warming strategies, competitor monitoring with strategic responses, community building, and maintaining active presence in your industry conversations.

‍

‍

1{
2  "status": "success",
3  "message": "Comment posted successfully"
4}
Example result returned by the LinkupAPI LinkedIn comment API

Marc Dubois

Co-founder & CTO Building the future of AI-powered sales automation

  • Comment posted successfully
  • Comment posted successfully

Privacy and security with no compromise.

Your users trust you with their accounts. Here is how we keep them safe.

Passwords never stored

We never keep your users' passwords. Sessions are encrypted, isolated per account and revocable at any time.

EU-hosted, GDPR & CCPA

Data is processed and hosted in the European Union. GDPR and CCPA compliant, with a data processing agreement on request.

Google-verified security

LinkupAPI passed Google's CASA security assessment and is a verified Gmail app. Same review, same standards for every channel.

Plug it into your AI assistant.

Every endpoint is a native tool for Claude, ChatGPT, Gemini, Mistral, Cursor and any other MCP client. Connect the LinkupAPI MCP server once and your assistant runs the calls on your accounts.

Our frequently asked questions.

LinkupAPI V2 - See what’s new

LinkedIn, email and WhatsApp through one API. Unlimited accounts, one fixed price.

50
+

Endpoints

99.9
%

Uptime

< 3
s

Avg Response