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

# Meta Ads

> Query Facebook and Instagram ad performance for a Meta ad account live from Explore and AI agents

The Meta Ads [live source](https://docs.lightdash.com/integrations/live-sources) reads the campaigns, ad sets and ads of one Meta ad account, with spend, reach and conversions by date, audience and placement.

## Before you start

* **Ad account ID**, the number after `act=` in your Ads Manager URL.
* **A system user token** with the scope below, from [Meta Business settings](https://business.facebook.com/settings/system-users).

## Scopes

| Scope | Why |
| - | - |
| `ads_read` | Reads the ad account's campaigns, ad sets, ads and their insights |

## Connect Meta Ads

[Add a live source](https://docs.lightdash.com/integrations/live-sources/set-up-and-manage.md#connect-a-live-source), select **Meta Ads**, and enter the **Ad account ID** and **Access token**.

![The Add Meta Ads source dialog, with the ads\_read scope, the Ad account ID and Access token fields and Test button under Authentication, the Name field under Details, and the Add source button](https://mintcdn.com/lightdash/WuPlti30p6CHhcUC/images/integrations/live-sources/meta-ads-config.png?fit=max\&auto=format\&n=WuPlti30p6CHhcUC\&q=85\&s=4c739993307f581d6a1c391ac0c925f9)

## Semantic layer

### Insights

Facebook and Instagram ad performance for one Meta ad account: spend, reach, impressions, clicks and conversions, by campaign, ad set, ad, date, audience and placement. Dates are in the ad account time zone and money is in the ad account currency

| Field | Description |
| - | - |
|  Date | Day of the activity, in the ad account time zone |
|  Date month | Month of the activity, shown as its first day, in the ad account time zone |
|  Campaign ID | Meta campaign ID |
|  Campaign name | Name of the campaign |
|  Campaign objective | What the campaign is set up to achieve, such as sales, leads or traffic |
|  Ad set ID | Meta ad set ID |
|  Ad set name | Name of the ad set |
|  Ad ID | Meta ad ID |
|  Ad name | Name of the ad |
|  Age | Age range of the people reached, such as 25-34 |
|  Gender | Gender of the people reached |
|  Country | Two-letter code of the country of the people reached |
|  Platform | Where the ad ran, such as `facebook`, `instagram`, `threads`, `messenger` or `audience_network` |
|  Placement | Position within the platform, such as `feed` or `story` |
|  Spend | Amount spent, in the ad account currency. Meta reports it as an estimate |
|  Impressions | Number of times the ads were on screen |
|  Reach | Estimated number of people who saw the ads at least once |
|  Frequency | Average number of times each person saw the ads, estimated by Meta |
|  Clicks (all) | Number of all clicks on the ads, including link clicks, likes, comments and shares |
|  Link clicks | Number of clicks on links in the ads to destinations on or off Meta |
|  Click-through rate (all) | All clicks as a share of impressions |
|  Cost per click (all) | Average cost per click (all clicks), in the ad account currency |
|  Cost per 1,000 impressions | Average cost per 1,000 impressions, in the ad account currency |
|  Purchases | Number of purchases on the website, in the app and on Meta, attributed to the ads |
|  Purchase value | Value of those purchases, in the ad account currency |
|  Purchase ROAS | Purchase value divided by spend (return on ad spend) |
|  Leads | Number of leads from websites and Meta lead forms, attributed to the ads |
|  Landing page views | Number of times a landing page loaded after someone clicked a link in the ad |
|  Adds to cart | Number of adds to cart on the website, in the app and on Meta, attributed to the ads |
|  Checkouts initiated | Number of checkouts started on the website, in the app and on Meta, attributed to the ads |
|  Registrations completed | Number of registrations completed on the website, in the app and on Meta, attributed to the ads |

## Limits

| Limit | Value |
| - | - |
| Default date range | Last 30 days, when the query has no filter on Date |
| History | 37 months, or 13 months for reach and frequency with a breakdown |
| Most rows per query | 5,000 |
| Breakdowns per query | One of age and gender, country, or platform and placement. Placement needs Platform |


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