ePrivacy and GPDR Cookie Consent by Cookie Consent Skip to main content

Connector Facebook Ads

Facebook Ads is a comprehensive advertising platform provided by Facebook, enabling businesses to craft targeted paid advertisements across various social media channels, including Facebook, Messenger, and Instagram.

This powerful tool allows businesses to reach specific audiences based on demographics, interests, and behaviors. In the context of data integration, the Facebook Ads connector serves as a vital link between the advertising platform and Customer Data Platforms (CDP) like Meiro Integrations. This connector facilitates the seamless extraction of valuable data related to ads, adsets, and campaigns from your Facebook Ads account. By integrating Facebook Ads with a CDP, businesses gain the capability to consolidate and analyze this extracted data, fostering a deeper understanding of customer interactions and optimizing marketing strategies for enhanced engagement and conversion.


The Facebook Ads connector allows you to integrate your Facebook Ads account with Meiro Integrations and extract data about your ads (including adsets and campaigns) and ad insights from your Facebook Ad account. 

Facebook Advertising aka Facebook Ads is Facebook’s advertising platform that offers businesses the ability to create paid advertisements that targets their audiences across Facebook’s social media platforms, i.e. Facebook, Messenger, and Instagram.


To set up and run a Facebook Ads connector, you will need:

  • The Facebook Ad account that you want to extract your ad campaign data from.
  • A Facebook account that is authorised to access this Facebook Ad account.
  • The ID of the Ad account that you want to extract data from.
  • The ID of the Facebook page that you are creating ads from.


The Facebook Ads connector is built on the base of the Facebook Marketing API.

This marketing API offers an extensive list of parameters and fields that you can extract from its endpoint for reporting and analytics.

Data In/Data Out

Data In


Data Out

When successfully run, all data queried will be output into CSV tables in the data/out/tables folder.

Warning: There will be no data output for the specified account if it is inactive.

Learn more: about the folder structure here.


In order to connect to the Facebook Marketing API and successfully extract data from your Facebook Ads account, the account needs to be authenticated and be granted various permissions from Facebook in order to gain access to its ads and ad insights.

Learn more: about access and authentication here.

Additionally, the user creating the Facebook Ads connector needs to have authorized access to the Facebook Ads account. You can contact the admin of your Facebook page and ask them to grant you access.

You can check if you have been granted access to your Facebook Ads account by logging into your Facebook account and clicking on the drop-down arrow located on the Facebook toolbar. 

Clicking on that arrow should display a drop-down menu that should show you which Facebook pages you have been authorized to view and manage. You should be able to view links to create and manage Ads.


Once you have created your Facebook Ads connector on Meiro Integrations, you will be required to authorize it to access your Facebook account.


Clicking on Authorize will instantly create a table of configuration parameters where you fill in your credentials to enable the connector to connect to your Facebook Ad account and create queries to extract the data that you want.

You can reset your connector’s authorization at any time or if you want to authorize another Facebook ad account instead.



ID (required)

Specify the ID string of the Facebook Ad account that you want to extract data from. You can locate this ID by logging into your Facebook account, clicking on the drop-down arrow and clicking on Business Manager. 


On the Business Manager page, you should be able to see a table for Ad accounts (if you don’t see this table, contact your admin to ensure you have been given access to your Facebook page’s ad accounts).

Under Ad accounts, you should be able to see the ad accounts linked to your Facebook page. Each ad account has its own unique ID found under its name. 

As the ID field is a string, it should be specified like this: act_<your ad account id>

So for example, if your ad account id is 12345678910, you should define it in the ID field of the Facebook Ads connector like this: act_12345678910.

Name (required)

This is where you specify the name of the Ad account.

Currency (required)

This is where you specify the particular currency that you want to view ad costs in.

Account ID (required)

This is where you specify the ID of the ad account.

Business Name (required)

This is where you specify the business name that the ad account is associated with.

API Version (required)


Знімок екрана 2024-03-15 о 14.36.57.png

Set this field to the latest version that the Facebook Marketing API is currently running on. In case of failure, use v16.0.




Name (required)

This field describes the query that you want to make. Whatever name you have decided to use in this field will also be prefixed to the queried table-names in the Data Out bucket.

The only exception is when the name used in this field also matches the name of the corresponding endpoint that you want to query (e.g. when you’re querying campaign data and you describe this query as campaigns and the endpoint that you want to extract data from is also called campaigns).

Type (required)

This field refers to the type of query you want to make. Currently, the only type of query that exists is nested-query and this field is therefore defined as such by default.

Learn more: about making nested queries here.

Path (optional)

This field refers to the endpoint URL part of the request that is made to the Facebook Marketing API. The absolute URL looks like: https://graph.facebook.com/<api_version>/<endpoint>.  For example, if you want to query data about your ads, you would define this field as ads.

If this field is left empty, the API would extract from the root node which would be the page itself.

Learn more: List of the supported Facebook Marketing API endpoints here.

Fields (required)

This is where you specify a set of parameters that you want to specifically query from your endpoint. For example, data about a single ad contains fields such as id, name. You can list these fields in this section and separate them with commas.

You can also add additional parameters within these fields by separating them with periods followed by the parameter name and the value in brackets.

An example query that includes additional parameters would look something like this:



Another example query with a specific time range is the following:


IDs (required) This field specifies the account(s) that the query will be applied to. You can specify one or more ad account IDs (separated by commas).
Limit (optional) This field refers to the Facebook Marketing API request parameter limit and returns the maximum number of objects that can be returned on a single page of request. It is defined as 25 by default but the maximum limit that can be specified is 100.

Since (optional)

This field corresponds to the Facebook Marketing API’s time range parameters. You can use this field to specify a range of the data that you want to collect from your endpoint and can be specified relatively (e.g.10 days ago) or absolutely (in the DD-MM-YYYY format). Leaving this field empty will not affect your queried data.

Until (optional)

This field functions in a similar way as the Since field and also corresponds to the Facebook Marketing API’s time range parameters. 

Use this field to specify until which particular date you want to extract your data. This field can also be specified relatively (e.g.10 days ago) or absolutely (in the DD-MM-YYYY format). Leaving this field empty will also not affect your queried data.