All connectors

Facebook Marketing

Facebook Marketing Connector for AI Agents

Give agents tools for secure, real-time access to fetch, search, write, and sync across every system, with replication, entity mapping, and auth built-in.

20,000+
community members
6,000+
daily active companies
2PB+
synced/month
900+
contributors

About this Connector

Facebook Marketing API connector for managing ad campaigns, ad sets, ads, creatives, and accessing performance insights. This connector provides read access to Facebook Ads Manager data for analytics and reporting purposes.

CRM

Sales Analytics

Customer Data

advertising, marketing analytics, social media ads

Version Information

Package version

0.1.2

Connector version

1.0.1

SDK commit

5b20f488dec0e8f29410823753106603c23a4b65

Support Open Source

Star us on GitHub to help grow the Airbyte community

Github

Installation & Usage

Get started with the Facebook Marketing connector in minutes

1

Install Package

Using uv or pip

bash

Copy
uv pip install airbyte-agent-facebook-marketing

2

Import

Initialize and use

python

Copy
from airbyte_agent_facebook-marketing import FacebookMarketingConnector
from airbyte_agent_facebook_marketing.models import FacebookMarketingAuthConfig

connector = FacebookMarketingConnector(
    auth_config=FacebookMarketingAuthConfig(
        access_token="<Facebook Marketing API access token>",
        account_id="<Facebook Ad Account ID (without the act_ prefix)>"
    )
)

3

Tool

Add tools to your agent

python

Copy
@agent.tool_plain # assumes you're using Pydantic AI
@FacebookMarketingConnector.tool_utils
async def facebook-marketing_execute(entity: str, action: str, params: dict | None = None):
    return await connector.execute(entity, action, params or {})

Supported Entities & Actions

Access all your Facebook Marketing data through a unified API

Lorem ipsum

Lorem ipsum

| Entity | Actions |\n|--------|---------|\n| Campaigns | [List](./REFERENCE.md#campaigns-list), [Get](./REFERENCE.md#campaigns-get) |\n| Ad Sets | [List](./REFERENCE.md#ad-sets-list), [Get](./REFERENCE.md#ad-sets-get) |\n| Ads | [List](./REFERENCE.md#ads-list), [Get](./REFERENCE.md#ads-get) |\n| Ad Creatives | [List](./REFERENCE.md#ad-creatives-list) |\n| Ads Insights | [List](./REFERENCE.md#ads-insights-list) |\n| Custom Conversions | [List](./REFERENCE.md#custom-conversions-list) |\n| Images | [List](./REFERENCE.md#images-list) |\n| Videos | [List](./REFERENCE.md#videos-list) |

Example Prompts

The Facebook Marketing connector is optimized to handle prompts like these

Lorem ipsum

List all active campaigns in my ad account - Show me the ad sets with the highest daily budget - What ads are currently running in campaign \{campaign_name\}? - Show me the performance insights for the last 7 days - Which campaigns have the most spend this month? - List all ad creatives in my account - What is the status of my campaigns? - Show me ads with the highest click-through rate - List all custom conversion events in my account - Show me all ad images in my account - What videos are available in my ad account?

Why Airbyte for AI Agents?

Built for production AI workloads with enterprise-grade reliability

Agent-Native Design

Structured, LLM-friendly schemas optimized for AI agent consumption with natural language query support.

Secure Authentication

Built-in OAuth 2.0 handling with automatic token refresh. No hard-coded credentials.

Production Ready

Battle-tested connectors with comprehensive error handling, logging, and retry logic.

Open Source

Fully open source under the MIT license. Contribute, customize, and extend freely.

Works with your favorite frameworks

Use the Facebook Marketing connector with any AI agent framework

🦜

LangChain

🦙

LlamaIndex

🤖

CrewAI

AutoGen

🧠

OpenAI Agents SDK

🔮

Claude Agents SDK

Frequently Asked Questions

Didn't find your answer? Please don't hesitate to reach out.

How do I authenticate with Facebook Marketing?

What authentication methods does the facebook-marketing connector support? The connector supports authentication via Facebook Marketing API access token along with your Facebook Ad Account ID (without the act_ prefix). These credentials can be provided directly in open source mode or stored securely through Airbyte Cloud in hosted mode.

Can I use this connector with any AI agent framework?

What AI agent frameworks is this connector compatible with? The connector is compatible with any Python-based AI agent framework including LangChain, LlamaIndex, CrewAI, Pydantic AI, and custom implementations.

Does this connector support write operations?

Does the facebook-marketing connector support write operations? Currently, the connector focuses on read operations for analytics and reporting purposes. Write operations such as creating campaigns, updating budgets, pausing ads, or deleting creatives are not supported at this time.

How is this different from the Airbyte data connector?

How is this different from traditional Airbyte connectors? Agent connectors are specifically designed for AI agents and LLM applications. They provide natural language interfaces, optimized response formats, and seamless integration with agent frameworks, unlike traditional ETL-focused connectors.

Will there be a platform for agent connectors?

When will the hosted version be available? The hosted version with secure credential storage through Airbyte Cloud is already available. See the hosted usage section in the documentation for setup instructions.

20,000+
community members
6,000+
daily active companies
2PB+
synced/month
900+
contributors