li_campaign_analytics

Pack: linkedin_ads · Endpoint: https://gateway.pipeworx.io/linkedin_ads/mcp

Analyze campaign performance over a date range (e.g., “2024-01-01” to “2024-01-31”). Returns impressions, clicks, conversions, spend, and CTR by campaign.

Parameters

NameTypeRequiredDescription
campaign_idsarrayyesArray of campaign IDs to query
itemsstringno
date_range_startstringyesStart date (YYYY-MM-DD)
date_range_endstringyesEnd date (YYYY-MM-DD)
time_granularitystringnoGranularity: DAILY, MONTHLY, or ALL (default ALL)

Example call

Arguments

{
  "campaign_ids": [
    "501234567",
    "501234568"
  ],
  "date_range_start": "2024-01-01",
  "date_range_end": "2024-01-31",
  "time_granularity": "DAILY"
}

curl

curl -X POST https://gateway.pipeworx.io/linkedin_ads/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"li_campaign_analytics","arguments":{"campaign_ids":["501234567","501234568"],"date_range_start":"2024-01-01","date_range_end":"2024-01-31","time_granularity":"DAILY"}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('li_campaign_analytics', {
  "campaign_ids": [
    "501234567",
    "501234568"
  ],
  "date_range_start": "2024-01-01",
  "date_range_end": "2024-01-31",
  "time_granularity": "DAILY"
});

More examples

{
  "campaign_ids": [
    "501234567"
  ],
  "date_range_start": "2024-01-01",
  "date_range_end": "2024-12-31"
}

Response shape

FieldTypeDescription
errorstringError code if connection not found
messagestringError message with guidance
elementsarrayAnalytics data by campaign
Full JSON Schema
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "Error code if connection not found"
    },
    "message": {
      "type": "string",
      "description": "Error message with guidance"
    },
    "elements": {
      "type": "array",
      "description": "Analytics data by campaign",
      "items": {
        "type": "object",
        "properties": {
          "pivotValue": {
            "type": "string",
            "description": "Campaign URN or identifier"
          },
          "impressions": {
            "type": "number",
            "description": "Total impressions"
          },
          "clicks": {
            "type": "number",
            "description": "Total clicks"
          },
          "conversions": {
            "type": "number",
            "description": "Total conversions"
          },
          "spend": {
            "type": "object",
            "description": "Spend data",
            "properties": {
              "amount": {
                "type": "number",
                "description": "Spend amount"
              },
              "currencyCode": {
                "type": "string",
                "description": "Currency code"
              }
            }
          },
          "ctr": {
            "type": "number",
            "description": "Click-through rate (CTR)"
          }
        }
      }
    }
  }
}

Connect

Add this to your MCP client config, or use one-click install buttons:

{
  "mcpServers": {
    "linkedin_ads": {
      "url": "https://gateway.pipeworx.io/linkedin_ads/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build May 9, 2026