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

# Meta Ads (Marketing API)

> Your Facebook and Instagram ad accounts: account details, campaigns, and performance insights (spend, reach, clicks, conversions) at any level and breakdown.

![](https://mintcdn.com/webrouter/JBFYvcRI1PVnd4YX/logo/data-apis/meta-ads.webp?fit=max\&auto=format\&n=JBFYvcRI1PVnd4YX\&q=85\&s=a875d6b64399fc43ad2ecbc6d05787de)

[Web Catalog · Advertising](https://docs.webrouter.net/data-apis.md?category=advertising)

Needs&#x20;

`META_ADS_ACCESS_TOKEN`

Endpoints

3

Auth

Key in query

[Vendor docs](https://developers.facebook.com/docs/marketing-apis)

## Setup

| Variable | | What it is |
| - | - | - |
| `META_ADS_ACCESS_TOKEN` | required | a long-lived access token with the ads\_read permission (a system-user token from Meta Business Settings > System users, or a user token from a Meta app) |
| `META_GRAPH_API_VERSION` | optional | Graph API version. Meta retires old versions after about two years; pin one only to stay on it deliberately. Default `v25.0`. One of `v25.0`, `v26.0`, `v27.0`. |

Put them in your environment or `.env`; [Data APIs](https://docs.webrouter.net/vendors.md) covers the other ways.

## Notes

* Own-account API: reaches ad accounts the token's user or system user was given access to.
* Ad account ids carry the act\_ prefix in paths. Insights money fields (spend) come back as strings in the account currency, not cents.
* Pagination is cursor style: the answer's paging.next URL, or paging.cursors.after passed back as after.
* This catalog covers reads only; creating or changing campaigns is not included.

## Endpoints

GET

Get an ad account

Name, currency, status, timezone and amount spent of one ad account.

[Open](#meta-ads-account-get)

GET

List an ad account's campaigns

Campaigns with the fields you ask for.

[Open](#meta-ads-campaigns-list)

GET

Get ad performance insights

Spend, impressions, clicks, conversions and more for an account, campaign, ad set or ad, by day or breakdown.

[Open](#meta-ads-insights-get)

### Get an ad account

GET

`/{ad_account_id}`

`meta-ads.account.get`

Name, currency, status, timezone and amount spent of one ad account.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`ad_account_id` required</td><td>string</td><td>path</td><td>Ad account id WITH the act\_ prefix. Example `act_1234567890`</td></tr>

    <tr>
      <td>
        `fields`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Comma-separated AdAccount fields, e.g. name,currency,account\_status,amount\_spent,timezone\_name.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://developers.facebook.com/docs/marketing-api/reference/ad-account/) · Same job: [Snapchat Ads](https://docs.webrouter.net/data-apis/snapchat-ads.md#snapchat-ads-ad-accounts-get), [TikTok Ads (Marketing API)](https://docs.webrouter.net/data-apis/tiktok-ads.md#tiktok-ads-advertiser-info)

```python Python theme={null}
router.call_data_api("meta-ads.account.get", {'ad_account_id': 'act_1234567890'})
```

```text MCP theme={null}
call_data_api(endpoint="meta-ads.account.get", params={"ad_account_id": "act_1234567890"})
```

> [!NOTE]
>
> * account\_status is numeric: 1 active, 2 disabled, 3 unsettled.

### List an ad account's campaigns

GET

`/{ad_account_id}/campaigns`

`meta-ads.campaigns.list`

Campaigns with the fields you ask for.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`ad_account_id` required</td><td>string</td><td>path</td><td>Ad account id WITH the act\_ prefix. Example `act_1234567890`</td></tr>

    <tr>
      <td>
        `fields`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Comma-separated campaign fields, e.g. name,objective,status.
      </td>
    </tr>

    <tr><td>`effective_status`</td><td>string</td><td>query</td><td>JSON array of statuses: ACTIVE, PAUSED, ARCHIVED, DELETED, e.g. \["ACTIVE","PAUSED"]. Example `["ACTIVE","PAUSED"]`</td></tr>

    <tr>
      <td>
        `date_preset`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Date range for any insights fields requested, e.g. last\_7d.
      </td>
    </tr>

    <tr>
      <td>
        `limit`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Page size.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://developers.facebook.com/docs/marketing-api/reference/ad-account/campaigns/) · Same job: [Pinterest Ads](https://docs.webrouter.net/data-apis/pinterest-ads.md#pinterest-ads-campaigns-list), [Snapchat Ads](https://docs.webrouter.net/data-apis/snapchat-ads.md#snapchat-ads-campaigns-list), [TikTok Ads (Marketing API)](https://docs.webrouter.net/data-apis/tiktok-ads.md#tiktok-ads-campaign-list)

```python Python theme={null}
router.call_data_api("meta-ads.campaigns.list", {'ad_account_id': 'act_1234567890', 'effective_status': '["ACTIVE","PAUSED"]'})
```

```text MCP theme={null}
call_data_api(endpoint="meta-ads.campaigns.list", params={"ad_account_id": "act_1234567890", "effective_status": "[\"ACTIVE\",\"PAUSED\"]"})
```

> [!NOTE]
>
> * With no effective\_status filter, archived and deleted campaigns are left out.

### Get ad performance insights

GET

`/{ad_account_id}/insights`

`meta-ads.insights.get`

Spend, impressions, clicks, conversions and more for an account, campaign, ad set or ad, by day or breakdown.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`ad_account_id` required</td><td>string</td><td>path</td><td>Ad account id WITH the act\_ prefix. Example `act_1234567890`</td></tr>

    <tr>
      <td>
        `fields`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Comma-separated metrics, e.g. impressions,spend,clicks,ctr,actions. Default is impressions and spend.
      </td>
    </tr>

    <tr><td>`level`</td><td>string</td><td>query</td><td>Roll rows up at this level. One of `account`, `campaign`, `adset`, `ad`</td></tr>

    <tr>
      <td>
        `date_preset`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Relative range, e.g. last\_7d, last\_30d (default), this\_month, maximum. Ignored when time\_range is set.
      </td>
    </tr>

    <tr><td>`time_range`</td><td>object</td><td>query</td><td>\{'since':'YYYY-MM-DD','until':'YYYY-MM-DD'}. Example `{"since": "2026-10-01", "until": "2026-10-31"}`</td></tr>

    <tr>
      <td>
        `time_increment`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        all\_days (default), monthly, or 1-90 for N-day buckets.
      </td>
    </tr>

    <tr><td>`breakdowns`</td><td>string</td><td>query</td><td>JSON array of breakdowns: age, gender, country, region, publisher\_platform...; only some combinations are allowed. E.g. \["country"]. Example `["country"]`</td></tr>

    <tr>
      <td>
        `filtering`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        JSON array of \{field, operator, value} filters; operators include EQUAL, IN, GREATER\_THAN, CONTAIN. E.g. \[\{"field":"campaign.effective\_status","operator":"IN","value":\["ACTIVE"]}].
      </td>
    </tr>

    <tr>
      <td>
        `limit`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Page size.
      </td>
    </tr>

    <tr>
      <td>
        `after`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        paging.cursors.after from the previous answer.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://developers.facebook.com/docs/marketing-api/reference/ad-account/insights/) · Same job: [Google Ads](https://docs.webrouter.net/data-apis/google-ads.md#google-ads-query), [Pinterest Ads](https://docs.webrouter.net/data-apis/pinterest-ads.md#pinterest-ads-analytics-account), [Snapchat Ads](https://docs.webrouter.net/data-apis/snapchat-ads.md#snapchat-ads-stats-campaign), [TikTok Ads (Marketing API)](https://docs.webrouter.net/data-apis/tiktok-ads.md#tiktok-ads-report-query)

```python Python theme={null}
router.call_data_api("meta-ads.insights.get", {'ad_account_id': 'act_1234567890', 'time_range': {'since': '2026-10-01', 'until': '2026-10-31'}, 'breakdowns': '["country"]'})
```

```text MCP theme={null}
call_data_api(endpoint="meta-ads.insights.get", params={"ad_account_id": "act_1234567890", "time_range": {"since": "2026-10-01", "until": "2026-10-31"}, "breakdowns": "[\"country\"]"})
```

> [!NOTE]
>
> * Large queries can time out; narrow the date range or level, or request fewer breakdowns.
> * Conversions appear under actions as \{action\_type, value} lists, not as flat fields.


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