LinkedIn Ads CLI for Openclaw

A powerful read-only command-line interface for querying LinkedIn Marketing API data, including analytics, creatives, and lead generation forms.

bin-huang
v1.0.0
Apr 7, 2026
0
766
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install linkedin-ads-cli

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install linkedin-ads-cli using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is LinkedIn Ads CLI?

The LinkedIn Ads CLI skill provides a robust interface for developers and marketers to interact with the LinkedIn Marketing API (version 202603). It serves as a specialized tool within the Openclaw Skills ecosystem designed for read-only access to ad account structures, performance metrics, and audience data. By utilizing this skill, users can programmatically explore organizations, campaign groups, and individual creatives without navigating the standard web interface.

This tool is particularly valuable for data-driven teams that need to pull granular analytics with pivot breakdowns or inspect complex targeting facets. It supports deep integration with LinkedIn's entity hierarchy, allowing for seamless transitions between account-level overviews and specific campaign deep-dives. Whether you are auditing ad spend or retrieving lead form submissions, this skill streamlines the technical workflow of LinkedIn advertising management.

LinkedIn Ads CLI Use Cases

  • Automating weekly LinkedIn ad performance snapshots and snapshot reporting.
  • Conducting deep-dive audits of campaign performance using granular daily or monthly pivots.
  • Reviewing creative-level metrics to identify high-performing ad content.
  • Exporting lead generation form submissions for CRM integration or analysis.
  • Forecasting ad delivery and retrieving LinkedIn budget recommendations for future planning.
  • Auditing account access and organization-level permissions.

How LinkedIn Ads CLI Works

  1. Identity Resolution: The skill starts by identifying the authenticated user and their associated organizations using the me and organization-acls commands.
  2. Account Discovery: It lists available ad accounts to locate the specific entity required for analysis.
  3. Data Querying: The skill executes specific commands (e.g., campaigns, creatives, or analytics) based on the user's intent, applying filters like date ranges or status.
  4. Pivot Analysis: For performance requests, it applies pivot dimensions such as CAMPAIGN or CREATIVE to break down metrics like impressions, clicks, and cost.
  5. Response Formatting: The CLI returns structured JSON data, which is then parsed to provide actionable insights or visual summaries to the user.

LinkedIn Ads CLI Setup

To use this LinkedIn Ads integration within Openclaw Skills, ensure the CLI is installed and authenticated:

# Install the CLI globally
npm install -g linkedin-ads-cli

# Verify installation and help
linkedin-ads-cli --help

Authentication: You must provide a LinkedIn OAuth2 Bearer token with r_ads, r_ads_reporting, and r_organization_social scopes. You can set this via the LINKEDIN_ADS_ACCESS_TOKEN environment variable or by creating a configuration file at ~/.config/linkedin-ads-cli/credentials.json.

LinkedIn Ads CLI Data Schema & Taxonomy

The skill interacts with the LinkedIn entity hierarchy and returns data in a structured JSON format. Key entities include:

Entity URN Format Description
Ad Account urn:li:sponsoredAccount:ID The primary container for all advertising activities.
Campaign Group urn:li:sponsoredCampaignGroup:ID Used to group related campaigns for budget/status management.
Campaign urn:li:sponsoredCampaign:ID Individual ad sets containing targeting and budget.
Creative urn:li:sponsoredCreative:ID The actual ad content shown to users.
Lead Gen Form urn:li:leadGenForm:ID Forms used to collect user data directly on LinkedIn.

All monetary values are returned as decimal strings (e.g., "244.85000") in both costInLocalCurrency and costInUsd fields.

LinkedIn Ads CLI Advanced Features

  • Support for both token-based and offset-based pagination for large datasets.
  • Custom metric field selection in analytics to reduce payload size and focus on KPIs.
  • Automated budget recommendations and delivery forecasting for proactive account management.
  • Cross-referencing of matched audiences (DMP segments) with live campaign targeting.
  • Support for both numeric IDs and full URN strings for flexible command execution.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*