JDBC Driver for Facebook Ads

Build 22.0.8462


Query the Ad Accounts available for a User. Accessing Ad Account information requires the ads_read permission.

Table Specific Information

AdAccounts in Facebook are the accounts you have available in Facebook for creating Ads on. The Ids for them are always returned in the format "act_" and when they are used as a Target in requests for other tables, the Id with the prefix "act_" must always be used.


When querying AdAccounts, the Id or Target can be used to filter results. For instance:

SELECT * FROM AdAccounts WHERE Id = 'act_123456'

If you use Facebook Business Manager and manage AdAccounts for clients, all of the ad account ids your business has access to can be listed like so:

SELECT Id FROM AdAccounts WHERE Target IN (SELECT Id FROM Businesses)

Otherwise if Id is not specified, the accounts available for your user account will be listed.


Name Type Description
ID [KEY] String The Id of Ad Account.
Target String The target to get ad accounts from such as a business id.
AccountId String The Id of the Ad Account when viewed directly in Facebook.
AccountStatus Integer Status of the account. 1 = Active, 2 = Disabled, 3 = Unsettled, 7 = Pending Review, 9 = in Grace Period, 101 = temporarily unavailable, 100 = pending closure.
Age Double Amount of time the ad account has been open, in days.
AmountSpent Integer Current total amount spent by the account. This can be reset.
Balance Integer Bill amount due.
BusinessCity String City for business address.
BusinessCountryCode String Country code for the business address.
BusinessName String The business name for the account.
BusinessState String State abbreviation for business address.
BusinessStreet String First line of the business street address for the account.
BusinessStreet2 String Second line of the business street address for the account.
BusinessZip String Zip code for business address.
Capabilities String Capabilities allowed for this ad account.
CreatedTime Datetime The time the account was created.
Currency String The currency used for the account, based on the corresponding value in the account settings.
MinCampaignGroupSpendCap String The minimum campaign group spend limit.
Name String Name of the account; note that many accounts are unnamed, so this field may be empty.
OffsitePixelsTosAccepted String Indicates whether the offsite pixel Terms Of Service contract was signed.
OwnerId String Facebook ID of the owner fo the Ad Account.
SpendCap Integer The maximum that can be spent by this account after which campaigns will be paused. A value of 0 signifies no spending-cap.
TimezoneId String ID for the timezone.
TimezoneName String Name for the time zone.
TimezoneOffsetHoursUTC Double Time Zone difference from UTC.

Copyright (c) 2023 CData Software, Inc. - All rights reserved.
Build 22.0.8462