Bring data from Facebook Ads to your Lakehouse.
Facebook Authorization
button and log in with your Facebook account. Grant the necessary permissions for the ad accounts you want to extract data from. After authentication, select the specific Ad Account for this source and define a start date for data retrieval. Facebook’s API allows fetching reports up to 36 months in the past.
You can also enable advanced reports for gender, country, age and device platform segmentations, but be aware that this will increase extraction times. Additionally, you can configure attribution windows and lookback periods in the Advanced Settings
.
Once you’re done, click Next.
Tip: The stream can be found more easily by typing its name.Select the streams and click Next.
Campaigns
id
- Unique identifier for the campaignname
- Name of the campaignobjective
- The objective of the campaign (e.g., brand awareness, conversions)status
- The status of the campaign (e.g., active, paused)daily_budget
- The daily budget for the campaignlifetime_budget
- The lifetime budget for the campaignstart_time
- The start time of the campaignstop_time
- The stop time of the campaigncreated_time
- When the campaign was createdupdated_time
- When the campaign was last updatedbudget_remaining
- The remaining budget for the campaignspend_cap
- Maximum amount that can be spent on the campaignbudget_rebalance_flag
- Whether budget rebalancing is enabledlast_budget_toggling_time
- Last time the budget was modifiedbid_strategy
- The bidding strategy used for the campaignaccount_id
- The ID of the ad accountbuying_type
- The buying type of the campaign (e.g., auction, fixed price)configured_status
- The configured status of the campaigneffective_status
- The effective status of the campaignpacing_type
- Array of pacing types for the campaignprimary_attribution
- Primary attribution settingsource_campaign_id
- ID of the source campaign if this is a copyboosted_object_id
- ID of the boosted objecttopline_id
- ID of the toplinespecial_ad_category
- Category for special ads (e.g., housing, employment)special_ad_categories
- Array of special ad categoriesspecial_ad_category_country
- Array of countries for special ad targetingcan_create_brand_lift_study
- Whether brand lift studies are availablecan_use_spend_cap
- Whether spend caps can be usedhas_secondary_skadnetwork_reporting
- Whether secondary SKAdNetwork reporting is enabledis_skadnetwork_attribution
- Whether SKAdNetwork attribution is enabledsmart_promotion_type
- Type of smart promotionad_strategy_group_id
- ID of the ad strategy groupad_strategy_id
- ID of the ad strategyadlabels
- Array of labels attached to the campaign, each containing:
id
- Label IDname
- Label namecreated_time
- When the label was createdupdated_time
- When the label was last updatedAd Sets
id
- Unique identifier for the ad setname
- Name of the ad setcampaign_id
- The ID of the campaign this ad set belongs tostatus
- The status of the ad setdaily_budget
- The daily budget for the ad setlifetime_budget
- The lifetime budget for the ad setstart_time
- The start time of the ad setend_time
- The end time of the ad setcreated_time
- When the ad set was createdupdated_time
- When the ad set was last updatedaccount_id
- The ID of the ad accountbid_strategy
- The bid strategy for the ad setbid_amount
- The bid amountbid_info
- Detailed bid information including:
CLICKS
- Bid for clicksACTIONS
- Bid for actionsREACH
- Bid for reachIMPRESSIONS
- Bid for impressionsSOCIAL
- Bid for social impressionsbudget_remaining
- Remaining budgetdaily_min_spend_target
- Minimum daily spend targetlifetime_min_spend_target
- Minimum lifetime spend targetlifetime_spend_cap
- Maximum lifetime spendbilling_event
- The billing event typeoptimization_goal
- The optimization goaloptimization_sub_event
- Sub-event for optimizationpacing_type
- Array of pacing typesdestination_type
- Type of destinationis_dynamic_creative
- Whether dynamic creative is enabledsource_adset_id
- ID of source ad set if this is a copytargeting
- Complex targeting object containing:
age_max
- Maximum ageage_min
- Minimum agegenders
- Array of targeted gendersgeo_locations
- Geographic targeting settingsinterests
- Targeted interestsbehaviors
- Targeted behaviorscustom_audiences
- Custom audience targetingexcluded_custom_audiences
- Excluded custom audiencesdevice_platforms
- Targeted devicespublisher_platforms
- Targeted publishing platformsfacebook_positions
- Ad positions on Facebookinstagram_positions
- Ad positions on Instagramexcluded_publisher_categories
- Excluded publisher categorieslearning_stage_info
- Information about the learning stage:
status
- Current learning statusconversions
- Number of conversionslast_sig_edit_ts
- Last significant edit timestampattribution_windows
- Array of attribution windowsadlabels
- Array of labels attached to the ad setattribution_spec
- Attribution specificationsreview_feedback
- Review feedbackrf_prediction_id
- RF prediction IDAds
id
- Unique identifier for the adname
- Name of the adadset_id
- The ID of the ad set this ad belongs tocampaign_id
- The ID of the campaign this ad belongs tostatus
- The status of the adcreated_time
- When the ad was createdupdated_time
- When the ad was last updatedcreative
- The creative object containing:
id
- Creative IDcreative_id
- Alternative creative ID referencetracking_specs
- Array of tracking specifications:
application
- Application trackingpost
- Post trackingconversion_id
- Conversion trackingaction_type
- Types of actions to trackfb_pixel
- Facebook pixel trackingconversion_specs
- Array of conversion specificationsconversion_domain
- Domain for conversionsbid_type
- Type of biddingbid_amount
- Bid amountbid_info
- Detailed bidding informationaccount_id
- The ID of the ad accounteffective_status
- The effective status of the adconfigured_status
- The configured statuslast_updated_by_app_id
- ID of the app that last updated the adsource_ad_id
- ID of the source ad if this is a copyrecommendations
- Array of recommendations containing:
blame_field
- Field causing the issuecode
- Recommendation codeconfidence
- Confidence levelimportance
- Importance levelmessage
- Recommendation messagetitle
- Recommendation titleadlabels
- Array of labels attached to the adCreatives
id
- Unique identifier for the creativename
- Name of the creativetitle
- The title of the creativebody
- The body text of the creativeobject_story_spec
- The specification for the object storyimage_url
- The URL of the image used in the creativevideo_id
- The ID of the video used in the creativeaccount_id
- The ID of the ad accountactor_id
- The ID of the actor (e.g., page) associated with the creativeinstagram_actor_id
- The ID of the Instagram actorbranded_content_sponsor_page_id
- ID of the sponsor page for branded contentlink_url
- The URL the ad links tolink_destination_display_url
- Display URL for the linklink_og_id
- Open Graph ID for the linkobject_url
- URL of the objectobject_store_url
- Store URL for the objecttemplate_url
- Template URLurl_tags
- URL parameters for trackingimage_hash
- Hash of the image usedthumbnail_id
- ID of the thumbnailthumbnail_url
- URL of the thumbnailplayable_asset_id
- ID of the playable assetasset_feed_spec
- Specification for asset feeddestination_set_id
- ID of the destination setinstagram_permalink_url
- Permalink URL for Instagraminstagram_story_id
- ID of the Instagram storyeffective_instagram_story_id
- Effective ID of the Instagram storyeffective_instagram_media_id
- Effective ID of the Instagram mediaobject_id
- ID of the objectobject_type
- Type of objectobject_story_id
- ID of the object storyeffective_object_story_id
- Effective ID of the object storyplatform_customizations
- Customizations for different platformsuse_page_actor_override
- Whether to override the page actorcall_to_action_type
- Type of call to action buttonapplink_treatment
- Treatment for app linksdynamic_ad_voice
- Voice setting for dynamic adstemplate_url_spec
- Complex object containing URL specifications for different platforms:
android
- Android-specific settingsios
- iOS-specific settingsipad
- iPad-specific settingsiphone
- iPhone-specific settingsweb
- Web-specific settingswindows_phone
- Windows Phone settingsauthorization_category
- Category for authorizationcategorization_criteria
- Criteria for categorizationcategory_media_source
- Source of category mediaenable_direct_install
- Whether direct install is enabledstatus
- Status of the creativeAd Insights
ad_id
- The ID of the adadset_id
- The ID of the ad setcampaign_id
- The ID of the campaignaccount_id
- The ID of the ad accountdate_start
- The start date of the datadate_stop
- The stop date of the dataimpressions
- Number of times the ad was shownreach
- Number of unique people who saw the adfrequency
- Average number of times each person saw the adclicks
- Number of clicks on the adunique_clicks
- Number of unique clicksctr
- Click-through ratespend
- Amount spent on the adcpc
- Cost per clickcpm
- Cost per thousand impressionscpp
- Cost per 1,000 people reachedcost_per_unique_click
- Cost per unique clickcost_per_action_type
- Cost per action typeconversions
- Number of conversionscost_per_conversion
- Cost per conversionconversion_rate_ranking
- Ranking of conversion rateconversion_values
- Values of conversionscost_per_conversion
- Cost per conversionwebsite_purchase_roas
- Return on ad spend for website purchasespurchase_roas
- Overall return on ad spendsocial_spend
- Spend on social impressionssocial_impressions
- Number of social impressionsactions
- Detailed breakdown of different types of actionsvideo_p25_watched_actions
- Video views at 25%video_p50_watched_actions
- Video views at 50%video_p75_watched_actions
- Video views at 75%video_p95_watched_actions
- Video views at 95%video_p100_watched_actions
- Complete video viewsvideo_avg_time_watched_actions
- Average video watch timevideo_play_actions
- Number of video playsquality_ranking
- Quality ranking of the adengagement_rate_ranking
- Ranking of engagement ratequality_score_organic
- Organic quality scorequality_score_ectr
- Expected click-through rate scorequality_score_ecvr
- Expected conversion rate scoreage
- Age groupgender
- Gendercountry
- Countryregion
- Regiondevice_platform
- Device platformSQL code
SQL code
SQL code