Meta Ads API for Openclaw

A comprehensive interface for AI agents to manage Facebook and Instagram advertising campaigns through the Meta Graph API.

zachgodsell93
v1.0.0
Feb 2, 2026
30
7.9k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install meta-ads

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 meta-ads 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 Meta Ads API?

The Meta Ads API skill provides a robust read/write integration for managing the entire Meta advertising ecosystem. By utilizing Openclaw Skills, developers can empower AI agents to create, monitor, and optimize campaigns, ad sets, and individual ads across Facebook and Instagram. This integration handles the technical nuances of the Meta Graph API v25.0, allowing for seamless programmatic control over marketing spend and creative assets.

This skill is designed to bridge the gap between complex advertising data and actionable AI insights. Whether you are building an automated reporting tool or a self-optimizing ad manager, this Openclaw Skills contribution provides the necessary endpoints to access deep performance metrics and execute management commands with precision.

Meta Ads API Use Cases

  • Automated daily performance reporting and KPI tracking for Meta ad accounts.
  • Programmatic budget adjustments based on real-time ROAS or CPA targets.
  • Bulk creation of ad sets with varied targeting parameters for A/B testing.
  • Automated pausing of underperforming creative assets using Openclaw Skills logic.
  • Cross-platform campaign management and status synchronization.

How Meta Ads API Works

  1. The AI agent initializes the connection using a Meta Access Token and Ad Account ID configured in the environment.
  2. The skill automatically prefixes account IDs with act_ to comply with Meta Graph API requirements.
  3. The agent queries specific endpoints to retrieve the current state of campaigns, ad sets, or creatives.
  4. Performance insights are fetched using Openclaw Skills to analyze metrics like spend, impressions, and conversion actions.
  5. Management actions are sent via POST or DELETE requests to update statuses, budgets, or targeting parameters based on agent logic.

Meta Ads API Setup

To use this within Openclaw Skills, configure the following environment variables:

  • META_ACCESS_TOKEN: Your User or System User token.
  • META_AD_ACCOUNT_ID: The numeric ID of your ad account.

Ensure your Meta App has the ads_read and ads_management permissions. For production workflows, a System User Token is highly recommended as it does not expire.

# Example of checking account status
curl "https://graph.facebook.com/v25.0/act_$META_AD_ACCOUNT_ID?fields=name,account_status,amount_spent" \
  -H "Authorization: Bearer $META_ACCESS_TOKEN"

Meta Ads API Data Schema & Taxonomy

The Meta Ads API skill organizes data into a hierarchical structure consistent with the Meta Ads Manager:

Level Key Metadata Fields
Ad Account name, account_status, currency, timezone
Campaigns id, objective, status, daily_budget, lifetime_budget
Ad Sets id, targeting (geo, age, interests), optimization_goal, bid_amount
Ads id, creative_id, tracking_specs, status
Insights spend, impressions, clicks, reach, cpc, cpm, ctr, actions

Note: All budget values are handled in the smallest currency unit (e.g., cents for USD).

Meta Ads API Advanced Features

  • Granular insights breakdowns by age, gender, placement, device, and platform.
  • Support for custom attribution windows including 1d_view and 7d_click.
  • Cursor-based pagination for handling large-scale accounts with thousands of ads.
  • Built-in logic for handling Meta rate limits using the X-Business-Use-Case-Usage header.
  • Ability to exchange short-lived tokens for long-lived tokens within Openclaw Skills workflows.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*