Circle Separator5 mins read

How to Send Data From Facebook Ads to BigQuery

The BigQuery Facebook Ads connector is the simplest way to send selected Meta Ads data to BigQuery. It connects to a Meta Business app, retrieves supported Facebook Ads reports, and loads them into BigQuery on a recurring schedule. The minimum recurring interval is 24 hours, so the connector is suited to daily reporting and analysis.

Use a custom Meta Marketing API pipeline or a managed ETL connector when you need hourly updates, custom reports, near-real-time data, or more control over transformations.

Best Way to Move Facebook Ads Data to BigQuery

MethodBest forRefresh rateCoding requiredMain limitation
BigQuery Data Transfer ServiceDaily reporting and warehouse importsMinimum 24 hoursNoFixed supported tables and reports
Meta Marketing API plus custom pipelineCustom fields, transformations, or frequent syncsFlexibleYesYour team maintains authentication, retries, schemas, and rate limits
Managed ETL connectorMultiple ad platforms and low-maintenance pipelinesDepends on providerNo or low-codeAdditional subscription cost
Manual CSV exportOne-time analysis or testingManualNoNot suitable for recurring reporting

For teams already using Google Cloud, start with the BigQuery Data Transfer Service. It removes the need to build an API ingestion system, but it does not provide real-time data or arbitrary Meta Ads reports.

What Data Can the Facebook Ads Connector Transfer?

The BigQuery Facebook Ads connector transfers selected Facebook Ads objects and reports, including:

  • AdInsights
  • AdInsightsActions
  • Ads
  • Campaigns
  • AdSets

You can set the insights aggregation level to the account, campaign, ad set, or ad level. The time increment can range from one to seven days, and the connector supports selected generic and action breakdowns.

Depending on the selected action collections and breakdowns, the transferred data can include:

  • Spend
  • Impressions
  • Clicks
  • Conversions
  • Actions
  • Action values
  • Return on ad spend fields

How Do You Connect Facebook Ads to BigQuery?

1. Create a BigQuery Dataset

Create or select the Google Cloud project and BigQuery dataset that will store the Facebook Ads tables.

Before creating the transfer, confirm that:

  • BigQuery is enabled in the Google Cloud project.
  • The BigQuery Data Transfer Service is enabled.
  • A destination dataset exists.
  • Your Google Cloud account can create transfers and write to the dataset.

Google Cloud uses the destination dataset's location for the transfer configuration. Choose the location carefully because BigQuery dataset locations cannot be changed after creation.

2. Create a Meta Business App

The Facebook Ads connection requires a Meta developer app with the Business app type.

In the Meta App Dashboard:

  1. Create a Business app.
  2. Open App Settings > Basic.
  3. Copy the app ID and app secret.
  4. Configure Facebook Login for Business.
  5. Add the OAuth redirect URI provided during the BigQuery transfer setup to the app's valid OAuth redirect URI list.

Google Cloud identifies the required credentials as:

  • clientID
  • clientSecret
  • refreshToken

The refresh token is a long-lived Facebook user access token that authorizes the transfer.

3. Create the Facebook Ads Transfer

In the Google Cloud console:

  1. Open BigQuery.
  2. Go to Data transfers.
  3. Select Create transfer.
  4. Choose Facebook Ads as the source.
  5. Select the destination project and BigQuery dataset.
  6. Enter the Meta app credentials.
  7. Click Authorize.
  8. Select the Meta developer app and Facebook account with access to the advertising accounts.
  9. Select the Facebook Ads objects and reports to transfer.
  10. Configure the schedule and save the transfer.

Google Cloud starts transfer runs according to the schedule. You can also run a backfill when historical data needs to be loaded again.

4. Select the Insights Settings

The connector's insights settings control how Facebook Ads data is grouped in BigQuery.

Insights Level

Choose the level that matches your reporting needs:

  • Account
  • Campaign
  • Ad set
  • Ad

Campaign or ad set level is often enough for campaign performance reporting. Use ad level when you need creative-level analysis, but expect more rows and potentially more API usage.

Time Increment

The time increment controls how the connector groups insights data. A value of one produces daily rows. Larger values group performance across multiple days.

For daily reporting, use a one-day increment where supported.

Generic Breakdowns

Generic breakdowns split performance by dimensions such as:

  • Publisher platform
  • Platform position
  • Device
  • Age
  • Gender

Action Breakdowns

Action breakdowns organize conversion and engagement actions into separate structures. Examples include action type and action device.

Meta restricts which breakdown combinations can be used together. An unsupported combination can cause the transfer to fail, so use combinations allowed by the Ads reporting API.

How Does the Data Appear in BigQuery?

The connector creates tables in the destination dataset for the selected Facebook Ads objects. A basic analysis query may look like this:

SELECT
  date_start,
  campaign_id,
  campaign_name,
  spend,
  impressions,
  clicks
FROM
  `your_project.facebook_ads.AdInsights`
WHERE
  date_start >= DATE_SUB(CURRENT_DATE(), INTERVAL 30 DAY)
ORDER BY
  date_start DESC;

The exact field names and table schema depend on the selected report, breakdowns, and current connector mapping. Check the generated table schema before building production dashboards.

A common warehouse design uses three layers:

  1. Raw layer: Tables created by the Facebook Ads transfer.
  2. Staging layer: Cleaned and standardized metrics.
  3. Reporting layer: Business-ready tables for Looker Studio, Looker, Tableau, Power BI, or another analytics tool.

A reporting table might include:

  • Date
  • Account ID
  • Campaign ID
  • Ad set ID
  • Ad ID
  • Spend
  • Impressions
  • Clicks
  • Conversions
  • Revenue
  • Currency
  • Platform
  • Placement

This structure makes it easier to join Facebook Ads data with Google Ads, Google Analytics 4, CRM, ecommerce, and revenue data.

What Are the Limitations of the Native Connector?

Transfers Run at Least Once Every 24 Hours

The minimum recurring interval for Facebook Ads transfers is 24 hours. The connector is suitable for daily reporting, but not for live bid monitoring or hourly optimization.

Custom Reports Are Not Supported

The connector supports a fixed set of Facebook Ads tables and reports. It does not support arbitrary custom reports. Use the Meta Marketing API when you need a field or report that the connector does not expose.

Several Tables Do Not Support Incremental Transfers

Incremental transfers are not supported for:

  • AdInsights
  • AdInsightsActions
  • Ads
  • Campaigns
  • AdSets

Google Cloud states that these tables can be reloaded for the selected date range during each transfer. The refresh window can be configured for up to 30 days.

Access Tokens Expire

Long-lived user access tokens expire after 60 days. When a token expires, the transfer stops until you generate or authorize a replacement token.

Google Cloud also recommends checking that the token includes:

  • ads_management
  • ads_read
  • business_management

Large Configurations Can Hit Meta Rate Limits

Selecting many action collections and breakdowns increases the number of fields and API requests. Google Cloud warns that adding more action collections increases the likelihood of reaching Facebook Ads rate limits.

When Should You Use the Meta Marketing API Instead?

Use a custom Meta Marketing API to BigQuery pipeline when the native connector does not meet your requirements.

A typical architecture is:

Meta Marketing API
        ↓
Cloud Run, Cloud Functions, or another scheduled worker
        ↓
Cloud Storage or BigQuery staging table
        ↓
BigQuery transformation models
        ↓
Reporting tables and dashboards

The pipeline normally:

  1. Authenticates with Meta using an access token.
  2. Requests data from the Ad Account Insights endpoint.
  3. Paginates through the response.
  4. Retries temporary API errors.
  5. Normalizes nested action and conversion fields.
  6. Deduplicates records using account, date, object, and breakdown keys.
  7. Loads the results into BigQuery.
  8. Reprocesses a rolling historical window to capture attribution changes.

BigQuery supports batch loading from formats such as CSV and newline-delimited JSON. For custom high-throughput streaming pipelines, Google Cloud also supports the BigQuery Storage Write API.

This approach provides more control, but your team must maintain:

  • The Meta API version
  • Permissions
  • Token renewal
  • Rate-limit handling
  • Schema changes
  • Data validation
  • Backfills

How Much Does It Cost?

The total cost can include:

  • BigQuery Data Transfer Service charges, where applicable
  • BigQuery storage charges
  • BigQuery query processing charges
  • Cloud Run, Cloud Functions, or Cloud Storage charges
  • A managed ETL provider subscription

Google Cloud states that standard BigQuery storage and query pricing applies after the data reaches BigQuery. Check current Google Cloud pricing before estimating production costs. Charges depend on data volume, query patterns, region, and retention.

For a standard marketing reporting setup:

  1. Create a BigQuery dataset in the required location.
  2. Configure the Facebook Ads connector in BigQuery Data Transfer Service.
  3. Use a daily transfer schedule.
  4. Select the AdInsights, Campaigns, AdSets, and Ads tables required by your reporting.
  5. Group insights at campaign or ad set level unless creative-level analysis requires ad-level data.
  6. Use a refresh window of 7 to 30 days to account for attribution updates.
  7. Separate raw transfer tables from staging and reporting tables.
  8. Use scheduled SQL or Dataform for transformations.
  9. Monitor failed runs and expired tokens.

Choose the Meta Marketing API instead when you need refreshes more often than once per day, unsupported fields, custom reports, near-real-time ingestion, or full control over the warehouse schema.

Next Read