Skip to main content

Facebook-Marketing full reference

This is the full reference documentation for the Facebook-Marketing agent connector.

Supported entities and actions

The Facebook-Marketing connector supports the following entities and actions.

EntityActions
Current UserGet
Ad AccountsList, Search
CampaignsList, Create, Get, Update, Search
Ad SetsList, Create, Get, Update, Search
AdsList, Create, Get, Update, Search
Ad CreativesList, Search
Ads InsightsList, Search
Ad AccountGet, Search
Custom ConversionsList, Search
ImagesList, Search
VideosList, Search
PixelsList, Get
Pixel StatsList

Current User

Current User Get

Returns information about the current user associated with the access token

Python SDK

await facebook_marketing.current_user.get()

API

curl --location 'https://api.airbyte.ai/api/v1/integrations/connectors/{your_connector_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "current_user",
"action": "get"
}'

Parameters

Parameter NameTypeRequiredDescription
fieldsstringNoComma-separated list of fields to return
Response Schema

Records

Field NameTypeDescription
idstring
namestring | null

Ad Accounts

Ad Accounts List

Returns a list of ad accounts associated with the current user

Python SDK

await facebook_marketing.ad_accounts.list()

API

curl --location 'https://api.airbyte.ai/api/v1/integrations/connectors/{your_connector_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "ad_accounts",
"action": "list"
}'

Parameters

Parameter NameTypeRequiredDescription
fieldsstringNoComma-separated list of fields to return
limitintegerNoMaximum number of results to return
afterstringNoCursor for pagination
Response Schema

Records

Field NameTypeDescription
idstring
account_idstring | null
namestring | null
account_statusinteger | null
agenumber | null
amount_spentstring | null
balancestring | null
businessobject | any
business_namestring | null
created_timestring | null
currencystring | null
disable_reasoninteger | null
spend_capstring | null
timezone_idinteger | null
timezone_namestring | null

Meta

Field NameTypeDescription
afterstring | null

Search and filter ad accounts records powered by Airbyte's data sync. This often provides additional fields and operators beyond what the API natively supports, making it easier to narrow down results before performing further operations. Only available in hosted mode.

Python SDK

await facebook_marketing.ad_accounts.search(
query={"filter": {"eq": {"id": "<str>"}}}
)

API

curl --location 'https://api.airbyte.ai/api/v1/integrations/connectors/{your_connector_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "ad_accounts",
"action": "search",
"params": {
"query": {"filter": {"eq": {"id": "<str>"}}}
}
}'

Parameters

Parameter NameTypeRequiredDescription
queryobjectYesFilter and sort conditions. Supports operators: eq, neq, gt, gte, lt, lte, in, like, fuzzy, keyword, not, and, or
query.filterobjectNoFilter conditions
query.sortarrayNoSort conditions
limitintegerNoMaximum results to return (default 1000)
cursorstringNoPagination cursor from previous response's meta.cursor
fieldsarrayNoField paths to include in results

Searchable Fields

Field NameTypeDescription
idstringAd account ID
account_idstringAd account ID (numeric)
namestringAd account name
balancestringCurrent balance of the ad account
currencystringCurrency used by the ad account
account_statusintegerAccount status
amount_spentstringTotal amount spent
business_namestringBusiness name
created_timestringAccount creation time
spend_capstringSpend cap
timezone_namestringTimezone name
Response Schema
Field NameTypeDescription
dataarrayList of matching records
metaobjectPagination metadata
meta.has_morebooleanWhether additional pages are available
meta.cursorstring | nullCursor for next page of results
meta.took_msnumber | nullQuery execution time in milliseconds
data[].idstringAd account ID
data[].account_idstringAd account ID (numeric)
data[].namestringAd account name
data[].balancestringCurrent balance of the ad account
data[].currencystringCurrency used by the ad account
data[].account_statusintegerAccount status
data[].amount_spentstringTotal amount spent
data[].business_namestringBusiness name
data[].created_timestringAccount creation time
data[].spend_capstringSpend cap
data[].timezone_namestringTimezone name

Campaigns

Campaigns List

Returns a list of campaigns for the specified ad account

Python SDK

await facebook_marketing.campaigns.list(
account_id="<str>"
)

API

curl --location 'https://api.airbyte.ai/api/v1/integrations/connectors/{your_connector_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "campaigns",
"action": "list",
"params": {
"account_id": "<str>"
}
}'

Parameters

Parameter NameTypeRequiredDescription
account_idstringYesThe Facebook Ad Account ID (without act_ prefix)
fieldsstringNoComma-separated list of fields to return
limitintegerNoMaximum number of results to return
afterstringNoCursor for pagination
Response Schema

Records

Field NameTypeDescription
idstring
namestring | null
account_idstring | null
adlabelsarray | null
adlabels[].idstring | null
adlabels[].namestring | null
adlabels[].created_timestring | null
adlabels[].updated_timestring | null
bid_strategystring | null
boosted_object_idstring | null
budget_rebalance_flagboolean | null
budget_remainingnumber | null
buying_typestring | null
daily_budgetnumber | null
created_timestring | null
configured_statusstring | null
effective_statusstring | null
issues_infoarray | null
issues_info[].error_codestring | null
issues_info[].error_messagestring | null
issues_info[].error_summarystring | null
issues_info[].error_typestring | null
issues_info[].levelstring | null
lifetime_budgetnumber | null
objectivestring | null
smart_promotion_typestring | null
source_campaign_idstring | null
special_ad_categorystring | null
special_ad_category_countryarray | null
spend_capnumber | null
start_timestring | null
statusstring | null
stop_timestring | null
updated_timestring | null

Meta

Field NameTypeDescription
afterstring | null

Campaigns Create

Creates a new ad campaign in the specified ad account

Python SDK

await facebook_marketing.campaigns.create(
account_id="<str>"
)

API

curl --location 'https://api.airbyte.ai/api/v1/integrations/connectors/{your_connector_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "campaigns",
"action": "create",
"params": {
"account_id": "<str>"
}
}'

Parameters

Parameter NameTypeRequiredDescription
account_idstringYesThe Facebook Ad Account ID (without act_ prefix)
Response Schema

Records

Field NameTypeDescription
idstring

Campaigns Get

Returns a single campaign by ID

Python SDK

await facebook_marketing.campaigns.get(
campaign_id="<str>"
)

API

curl --location 'https://api.airbyte.ai/api/v1/integrations/connectors/{your_connector_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "campaigns",
"action": "get",
"params": {
"campaign_id": "<str>"
}
}'

Parameters

Parameter NameTypeRequiredDescription
campaign_idstringYesThe campaign ID
fieldsstringNoComma-separated list of fields to return
Response Schema

Records

Field NameTypeDescription
idstring
namestring | null
account_idstring | null
adlabelsarray | null
adlabels[].idstring | null
adlabels[].namestring | null
adlabels[].created_timestring | null
adlabels[].updated_timestring | null
bid_strategystring | null
boosted_object_idstring | null
budget_rebalance_flagboolean | null
budget_remainingnumber | null
buying_typestring | null
daily_budgetnumber | null
created_timestring | null
configured_statusstring | null
effective_statusstring | null
issues_infoarray | null
issues_info[].error_codestring | null
issues_info[].error_messagestring | null
issues_info[].error_summarystring | null
issues_info[].error_typestring | null
issues_info[].levelstring | null
lifetime_budgetnumber | null
objectivestring | null
smart_promotion_typestring | null
source_campaign_idstring | null
special_ad_categorystring | null
special_ad_category_countryarray | null
spend_capnumber | null
start_timestring | null
statusstring | null
stop_timestring | null
updated_timestring | null

Campaigns Update

Updates an existing ad campaign

Python SDK

await facebook_marketing.campaigns.update(
campaign_id="<str>"
)

API

curl --location 'https://api.airbyte.ai/api/v1/integrations/connectors/{your_connector_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "campaigns",
"action": "update",
"params": {
"campaign_id": "<str>"
}
}'

Parameters

Parameter NameTypeRequiredDescription
campaign_idstringYesThe campaign ID
Response Schema

Records

Field NameTypeDescription
successboolean

Search and filter campaigns records powered by Airbyte's data sync. This often provides additional fields and operators beyond what the API natively supports, making it easier to narrow down results before performing further operations. Only available in hosted mode.

Python SDK

await facebook_marketing.campaigns.search(
query={"filter": {"eq": {"id": "<str>"}}}
)

API

curl --location 'https://api.airbyte.ai/api/v1/integrations/connectors/{your_connector_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "campaigns",
"action": "search",
"params": {
"query": {"filter": {"eq": {"id": "<str>"}}}
}
}'

Parameters

Parameter NameTypeRequiredDescription
queryobjectYesFilter and sort conditions. Supports operators: eq, neq, gt, gte, lt, lte, in, like, fuzzy, keyword, not, and, or
query.filterobjectNoFilter conditions
query.sortarrayNoSort conditions
limitintegerNoMaximum results to return (default 1000)
cursorstringNoPagination cursor from previous response's meta.cursor
fieldsarrayNoField paths to include in results

Searchable Fields

Field NameTypeDescription
idstringCampaign ID
namestringCampaign name
account_idstringAd account ID
statusstringCampaign status
effective_statusstringEffective status
objectivestringCampaign objective
daily_budgetnumberDaily budget in account currency
lifetime_budgetnumberLifetime budget
budget_remainingnumberRemaining budget
created_timestringCampaign creation time
start_timestringCampaign start time
stop_timestringCampaign stop time
updated_timestringLast update time
Response Schema
Field NameTypeDescription
dataarrayList of matching records
metaobjectPagination metadata
meta.has_morebooleanWhether additional pages are available
meta.cursorstring | nullCursor for next page of results
meta.took_msnumber | nullQuery execution time in milliseconds
data[].idstringCampaign ID
data[].namestringCampaign name
data[].account_idstringAd account ID
data[].statusstringCampaign status
data[].effective_statusstringEffective status
data[].objectivestringCampaign objective
data[].daily_budgetnumberDaily budget in account currency
data[].lifetime_budgetnumberLifetime budget
data[].budget_remainingnumberRemaining budget
data[].created_timestringCampaign creation time
data[].start_timestringCampaign start time
data[].stop_timestringCampaign stop time
data[].updated_timestringLast update time

Ad Sets

Ad Sets List

Returns a list of ad sets for the specified ad account

Python SDK

await facebook_marketing.ad_sets.list(
account_id="<str>"
)

API

curl --location 'https://api.airbyte.ai/api/v1/integrations/connectors/{your_connector_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "ad_sets",
"action": "list",
"params": {
"account_id": "<str>"
}
}'

Parameters

Parameter NameTypeRequiredDescription
account_idstringYesThe Facebook Ad Account ID (without act_ prefix)
fieldsstringNoComma-separated list of fields to return
limitintegerNoMaximum number of results to return
afterstringNoCursor for pagination
Response Schema

Records

Field NameTypeDescription
idstring
namestring | null
account_idstring | null
adlabelsarray | null
adlabels[].idstring | null
adlabels[].namestring | null
adlabels[].created_timestring | null
adlabels[].updated_timestring | null
bid_amountnumber | null
bid_infoobject | any
bid_strategystring | null
bid_constraintsobject | any
budget_remainingnumber | null
campaign_idstring | null
created_timestring | null
daily_budgetnumber | null
effective_statusstring | null
end_timestring | null
learning_stage_infoobject | any
lifetime_budgetnumber | null
promoted_objectobject | any
start_timestring | null
targetingobject | null
updated_timestring | null

Meta

Field NameTypeDescription
afterstring | null

Ad Sets Create

Creates a new ad set in the specified ad account

Python SDK

await facebook_marketing.ad_sets.create(
account_id="<str>"
)

API

curl --location 'https://api.airbyte.ai/api/v1/integrations/connectors/{your_connector_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "ad_sets",
"action": "create",
"params": {
"account_id": "<str>"
}
}'

Parameters

Parameter NameTypeRequiredDescription
account_idstringYesThe Facebook Ad Account ID (without act_ prefix)
Response Schema

Records

Field NameTypeDescription
idstring

Ad Sets Get

Returns a single ad set by ID

Python SDK

await facebook_marketing.ad_sets.get(
adset_id="<str>"
)

API

curl --location 'https://api.airbyte.ai/api/v1/integrations/connectors/{your_connector_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "ad_sets",
"action": "get",
"params": {
"adset_id": "<str>"
}
}'

Parameters

Parameter NameTypeRequiredDescription
adset_idstringYesThe ad set ID
fieldsstringNoComma-separated list of fields to return
Response Schema

Records

Field NameTypeDescription
idstring
namestring | null
account_idstring | null
adlabelsarray | null
adlabels[].idstring | null
adlabels[].namestring | null
adlabels[].created_timestring | null
adlabels[].updated_timestring | null
bid_amountnumber | null
bid_infoobject | any
bid_strategystring | null
bid_constraintsobject | any
budget_remainingnumber | null
campaign_idstring | null
created_timestring | null
daily_budgetnumber | null
effective_statusstring | null
end_timestring | null
learning_stage_infoobject | any
lifetime_budgetnumber | null
promoted_objectobject | any
start_timestring | null
targetingobject | null
updated_timestring | null

Ad Sets Update

Updates an existing ad set

Python SDK

await facebook_marketing.ad_sets.update(
adset_id="<str>"
)

API

curl --location 'https://api.airbyte.ai/api/v1/integrations/connectors/{your_connector_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "ad_sets",
"action": "update",
"params": {
"adset_id": "<str>"
}
}'

Parameters

Parameter NameTypeRequiredDescription
adset_idstringYesThe ad set ID
Response Schema

Records

Field NameTypeDescription
successboolean

Search and filter ad sets records powered by Airbyte's data sync. This often provides additional fields and operators beyond what the API natively supports, making it easier to narrow down results before performing further operations. Only available in hosted mode.

Python SDK

await facebook_marketing.ad_sets.search(
query={"filter": {"eq": {"id": "<str>"}}}
)

API

curl --location 'https://api.airbyte.ai/api/v1/integrations/connectors/{your_connector_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "ad_sets",
"action": "search",
"params": {
"query": {"filter": {"eq": {"id": "<str>"}}}
}
}'

Parameters

Parameter NameTypeRequiredDescription
queryobjectYesFilter and sort conditions. Supports operators: eq, neq, gt, gte, lt, lte, in, like, fuzzy, keyword, not, and, or
query.filterobjectNoFilter conditions
query.sortarrayNoSort conditions
limitintegerNoMaximum results to return (default 1000)
cursorstringNoPagination cursor from previous response's meta.cursor
fieldsarrayNoField paths to include in results

Searchable Fields

Field NameTypeDescription
idstringAd Set ID
namestringAd Set name
account_idstringAd account ID
campaign_idstringParent campaign ID
effective_statusstringEffective status
daily_budgetnumberDaily budget
lifetime_budgetnumberLifetime budget
budget_remainingnumberRemaining budget
bid_amountnumberBid amount
bid_strategystringBid strategy
created_timestringAd set creation time
start_timestringAd set start time
end_timestringAd set end time
updated_timestringLast update time
Response Schema
Field NameTypeDescription
dataarrayList of matching records
metaobjectPagination metadata
meta.has_morebooleanWhether additional pages are available
meta.cursorstring | nullCursor for next page of results
meta.took_msnumber | nullQuery execution time in milliseconds
data[].idstringAd Set ID
data[].namestringAd Set name
data[].account_idstringAd account ID
data[].campaign_idstringParent campaign ID
data[].effective_statusstringEffective status
data[].daily_budgetnumberDaily budget
data[].lifetime_budgetnumberLifetime budget
data[].budget_remainingnumberRemaining budget
data[].bid_amountnumberBid amount
data[].bid_strategystringBid strategy
data[].created_timestringAd set creation time
data[].start_timestringAd set start time
data[].end_timestringAd set end time
data[].updated_timestringLast update time

Ads

Ads List

Returns a list of ads for the specified ad account

Python SDK

await facebook_marketing.ads.list(
account_id="<str>"
)

API

curl --location 'https://api.airbyte.ai/api/v1/integrations/connectors/{your_connector_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "ads",
"action": "list",
"params": {
"account_id": "<str>"
}
}'

Parameters

Parameter NameTypeRequiredDescription
account_idstringYesThe Facebook Ad Account ID (without act_ prefix)
fieldsstringNoComma-separated list of fields to return
limitintegerNoMaximum number of results to return
afterstringNoCursor for pagination
Response Schema

Records

Field NameTypeDescription
idstring
namestring | null
account_idstring | null
adset_idstring | null
campaign_idstring | null
adlabelsarray | null
adlabels[].idstring | null
adlabels[].namestring | null
adlabels[].created_timestring | null
adlabels[].updated_timestring | null
bid_amountinteger | null
bid_infoobject | any
bid_typestring | null
configured_statusstring | null
conversion_specsarray | null
created_timestring | null
creativeobject | any
effective_statusstring | null
last_updated_by_app_idstring | null
recommendationsarray | null
recommendations[].blame_fieldstring | null
recommendations[].codeinteger | null
recommendations[].confidencestring | null
recommendations[].importancestring | null
recommendations[].messagestring | null
recommendations[].titlestring | null
source_ad_idstring | null
statusstring | null
tracking_specsarray | null
updated_timestring | null

Meta

Field NameTypeDescription
afterstring | null

Ads Create

Creates a new ad in the specified ad account. Note - requires a Facebook Page to be connected to the ad account.

Python SDK

await facebook_marketing.ads.create(
account_id="<str>"
)

API

curl --location 'https://api.airbyte.ai/api/v1/integrations/connectors/{your_connector_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "ads",
"action": "create",
"params": {
"account_id": "<str>"
}
}'

Parameters

Parameter NameTypeRequiredDescription
account_idstringYesThe Facebook Ad Account ID (without act_ prefix)
Response Schema

Records

Field NameTypeDescription
idstring

Ads Get

Returns a single ad by ID

Python SDK

await facebook_marketing.ads.get(
ad_id="<str>"
)

API

curl --location 'https://api.airbyte.ai/api/v1/integrations/connectors/{your_connector_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "ads",
"action": "get",
"params": {
"ad_id": "<str>"
}
}'

Parameters

Parameter NameTypeRequiredDescription
ad_idstringYesThe ad ID
fieldsstringNoComma-separated list of fields to return
Response Schema

Records

Field NameTypeDescription
idstring
namestring | null
account_idstring | null
adset_idstring | null
campaign_idstring | null
adlabelsarray | null
adlabels[].idstring | null
adlabels[].namestring | null
adlabels[].created_timestring | null
adlabels[].updated_timestring | null
bid_amountinteger | null
bid_infoobject | any
bid_typestring | null
configured_statusstring | null
conversion_specsarray | null
created_timestring | null
creativeobject | any
effective_statusstring | null
last_updated_by_app_idstring | null
recommendationsarray | null
recommendations[].blame_fieldstring | null
recommendations[].codeinteger | null
recommendations[].confidencestring | null
recommendations[].importancestring | null
recommendations[].messagestring | null
recommendations[].titlestring | null
source_ad_idstring | null
statusstring | null
tracking_specsarray | null
updated_timestring | null

Ads Update

Updates an existing ad

Python SDK

await facebook_marketing.ads.update(
ad_id="<str>"
)

API

curl --location 'https://api.airbyte.ai/api/v1/integrations/connectors/{your_connector_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "ads",
"action": "update",
"params": {
"ad_id": "<str>"
}
}'

Parameters

Parameter NameTypeRequiredDescription
ad_idstringYesThe ad ID
Response Schema

Records

Field NameTypeDescription
successboolean

Search and filter ads records powered by Airbyte's data sync. This often provides additional fields and operators beyond what the API natively supports, making it easier to narrow down results before performing further operations. Only available in hosted mode.

Python SDK

await facebook_marketing.ads.search(
query={"filter": {"eq": {"id": "<str>"}}}
)

API

curl --location 'https://api.airbyte.ai/api/v1/integrations/connectors/{your_connector_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "ads",
"action": "search",
"params": {
"query": {"filter": {"eq": {"id": "<str>"}}}
}
}'

Parameters

Parameter NameTypeRequiredDescription
queryobjectYesFilter and sort conditions. Supports operators: eq, neq, gt, gte, lt, lte, in, like, fuzzy, keyword, not, and, or
query.filterobjectNoFilter conditions
query.sortarrayNoSort conditions
limitintegerNoMaximum results to return (default 1000)
cursorstringNoPagination cursor from previous response's meta.cursor
fieldsarrayNoField paths to include in results

Searchable Fields

Field NameTypeDescription
idstringAd ID
namestringAd name
account_idstringAd account ID
adset_idstringParent ad set ID
campaign_idstringParent campaign ID
statusstringAd status
effective_statusstringEffective status
created_timestringAd creation time
updated_timestringLast update time
Response Schema
Field NameTypeDescription
dataarrayList of matching records
metaobjectPagination metadata
meta.has_morebooleanWhether additional pages are available
meta.cursorstring | nullCursor for next page of results
meta.took_msnumber | nullQuery execution time in milliseconds
data[].idstringAd ID
data[].namestringAd name
data[].account_idstringAd account ID
data[].adset_idstringParent ad set ID
data[].campaign_idstringParent campaign ID
data[].statusstringAd status
data[].effective_statusstringEffective status
data[].created_timestringAd creation time
data[].updated_timestringLast update time

Ad Creatives

Ad Creatives List

Returns a list of ad creatives for the specified ad account

Python SDK

await facebook_marketing.ad_creatives.list(
account_id="<str>"
)

API

curl --location 'https://api.airbyte.ai/api/v1/integrations/connectors/{your_connector_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "ad_creatives",
"action": "list",
"params": {
"account_id": "<str>"
}
}'

Parameters

Parameter NameTypeRequiredDescription
account_idstringYesThe Facebook Ad Account ID (without act_ prefix)
fieldsstringNoComma-separated list of fields to return
limitintegerNoMaximum number of results to return
afterstringNoCursor for pagination
Response Schema

Records

Field NameTypeDescription
idstring
namestring | null
account_idstring | null
actor_idstring | null
bodystring | null
call_to_action_typestring | null
effective_object_story_idstring | null
image_hashstring | null
image_urlstring | null
link_urlstring | null
object_story_idstring | null
object_story_specobject | null
object_typestring | null
statusstring | null
thumbnail_urlstring | null
titlestring | null
url_tagsstring | null

Meta

Field NameTypeDescription
afterstring | null

Search and filter ad creatives records powered by Airbyte's data sync. This often provides additional fields and operators beyond what the API natively supports, making it easier to narrow down results before performing further operations. Only available in hosted mode.

Python SDK

await facebook_marketing.ad_creatives.search(
query={"filter": {"eq": {"id": "<str>"}}}
)

API

curl --location 'https://api.airbyte.ai/api/v1/integrations/connectors/{your_connector_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "ad_creatives",
"action": "search",
"params": {
"query": {"filter": {"eq": {"id": "<str>"}}}
}
}'

Parameters

Parameter NameTypeRequiredDescription
queryobjectYesFilter and sort conditions. Supports operators: eq, neq, gt, gte, lt, lte, in, like, fuzzy, keyword, not, and, or
query.filterobjectNoFilter conditions
query.sortarrayNoSort conditions
limitintegerNoMaximum results to return (default 1000)
cursorstringNoPagination cursor from previous response's meta.cursor
fieldsarrayNoField paths to include in results

Searchable Fields

Field NameTypeDescription
idstringAd Creative ID
namestringAd Creative name
account_idstringAd account ID
bodystringAd body text
titlestringAd title
statusstringCreative status
image_urlstringImage URL
thumbnail_urlstringThumbnail URL
link_urlstringLink URL
call_to_action_typestringCall to action type
Response Schema
Field NameTypeDescription
dataarrayList of matching records
metaobjectPagination metadata
meta.has_morebooleanWhether additional pages are available
meta.cursorstring | nullCursor for next page of results
meta.took_msnumber | nullQuery execution time in milliseconds
data[].idstringAd Creative ID
data[].namestringAd Creative name
data[].account_idstringAd account ID
data[].bodystringAd body text
data[].titlestringAd title
data[].statusstringCreative status
data[].image_urlstringImage URL
data[].thumbnail_urlstringThumbnail URL
data[].link_urlstringLink URL
data[].call_to_action_typestringCall to action type

Ads Insights

Ads Insights List

Returns performance insights for the specified ad account

Python SDK

await facebook_marketing.ads_insights.list(
account_id="<str>"
)

API

curl --location 'https://api.airbyte.ai/api/v1/integrations/connectors/{your_connector_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "ads_insights",
"action": "list",
"params": {
"account_id": "<str>"
}
}'

Parameters

Parameter NameTypeRequiredDescription
account_idstringYesThe Facebook Ad Account ID (without act_ prefix)
fieldsstringNoComma-separated list of fields to return
date_preset"today" | "yesterday" | "this_month" | "last_month" | "this_quarter" | "maximum" | "last_3d" | "last_7d" | "last_14d" | "last_28d" | "last_30d" | "last_90d" | "last_week_mon_sun" | "last_week_sun_sat" | "last_quarter" | "last_year" | "this_week_mon_today" | "this_week_sun_today" | "this_year"NoPredefined date range
time_rangestringNoTime range as JSON object with since and until dates (YYYY-MM-DD)
level"ad" | "adset" | "campaign" | "account"NoLevel of aggregation
time_incrementstringNoNumber of days (1-90) to aggregate data over, or 'monthly' for monthly aggregation, or 'all_days' for daily breakdown. Use time_increment=1 to get daily insights data.
limitintegerNoMaximum number of results to return
afterstringNoCursor for pagination
Response Schema

Records

Field NameTypeDescription
account_idstring | null
account_namestring | null
campaign_idstring | null
campaign_namestring | null
adset_idstring | null
adset_namestring | null
ad_idstring | null
ad_namestring | null
clicksinteger | null
impressionsinteger | null
reachinteger | null
spendnumber | null
cpcnumber | null
cpmnumber | null
ctrnumber | null
date_startstring | null
date_stopstring | null
actionsarray | null
actions[].action_typestring | null
actions[].action_destinationstring | null
actions[].action_target_idstring | null
actions[].valuenumber | null
actions[].1d_clicknumber | null
actions[].7d_clicknumber | null
actions[].28d_clicknumber | null
actions[].1d_viewnumber | null
actions[].7d_viewnumber | null
actions[].28d_viewnumber | null
action_valuesarray | null
action_values[].action_typestring | null
action_values[].action_destinationstring | null
action_values[].action_target_idstring | null
action_values[].valuenumber | null
action_values[].1d_clicknumber | null
action_values[].7d_clicknumber | null
action_values[].28d_clicknumber | null
action_values[].1d_viewnumber | null
action_values[].7d_viewnumber | null
action_values[].28d_viewnumber | null

Meta

Field NameTypeDescription
afterstring | null

Search and filter ads insights records powered by Airbyte's data sync. This often provides additional fields and operators beyond what the API natively supports, making it easier to narrow down results before performing further operations. Only available in hosted mode.

Python SDK

await facebook_marketing.ads_insights.search(
query={"filter": {"eq": {"account_id": "<str>"}}}
)

API

curl --location 'https://api.airbyte.ai/api/v1/integrations/connectors/{your_connector_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "ads_insights",
"action": "search",
"params": {
"query": {"filter": {"eq": {"account_id": "<str>"}}}
}
}'

Parameters

Parameter NameTypeRequiredDescription
queryobjectYesFilter and sort conditions. Supports operators: eq, neq, gt, gte, lt, lte, in, like, fuzzy, keyword, not, and, or
query.filterobjectNoFilter conditions
query.sortarrayNoSort conditions
limitintegerNoMaximum results to return (default 1000)
cursorstringNoPagination cursor from previous response's meta.cursor
fieldsarrayNoField paths to include in results

Searchable Fields

Field NameTypeDescription
account_idstringAd account ID
account_namestringAd account name
campaign_idstringCampaign ID
campaign_namestringCampaign name
adset_idstringAd set ID
adset_namestringAd set name
ad_idstringAd ID
ad_namestringAd name
clicksintegerNumber of clicks
impressionsintegerNumber of impressions
reachintegerNumber of unique people reached
spendnumberAmount spent
cpcnumberCost per click
cpmnumberCost per 1000 impressions
ctrnumberClick-through rate
date_startstringStart date of the reporting period
date_stopstringEnd date of the reporting period
actionsarrayTotal number of actions taken
action_valuesarrayAction values taken on the ad
Response Schema
Field NameTypeDescription
dataarrayList of matching records
metaobjectPagination metadata
meta.has_morebooleanWhether additional pages are available
meta.cursorstring | nullCursor for next page of results
meta.took_msnumber | nullQuery execution time in milliseconds
data[].account_idstringAd account ID
data[].account_namestringAd account name
data[].campaign_idstringCampaign ID
data[].campaign_namestringCampaign name
data[].adset_idstringAd set ID
data[].adset_namestringAd set name
data[].ad_idstringAd ID
data[].ad_namestringAd name
data[].clicksintegerNumber of clicks
data[].impressionsintegerNumber of impressions
data[].reachintegerNumber of unique people reached
data[].spendnumberAmount spent
data[].cpcnumberCost per click
data[].cpmnumberCost per 1000 impressions
data[].ctrnumberClick-through rate
data[].date_startstringStart date of the reporting period
data[].date_stopstringEnd date of the reporting period
data[].actionsarrayTotal number of actions taken
data[].action_valuesarrayAction values taken on the ad

Ad Account

Ad Account Get

Returns information about the specified ad account including balance and currency

Python SDK

await facebook_marketing.ad_account.get(
account_id="<str>"
)

API

curl --location 'https://api.airbyte.ai/api/v1/integrations/connectors/{your_connector_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "ad_account",
"action": "get",
"params": {
"account_id": "<str>"
}
}'

Parameters

Parameter NameTypeRequiredDescription
account_idstringYesThe Facebook Ad Account ID (without act_ prefix)
fieldsstringNoComma-separated list of fields to return
Response Schema

Records

Field NameTypeDescription
idstring
account_idstring | null
namestring | null
account_statusinteger | null
agenumber | null
amount_spentstring | null
balancestring | null
businessobject | any
business_citystring | null
business_country_codestring | null
business_namestring | null
business_statestring | null
business_streetstring | null
business_street2string | null
business_zipstring | null
created_timestring | null
currencystring | null
disable_reasoninteger | null
end_advertiserstring | null
end_advertiser_namestring | null
funding_sourcestring | null
funding_source_detailsobject | null
has_migrated_permissionsboolean | null
is_personalinteger | null
is_prepay_accountboolean | null
is_tax_id_requiredboolean | null
min_campaign_group_spend_capstring | null
min_daily_budgetinteger | null
ownerstring | null
spend_capstring | null
timezone_idinteger | null
timezone_namestring | null
timezone_offset_hours_utcnumber | null

Search and filter ad account records powered by Airbyte's data sync. This often provides additional fields and operators beyond what the API natively supports, making it easier to narrow down results before performing further operations. Only available in hosted mode.

Python SDK

await facebook_marketing.ad_account.search(
query={"filter": {"eq": {"id": "<str>"}}}
)

API

curl --location 'https://api.airbyte.ai/api/v1/integrations/connectors/{your_connector_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "ad_account",
"action": "search",
"params": {
"query": {"filter": {"eq": {"id": "<str>"}}}
}
}'

Parameters

Parameter NameTypeRequiredDescription
queryobjectYesFilter and sort conditions. Supports operators: eq, neq, gt, gte, lt, lte, in, like, fuzzy, keyword, not, and, or
query.filterobjectNoFilter conditions
query.sortarrayNoSort conditions
limitintegerNoMaximum results to return (default 1000)
cursorstringNoPagination cursor from previous response's meta.cursor
fieldsarrayNoField paths to include in results

Searchable Fields

Field NameTypeDescription
idstringAd account ID
account_idstringAd account ID (numeric)
namestringAd account name
balancestringCurrent balance of the ad account
currencystringCurrency used by the ad account
account_statusintegerAccount status
amount_spentstringTotal amount spent
business_namestringBusiness name
created_timestringAccount creation time
spend_capstringSpend cap
timezone_namestringTimezone name
Response Schema
Field NameTypeDescription
dataarrayList of matching records
metaobjectPagination metadata
meta.has_morebooleanWhether additional pages are available
meta.cursorstring | nullCursor for next page of results
meta.took_msnumber | nullQuery execution time in milliseconds
data[].idstringAd account ID
data[].account_idstringAd account ID (numeric)
data[].namestringAd account name
data[].balancestringCurrent balance of the ad account
data[].currencystringCurrency used by the ad account
data[].account_statusintegerAccount status
data[].amount_spentstringTotal amount spent
data[].business_namestringBusiness name
data[].created_timestringAccount creation time
data[].spend_capstringSpend cap
data[].timezone_namestringTimezone name

Custom Conversions

Custom Conversions List

Returns a list of custom conversions for the specified ad account

Python SDK

await facebook_marketing.custom_conversions.list(
account_id="<str>"
)

API

curl --location 'https://api.airbyte.ai/api/v1/integrations/connectors/{your_connector_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "custom_conversions",
"action": "list",
"params": {
"account_id": "<str>"
}
}'

Parameters

Parameter NameTypeRequiredDescription
account_idstringYesThe Facebook Ad Account ID (without act_ prefix)
fieldsstringNoComma-separated list of fields to return
limitintegerNoMaximum number of results to return
afterstringNoCursor for pagination
Response Schema

Records

Field NameTypeDescription
idstring
namestring | null
account_idstring | null
businessstring | null
creation_timestring | null
custom_event_typestring | null
data_sourcesarray | null
data_sources[].idstring | null
data_sources[].source_typestring | null
data_sources[].namestring | null
default_conversion_valuenumber | null
descriptionstring | null
event_source_typestring | null
first_fired_timestring | null
is_archivedboolean | null
is_unavailableboolean | null
last_fired_timestring | null
offline_conversion_data_setstring | null
retention_daysnumber | null
rulestring | null

Meta

Field NameTypeDescription
afterstring | null

Search and filter custom conversions records powered by Airbyte's data sync. This often provides additional fields and operators beyond what the API natively supports, making it easier to narrow down results before performing further operations. Only available in hosted mode.

Python SDK

await facebook_marketing.custom_conversions.search(
query={"filter": {"eq": {"id": "<str>"}}}
)

API

curl --location 'https://api.airbyte.ai/api/v1/integrations/connectors/{your_connector_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "custom_conversions",
"action": "search",
"params": {
"query": {"filter": {"eq": {"id": "<str>"}}}
}
}'

Parameters

Parameter NameTypeRequiredDescription
queryobjectYesFilter and sort conditions. Supports operators: eq, neq, gt, gte, lt, lte, in, like, fuzzy, keyword, not, and, or
query.filterobjectNoFilter conditions
query.sortarrayNoSort conditions
limitintegerNoMaximum results to return (default 1000)
cursorstringNoPagination cursor from previous response's meta.cursor
fieldsarrayNoField paths to include in results

Searchable Fields

Field NameTypeDescription
idstringCustom Conversion ID
namestringCustom Conversion name
account_idstringAd account ID
descriptionstringDescription
custom_event_typestringCustom event type
creation_timestringCreation time
first_fired_timestringFirst fired time
last_fired_timestringLast fired time
is_archivedbooleanWhether the conversion is archived
Response Schema
Field NameTypeDescription
dataarrayList of matching records
metaobjectPagination metadata
meta.has_morebooleanWhether additional pages are available
meta.cursorstring | nullCursor for next page of results
meta.took_msnumber | nullQuery execution time in milliseconds
data[].idstringCustom Conversion ID
data[].namestringCustom Conversion name
data[].account_idstringAd account ID
data[].descriptionstringDescription
data[].custom_event_typestringCustom event type
data[].creation_timestringCreation time
data[].first_fired_timestringFirst fired time
data[].last_fired_timestringLast fired time
data[].is_archivedbooleanWhether the conversion is archived

Images

Images List

Returns a list of ad images for the specified ad account

Python SDK

await facebook_marketing.images.list(
account_id="<str>"
)

API

curl --location 'https://api.airbyte.ai/api/v1/integrations/connectors/{your_connector_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "images",
"action": "list",
"params": {
"account_id": "<str>"
}
}'

Parameters

Parameter NameTypeRequiredDescription
account_idstringYesThe Facebook Ad Account ID (without act_ prefix)
fieldsstringNoComma-separated list of fields to return
limitintegerNoMaximum number of results to return
afterstringNoCursor for pagination
Response Schema

Records

Field NameTypeDescription
idstring | null
namestring | null
account_idstring | null
created_timestring | null
creativesarray | null
filenamestring | null
hashstring | null
heightinteger | null
is_associated_creatives_in_adgroupsboolean | null
original_heightinteger | null
original_widthinteger | null
permalink_urlstring | null
statusstring | null
updated_timestring | null
urlstring | null
url_128string | null
widthinteger | null

Meta

Field NameTypeDescription
afterstring | null

Search and filter images records powered by Airbyte's data sync. This often provides additional fields and operators beyond what the API natively supports, making it easier to narrow down results before performing further operations. Only available in hosted mode.

Python SDK

await facebook_marketing.images.search(
query={"filter": {"eq": {"id": "<str>"}}}
)

API

curl --location 'https://api.airbyte.ai/api/v1/integrations/connectors/{your_connector_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "images",
"action": "search",
"params": {
"query": {"filter": {"eq": {"id": "<str>"}}}
}
}'

Parameters

Parameter NameTypeRequiredDescription
queryobjectYesFilter and sort conditions. Supports operators: eq, neq, gt, gte, lt, lte, in, like, fuzzy, keyword, not, and, or
query.filterobjectNoFilter conditions
query.sortarrayNoSort conditions
limitintegerNoMaximum results to return (default 1000)
cursorstringNoPagination cursor from previous response's meta.cursor
fieldsarrayNoField paths to include in results

Searchable Fields

Field NameTypeDescription
idstringImage ID
namestringImage name
account_idstringAd account ID
hashstringImage hash
urlstringImage URL
permalink_urlstringPermalink URL
widthintegerImage width
heightintegerImage height
statusstringImage status
created_timestringCreation time
updated_timestringLast update time
Response Schema
Field NameTypeDescription
dataarrayList of matching records
metaobjectPagination metadata
meta.has_morebooleanWhether additional pages are available
meta.cursorstring | nullCursor for next page of results
meta.took_msnumber | nullQuery execution time in milliseconds
data[].idstringImage ID
data[].namestringImage name
data[].account_idstringAd account ID
data[].hashstringImage hash
data[].urlstringImage URL
data[].permalink_urlstringPermalink URL
data[].widthintegerImage width
data[].heightintegerImage height
data[].statusstringImage status
data[].created_timestringCreation time
data[].updated_timestringLast update time

Videos

Videos List

Returns a list of ad videos for the specified ad account

Python SDK

await facebook_marketing.videos.list(
account_id="<str>"
)

API

curl --location 'https://api.airbyte.ai/api/v1/integrations/connectors/{your_connector_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "videos",
"action": "list",
"params": {
"account_id": "<str>"
}
}'

Parameters

Parameter NameTypeRequiredDescription
account_idstringYesThe Facebook Ad Account ID (without act_ prefix)
fieldsstringNoComma-separated list of fields to return
limitintegerNoMaximum number of results to return
afterstringNoCursor for pagination
Response Schema

Records

Field NameTypeDescription
idstring
titlestring | null
account_idstring | null
ad_breaksarray | null
backdated_timestring | null
backdated_time_granularitystring | null
content_categorystring | null
content_tagsarray | null
created_timestring | null
custom_labelsarray | null
descriptionstring | null
embed_htmlstring | null
embeddableboolean | null
formatarray | null
format[].filterstring | null
format[].embed_htmlstring | null
format[].widthinteger | null
format[].heightinteger | null
format[].picturestring | null
iconstring | null
is_crosspost_videoboolean | null
is_crossposting_eligibleboolean | null
is_episodeboolean | null
is_instagram_eligibleboolean | null
lengthnumber | null
live_statusstring | null
permalink_urlstring | null
post_viewsinteger | null
premiere_living_room_statusboolean | null
publishedboolean | null
scheduled_publish_timestring | null
sourcestring | null
universal_video_idstring | null
updated_timestring | null
viewsinteger | null

Meta

Field NameTypeDescription
afterstring | null

Search and filter videos records powered by Airbyte's data sync. This often provides additional fields and operators beyond what the API natively supports, making it easier to narrow down results before performing further operations. Only available in hosted mode.

Python SDK

await facebook_marketing.videos.search(
query={"filter": {"eq": {"id": "<str>"}}}
)

API

curl --location 'https://api.airbyte.ai/api/v1/integrations/connectors/{your_connector_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "videos",
"action": "search",
"params": {
"query": {"filter": {"eq": {"id": "<str>"}}}
}
}'

Parameters

Parameter NameTypeRequiredDescription
queryobjectYesFilter and sort conditions. Supports operators: eq, neq, gt, gte, lt, lte, in, like, fuzzy, keyword, not, and, or
query.filterobjectNoFilter conditions
query.sortarrayNoSort conditions
limitintegerNoMaximum results to return (default 1000)
cursorstringNoPagination cursor from previous response's meta.cursor
fieldsarrayNoField paths to include in results

Searchable Fields

Field NameTypeDescription
idstringVideo ID
titlestringVideo title
account_idstringAd account ID
descriptionstringVideo description
lengthnumberVideo length in seconds
sourcestringVideo source URL
permalink_urlstringPermalink URL
viewsintegerNumber of views
created_timestringCreation time
updated_timestringLast update time
Response Schema
Field NameTypeDescription
dataarrayList of matching records
metaobjectPagination metadata
meta.has_morebooleanWhether additional pages are available
meta.cursorstring | nullCursor for next page of results
meta.took_msnumber | nullQuery execution time in milliseconds
data[].idstringVideo ID
data[].titlestringVideo title
data[].account_idstringAd account ID
data[].descriptionstringVideo description
data[].lengthnumberVideo length in seconds
data[].sourcestringVideo source URL
data[].permalink_urlstringPermalink URL
data[].viewsintegerNumber of views
data[].created_timestringCreation time
data[].updated_timestringLast update time

Pixels

Pixels List

Returns a list of Facebook pixels for the specified ad account, including pixel configuration and event quality data

Python SDK

await facebook_marketing.pixels.list(
account_id="<str>"
)

API

curl --location 'https://api.airbyte.ai/api/v1/integrations/connectors/{your_connector_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "pixels",
"action": "list",
"params": {
"account_id": "<str>"
}
}'

Parameters

Parameter NameTypeRequiredDescription
account_idstringYesThe Facebook Ad Account ID (without act_ prefix)
fieldsstringNoComma-separated list of fields to return
limitintegerNoMaximum number of results to return
afterstringNoCursor for pagination
Response Schema

Records

Field NameTypeDescription
idstring
namestring | null
creation_timestring | null
creatorobject | null
data_use_settingstring | null
enable_automatic_matchingboolean | null
first_party_cookie_statusstring | null
is_created_by_appboolean | null
is_crmboolean | null
is_unavailableboolean | null
last_fired_timestring | null
owner_ad_accountobject | null
owner_businessobject | null

Meta

Field NameTypeDescription
afterstring | null

Pixels Get

Returns details about a single Facebook pixel by ID

Python SDK

await facebook_marketing.pixels.get(
pixel_id="<str>"
)

API

curl --location 'https://api.airbyte.ai/api/v1/integrations/connectors/{your_connector_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "pixels",
"action": "get",
"params": {
"pixel_id": "<str>"
}
}'

Parameters

Parameter NameTypeRequiredDescription
pixel_idstringYesThe Facebook pixel ID
fieldsstringNoComma-separated list of fields to return
Response Schema

Records

Field NameTypeDescription
idstring
namestring | null
creation_timestring | null
creatorobject | null
data_use_settingstring | null
enable_automatic_matchingboolean | null
first_party_cookie_statusstring | null
is_created_by_appboolean | null
is_crmboolean | null
is_unavailableboolean | null
last_fired_timestring | null
owner_ad_accountobject | null
owner_businessobject | null

Pixel Stats

Pixel Stats List

Returns event quality and stats data for a Facebook pixel, including event counts, match quality scores, and deduplication metrics

Python SDK

await facebook_marketing.pixel_stats.list(
pixel_id="<str>"
)

API

curl --location 'https://api.airbyte.ai/api/v1/integrations/connectors/{your_connector_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "pixel_stats",
"action": "list",
"params": {
"pixel_id": "<str>"
}
}'

Parameters

Parameter NameTypeRequiredDescription
pixel_idstringYesThe Facebook pixel ID
start_timestringNoStart time for stats period as Unix timestamp
end_timestringNoEnd time for stats period as Unix timestamp
aggregation"event" | "device" | "custom_data_field"NoAggregation level for stats
Response Schema

Records

Field NameTypeDescription
dataarray | null
eventstring | null
event_sourcestring | null
total_countinteger | null
total_matched_countinteger | null
total_deduped_countinteger | null
test_events_countinteger | null