Skip to main content
POST
Submit Facebook Ad Library Company Ads task

Company Ads

Collect public ads associated with one page ID returned by Company Search.

Request Example

The final result can contain fewer records than results_limit when no additional page is available or duplicate ad IDs are removed.

Completed Task Response

Authorizations

Authorization
string
header
required

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

Body

application/json
page_id
string
required

Facebook Ad Library page ID returned by Company Search.

Pattern: ^[0-9]+$
results_limit
integer
default:100

Maximum unique ads to save across result pages.

Required range: 20 <= x <= 2000
country
string
default:ALL

ALL or one two-letter country code.

Pattern: ^(ALL|[A-Za-z]{2})$
status
enum<string>
default:ACTIVE

Ad delivery status.

Available options:
ALL,
ACTIVE,
INACTIVE
media_type
enum<string>
default:ALL

Creative media filter.

Available options:
ALL,
IMAGE,
VIDEO,
MEME,
IMAGE_AND_MEME,
NONE
language
string

Optional two-letter ad language code.

Pattern: ^[A-Za-z]{2}$
sort_by
enum<string>
default:total_impressions

Sort by estimated impressions or recent relevance.

Available options:
total_impressions,
relevancy_monthly_grouped
start_date
string<date>

Start date in YYYY-MM-DD format.

end_date
string<date>

End date in YYYY-MM-DD format. It cannot precede start_date.

callback_url
string<uri>

Optional URL that receives the task completion callback.

Response

Task submitted

code
integer
Example:

200

data
object