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

# Facebook Ads Source

The Facebook Ads Source Connector ingests advertising data from the Meta Marketing API into Popsink pipelines. It retrieves campaigns, ad sets, and ads on a configurable schedule, enabling marketing analytics, budget tracking, and cross-channel reporting with fresh advertising data.

## Key Features

* **Ad structure by default:** ingests **campaigns**, **ad sets**, and **ads** out of the box; the resource list can be customized.
* **Token-based authentication:** uses a Marketing API access token scoped to your ad account.
* **Scheduled ingestion:** flexible scheduling by minutes, hours, or days, with an immediate first run on creation.

## Prerequisites

* A Meta app with the **Marketing API** product added.
* A Marketing API **access token** with the `ads_read` permission for the target ad account.
* Your **ad account ID** (found in Meta Ads Manager).

## Configuration

| Field            | Required | Description                                           |
| ---------------- | -------- | ----------------------------------------------------- |
| **Access Token** | Yes      | Marketing API access token with `ads_read` permission |
| **Account ID**   | Yes      | Ad account ID, with or without the `act_` prefix      |
| **Schedule**     | Yes      | Sync frequency — see [Scheduling](#scheduling)        |

## Scheduling

API source connectors run on a schedule rather than streaming continuously. A first run is always triggered immediately after the connector is created; subsequent runs depend on the selected mode:

| Mode        | Behavior                                                      | Example                                      |
| ----------- | ------------------------------------------------------------- | -------------------------------------------- |
| **days**    | Runs every N days at 00:00 UTC + offset (in minutes)          | Offset 30 → every day at 00:30 UTC           |
| **hours**   | Runs every N hours at :00 + offset (in minutes)               | Offset 15 → 00:15, 01:15, 02:15, …           |
| **minutes** | Runs every N minutes, anchored on the connector creation time | Created 10:03, interval 10 → 10:13, 10:23, … |
