> ## Documentation Index
> Fetch the complete documentation index at: https://v1-docs.adapt.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Meta Ads

> Connect Meta Ads to analyze advertising campaigns and performance

Connect Meta Ads to Adapt with an access token so Adapt can query your
Facebook and Instagram ad campaigns, spend, and performance.

## Set up credentials

**1. Create a Meta app**

In [Meta for Developers](https://developers.facebook.com/apps/), create
an app (or use an existing one) with **Marketing API** access.

**2. Generate an access token**

Under **Marketing API > Tools**, generate a token with the `ads_read`
permission for the ad account you want to connect.

**3. Find your ad account ID**

Copy the ad account ID from **Ads Manager** (format `act_<numbers>`).

## Connect to Adapt

**1. Open Integrations**

In Adapt, go to **Settings > Integrations**.

**2. Find Meta Ads**

Search for **Meta Ads** and select it from the catalog.

**3. Start the connection**

Click **Connect** to open the connection form.

**4. Add your credentials**

Enter the values you gathered above, then click **Add connection**:

| Secret Name | Value |
| - | - |
| `META_ACCESS_TOKEN` | Your Meta Marketing API access token |
| `META_AD_ACCOUNT_ID` | Your ad account ID, e.g. `act_123456789` |

You can rename the connection and choose whether it is shared with your
organization or kept personal to you.

**5. Test the connection**

Ask Adapt about your ad account's performance.

### Security

* Credentials are encrypted at rest with AES-256
* Use a token scoped only to `ads_read` unless you also need write access
* Rotate tokens regularly and remove any you no longer use

## Capabilities

Adapt can query your Meta Ads campaigns, ad sets, ads, and performance
metrics within what the token allows.

### Examples

```
How did our Meta Ads campaigns perform last week?
```

```
Which ad sets have the highest cost per click this month?
```

```
Summarize spend by campaign for the last 30 days.
```

```
Which ads have the best conversion rate?
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.