canonical: https://jentic.com/apis/graph.facebook.com/meta-marketing

# Graph Facebook Meta Marketing API

The Meta Marketing API creates and manages paid advertising on Facebook, Instagram, Messenger, and the Audience Network. An ad account holds campaigns, which contain ad sets that define targeting and budget, which in turn contain ads built from ad creatives. Custom audiences are defined for targeting, and insights endpoints return performance data at the account, campaign, ad set, and ad level.

## For AI agents

Create and manage Meta ad campaigns, ad sets, ads, and creatives for an ad account, build custom audiences, and read performance insights across Facebook, Instagram, Messenger, and the Audience Network.

## Scope

Does not handle organic page posting, direct messaging, or payment processing. Use for managing paid Meta ad campaigns, audiences, and reporting only.

## Capabilities

- Create and list ad campaigns under an ad account
- Define ad sets with targeting and budget inside a campaign
- Build ads from ad creatives for an ad account
- Create custom audiences for ad targeting
- Read performance insights at the account, campaign, ad set, and ad level
- Delete campaigns, ad sets, or ads from an ad account

## Use cases

### Agent-Driven Campaign Launch

An AI agent connected through Jentic launches a Meta ad by creating a campaign, adding an ad set with targeting and budget, and attaching an ad built from a creative. Because the objects nest from campaign to ad set to ad under one ad account, the agent assembles a complete, structured campaign without clicking through Ads Manager.

Example prompt: Create a campaign, add an ad set with targeting and a daily budget, then create an ad from a creative under the ad account

### Ad Performance Reporting

Reporting tools pull spend and results with the insights endpoints, which return performance at the account, campaign, ad set, and ad level. An agent requests insights for a campaign to refresh a dashboard rather than aggregating raw delivery events.

Example prompt: Request insights for a campaign over the last 7 days and summarize spend, impressions, and results

### Audience Building and Retargeting

Growth teams create custom audiences for targeting and retargeting across Meta's placements. The custom-audiences endpoint under an ad account lets an agent create and list audiences, so a workflow prepares targeting before an ad set references it.

Example prompt: Create a custom audience for an ad account and confirm it is available for ad set targeting

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/act_{ad_account_id}/campaigns` | Create an ad campaign |
| GET | `/act_{ad_account_id}/campaigns` | List ad campaigns |
| POST | `/act_{ad_account_id}/adsets` | Create an ad set with targeting and budget |
| POST | `/act_{ad_account_id}/ads` | Create an ad |
| POST | `/act_{ad_account_id}/adcreatives` | Create an ad creative |
| POST | `/act_{ad_account_id}/customaudiences` | Create a custom audience |
| GET | `/act_{ad_account_id}/insights` | Read ad account performance insights |

## Key resources

- **Campaigns** — Create, list, and delete ad campaigns under an ad account
- **Ad sets** — Define targeting and budget inside a campaign
- **Ads** — Create ads from ad creatives for an ad account
- **Ad creatives** — Create and list the creatives ads are built from
- **Custom audiences** — Create custom audiences for targeting and retargeting
- **Insights** — Read performance data at the account, campaign, ad set, and ad level

## AI readiness

This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.

- **Score:** 61 / 100
- **Maturity:** AI-Aware
- **Dimensions:**
  - Foundational Compliance: 46 / 100
  - Developer Experience & Jentic Compatibility: 63 / 100
  - AI-Readiness & Agent Experience: 49 / 100
  - Agent Usability: 92 / 100
  - Security: 90 / 100
  - AI Discoverability: 58 / 100
- **View full report:** https://jentic.com/apis/graph.facebook.com/meta-marketing/scorecard
- **How the score is calculated:** https://docs.jentic.com/reference/api-readiness-framework/overview/
- **More about the dimensions:** https://docs.jentic.com/reference/api-readiness-framework/specification/#dimensional-model-overview

### Score it yourself

Every API in the directory is allowlisted, so you can re-score it with no key required.

- **Score your own API:** https://jentic.com/scorecard.md
- **Scoring CLI agent skill:** https://github.com/jentic/jentic-api-scorecard/blob/main/skills/jentic-api-scorecard/SKILL.md

```sh
npx @jentic/api-scorecard-cli score <openapi-url>
```

## Why Jentic

- **Setup:** Wiring the Meta Marketing API by hand means running the Facebook OAuth 2.0 authorization-code flow, requesting the right ad scopes, and refreshing tokens yourself. Through Jentic you install once, import the Meta Marketing API from the API Directory, store the token once, and your agent calls the campaign, audience, and insights operations.
- **Permission scoping:** The ad account id sits in the URL path as act_{ad_account_id}, so a rule can pin your agent to one ad account. You choose the operations it may call, so destructive ones like campaign deletion are not included unless you add them.
- **Credential handling:** Your Meta access token is held by your own Jentic One instance, encrypted, and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'create a Meta ad campaign' or 'read campaign insights', and Jentic returns the matching Meta Marketing operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **TikTok Marketing API** — TikTok Marketing runs ad campaigns on TikTok, versus Meta's Facebook, Instagram, and Messenger placements.
- **LinkedIn Marketing API** — LinkedIn Marketing targets professional audiences, where Meta reaches consumer audiences across its apps.
- **Mixpanel API** — Mixpanel measures product behavior that pairs with Meta ad spend to attribute conversions.

## FAQ

### What authentication does the Meta Marketing API use?

The API uses Facebook OAuth 2.0 access tokens via the authorization-code flow, with scopes such as `ads_management`, `ads_read`, `business_management`, and `pages_read_engagement` as declared in its OpenAPI spec. Through Jentic the token is held by your own Jentic One instance and attached to each request at execution time, so it never appears in your agent's prompt or logs.

### Can I create ad campaigns with the Meta Marketing API?

Yes. You create a campaign under an ad account, add ad sets that carry targeting and budget, and attach ads built from ad creatives. Because the objects nest from campaign to ad set to ad, your agent assembles a complete campaign structure in a few calls.

### What are the rate limits for the Meta Marketing API?

The OpenAPI spec does not specify rate limits; Meta applies account-level ads throttling that varies by spend and access tier. Check the Meta Marketing API documentation at https://developers.facebook.com/docs/marketing-apis/ for current limits before running bulk campaign jobs.

### Is there a Meta Marketing API MCP server?

You do not need an MCP server to give your agent the Meta Marketing API. Jentic connects it directly from the API Directory: import it, store your access token once, and your agent calls the campaign, audience, and insights operations on demand without loading an extra server's tool definitions into its context.

### Can I limit what my agent is allowed to do with the Meta Marketing API?

Yes. The ad account id sits in the URL path as `act_{ad_account_id}`, so write a rule that allows only the campaign and insights read operations under one ad account id. The agent can then review that account's campaigns and performance and touch nothing else, and every call it makes is logged.

### How do I launch a Meta ad campaign through Jentic?

Install the Jentic One command line with `curl -fsSL https://raw.githubusercontent.com/jentic/jentic-one/main/tools/install.sh | sh`, then add the Meta Marketing API from the Jentic directory and search by intent such as 'create a Meta ad campaign'. Jentic returns the matching operation with its input schema so your agent builds a valid request. To run it on your own infrastructure, install Jentic One from its GitHub repo.
