Skip to main content
Facebook AdsVersion: v3

Get entities

GET/ad-publishing/facebook/entity

Retrieve campaigns, ad sets, or ads for a location. entityType selects which, and each returns a { data } envelope whose item shape differs — the id key is campaignId, adSetId, or adId respectively, and the status fields differ too: campaigns carry both status and effectiveStatus, ad sets only effectiveStatus, and ads only status. next is returned only when the branch pages through Meta, so treat its absence as the end of the results rather than assuming a cursor. For CAMPAIGN, type=INTEGRATION queries Meta while type=AD_MANAGER reads campaigns this service published, filtered to PAUSED and PUBLISHED. ADSET requires campaignId; AD accepts adSetId for a single ad set or campaignId to page across the campaign.

Authorizations

Authorizationstringheaderrequired

Bearer authentication header of the form Bearer <token>, where <token> is your access token.

Scope:adPublishing.readonly
Auth methods:OAuthPrivate Integration
Token type:Sub-Account Token

Request​

Headers

Versionstringrequired

API Version

Available optionsv3
Example:v3

Query Parameters

locationIdstringrequired

Location identifier

Example:loc_abc123
typestringrequired

Integration source type

Available optionsAD_MANAGERINTEGRATION
Example:AD_MANAGER
nextstring

Pagination cursor

Example:cursor_abc
fetchAllstring

Fetch all entities

Example:true
campaignIdstring

Campaign identifier

Example:camp_123
adSetIdstring

Ad set identifier

Example:adset_123
entityTypestringrequired

Entity type to fetch

Available optionsCAMPAIGNADSETAD
Example:CAMPAIGN
searchIdstring

Search identifier

Example:search_123
selectedAdAccountIdstring

Selected ad account ID

Example:act_123456

Response

Campaigns, ad sets, or ads, matching the requested entityType

oneOf
dataobject[]required

Campaigns, shaped by the requested type

nextstring

Cursor for the next page, to be passed back as next. Present only on the INTEGRATION branch, and absent once the last page is reached.

Example:QVFIVFdHQTJVV1Vod3hVZAlRDLUpSM19HVjVScGNDMXozTU5RVkk1NWt6MnNISmZAtMVpMcVU5dVYwRU00R0xfVTh5c3AZD