Skip to content

Facebook — Business and ads ​

List granted permissions — facebook.list_permissions ​

Lists the permissions the connected Facebook user granted or declined to the app. Use to explain why another Facebook action failed with a permission error.

Side effectRiskNeeds approvalIdempotentScopes
NONElownoyes—

Input

FieldTypeRequiredDescription
limitintegernoMax items per page (1-100). Min 1. Max 100.
afterstringnoCursor for the next page, from paging.cursors.after of the previous call.

Extra fields: ignored.

Output

FieldTypeDescription
dataarray of object
data[].permissionstring
data[].statusstring
pagingobject
paging.cursorsobject

List businesses — facebook.list_businesses ​

Lists Business Manager accounts the connected user belongs to (id, name). Use the id with list_owned_pages or list_owned_ad_accounts.

Side effectRiskNeeds approvalIdempotentScopes
NONElownoyesbusiness_management

Input

FieldTypeRequiredDescription
fieldsstringnoComma-separated Graph fields to return, e.g. "id,name"; empty uses the defaults.
limitintegernoMax items per page (1-100). Min 1. Max 100.
afterstringnoCursor for the next page, from paging.cursors.after of the previous call.

Extra fields: ignored.

Output

FieldTypeDescription
dataarray of object
data[].idstring
data[].namestring
pagingobject
paging.cursorsobject

List business-owned Pages — facebook.list_owned_pages ​

Lists Pages owned by a Business Manager account. Requires the business id from list_businesses. Supports paging.

Side effectRiskNeeds approvalIdempotentScopes
NONElownoyesbusiness_management

Input

FieldTypeRequiredDescription
business_idstringyesBusiness Manager id. From facebook.list_businesses.
fieldsstringnoComma-separated Graph fields to return, e.g. "id,name"; empty uses the defaults.
limitintegernoMax items per page (1-100). Min 1. Max 100.
afterstringnoCursor for the next page, from paging.cursors.after of the previous call.

Extra fields: ignored.

Output

FieldTypeDescription
dataarray of object
data[].idstring
data[].namestring
data[].categorystring
pagingobject
paging.cursorsobject

List business client Pages — facebook.list_client_pages ​

Lists Pages that clients shared with a Business Manager account. Requires the business id from list_businesses. Supports paging.

Side effectRiskNeeds approvalIdempotentScopes
NONElownoyesbusiness_management

Input

FieldTypeRequiredDescription
business_idstringyesBusiness Manager id. From facebook.list_businesses.
fieldsstringnoComma-separated Graph fields to return, e.g. "id,name"; empty uses the defaults.
limitintegernoMax items per page (1-100). Min 1. Max 100.
afterstringnoCursor for the next page, from paging.cursors.after of the previous call.

Extra fields: ignored.

Output

FieldTypeDescription
dataarray of object
data[].idstring
data[].namestring
data[].categorystring
pagingobject
paging.cursorsobject

List ad accounts — facebook.list_ad_accounts ​

Lists ad accounts the connected user can access (id like act_123, name, status, currency). Use the id as parent for list_ads or get_ad_insights.

Side effectRiskNeeds approvalIdempotentScopes
NONElownoyesads_read

Input

FieldTypeRequiredDescription
fieldsstringnoComma-separated Graph fields to return, e.g. "id,name"; empty uses the defaults.
limitintegernoMax items per page (1-100). Min 1. Max 100.
afterstringnoCursor for the next page, from paging.cursors.after of the previous call.

Extra fields: ignored.

Output

FieldTypeDescription
dataarray of object
data[].idstring
data[].namestring
data[].account_statusinteger
data[].currencystring
pagingobject
paging.cursorsobject

List business-owned ad accounts — facebook.list_owned_ad_accounts ​

Lists ad accounts owned by a Business Manager account. Requires the business id from list_businesses. Supports paging.

Side effectRiskNeeds approvalIdempotentScopes
NONElownoyesads_read, business_management

Input

FieldTypeRequiredDescription
business_idstringyesBusiness Manager id. From facebook.list_businesses.
fieldsstringnoComma-separated Graph fields to return, e.g. "id,name"; empty uses the defaults.
limitintegernoMax items per page (1-100). Min 1. Max 100.
afterstringnoCursor for the next page, from paging.cursors.after of the previous call.

Extra fields: ignored.

Output

FieldTypeDescription
dataarray of object
data[].idstring
data[].namestring
data[].account_statusinteger
data[].currencystring
pagingobject
paging.cursorsobject

List ads — facebook.list_ads ​

Lists ads under an ad account (act_...), campaign or ad set. effective_status filters, e.g. ["ACTIVE","PAUSED"]. Supports paging.

Side effectRiskNeeds approvalIdempotentScopes
NONElownoyesads_read

Input

FieldTypeRequiredDescription
parent_idstringyesAd account id (act_<id>), campaign id or ad set id. From facebook.list_ad_accounts.
fieldsstringnoComma-separated Graph fields to return, e.g. "id,name"; empty uses the defaults.
effective_statusstringnoJSON array string of ad statuses to keep, e.g. ["ACTIVE","PAUSED"].
limitintegernoMax items per page (1-100). Min 1. Max 100.
afterstringnoCursor for the next page, from paging.cursors.after of the previous call.

Extra fields: ignored.

Output

FieldTypeDescription
dataarray of object
data[].idstring
data[].namestring
data[].statusstring
data[].effective_statusstring
pagingobject
paging.cursorsobject

Get ad insights — facebook.get_ad_insights ​

Reads ad performance for an ad account, campaign, ad set or ad. Choose fields (impressions,spend,clicks), date_preset, time_range, level, breakdowns. time_range is a JSON string like {"since":"YYYY-MM-DD","until":"YYYY-MM-DD"}.

Side effectRiskNeeds approvalIdempotentScopes
NONElownoyesads_read

Input

FieldTypeRequiredDescription
object_idstringyesAd account (act_<id>), campaign, ad set or ad id. From facebook.list_ad_accounts.
fieldsstringnoComma-separated insight fields, e.g. "impressions,spend,clicks".
date_presetstringnoRelative date range; default last_30d. Ignored when time_range is set. One of: today, yesterday, this_month, last_month, this_quarter, maximum, data_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.
time_rangestringnoJSON string like
levelstringnoLevel to aggregate results at; defaults to the level of object_id. One of: ad, adset, campaign, account.
breakdownsstringnoComma-separated breakdowns, e.g. "age,gender" or "publisher_platform".
limitintegernoMax items per page (1-100). Min 1. Max 100.
afterstringnoCursor for the next page, from paging.cursors.after of the previous call.

Extra fields: ignored.

Output

FieldTypeDescription
dataarray of object
data[].impressionsstring
data[].clicksstring
data[].spendstring
data[].date_startstring
data[].date_stopstring
pagingobject
paging.cursorsobject

Search targeting locations — facebook.search_geographic_targeting_locations ​

Searches geographic locations usable in ad targeting by keyword q. location_types limits to country, region, city, etc. Returns keys for targeting specs. location_types is a JSON array string like ["city","region"].

Side effectRiskNeeds approvalIdempotentScopes
NONElownoyesads_read

Input

FieldTypeRequiredDescription
qstringyesLocation name to search, e.g. "Hanoi".
location_typesstringnoJSON array string of types, e.g. ["city","region"]; country, region, city, zip, geo_market, electoral_district.
limitintegernoMax items per page (1-100). Min 1. Max 100.
afterstringnoCursor for the next page, from paging.cursors.after of the previous call.

Extra fields: ignored.

Output

FieldTypeDescription
dataarray of object
data[].keystring
data[].namestring
data[].typestring
data[].country_codestring
pagingobject
paging.cursorsobject

Get current user — facebook.get_current_user ​

Reads the connected Facebook user profile (id, name). Use to confirm which account is connected. Pass fields to request more.

Side effectRiskNeeds approvalIdempotentScopes
NONElownoyes—

Input

FieldTypeRequiredDescription
fieldsstringnoComma-separated Graph fields to return, e.g. "id,name"; empty uses the defaults.

Extra fields: ignored.

Output

FieldTypeDescription
idstring
namestring

Get Graph object — facebook.get_graph_object ​

Reads any Graph node by id (digits, 123_456, me or act_<id>). Pass fields to choose properties and page_id to use that Page's token.

Side effectRiskNeeds approvalIdempotentScopes
NONElownoyes—

Input

FieldTypeRequiredDescription
node_idstringyesGraph node id: digits, "123_456", "me" or "act_<id>".
fieldsstringnoComma-separated Graph fields to return, e.g. "id,name"; empty uses the defaults.
page_idstringnoPage whose token is used to read; empty uses the user token. From facebook.list_managed_pages.

Extra fields: ignored.

Output

FieldTypeDescription
idstring

Get Graph objects — facebook.get_graph_objects ​

Reads 1-50 Graph nodes by id in one call. Returns an objects map keyed by id. Pass page_id to use that Page's token.

Side effectRiskNeeds approvalIdempotentScopes
NONElownoyes—

Input

FieldTypeRequiredDescription
idsarray of stringyesGraph node ids (1-50), e.g. ["123", "123_456"].
fieldsstringnoComma-separated Graph fields to return, e.g. "id,name"; empty uses the defaults.
page_idstringnoPage whose token is used to read; empty uses the user token. From facebook.list_managed_pages.

Extra fields: ignored.

Output

FieldTypeDescription
objectsobject