Skip to main content
Skip table of contents


With Data Virtuality, you can work with two Facebook APIs: Marketing API and Pages API.

With the Marketing API, you can get information on your ad accounts, campaigns, adsets, ads, and creatives, as well as indicators and metrics which you can use to analyze your Facebook ads performance.

The Pages API provides information on your pages per se, posts, phots, as well as likes, comments, and reactions. It also gives insights to help you understand how your audience is engaging with your pages by showing performance and engagement metrics.

For a more detailed description of both APIs, see the subpage.

How to Connect

There are two ways to connect to Facebook: via the Sources connection wizard in the Web UI (recommended), or using SQL statements in the Data Virtuality Studio or the Code Editor in the Web UI. Here, we describe the first way; for the second way, see the subpage.

1. Go to the Sources tab and click + New Source:

2. Find the Facebook button in the list of connectors or type ‘facebook’ in the search field:

3. Enter the data source name if you want it to be something different from the default ‘facebook’, click Continue with Facebook, and follow the instructions:


You have now a data source called facebook, and with it comes a wide variety of stored procedures you can use for your work. Please refer to other sections for usage and further information.

Query Wizard

The Web UI includes a query wizard you can use to create job for working with your data (you also have the ability to do it via the Code Editor).

To create a job via the Query Wizard, follow these steps:

1. On the Sources page, click on the Facebook tile to open the query wizard:

2. Select the data to replicate:

3. Enter the desired job properties:

4. Check the preview and, if all is well, click Create Now:

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.