GroundsocialDocs

API · Facebook

GET /facebook/ads/company

Every ad of one advertiser (Facebook Page) in the Meta Ad Library, 30 a page, filterable.

RequestGET /v1/facebook/ads/company
Operation idfacebook.ads.company
Cost2 credits, refunded if the call fails
AuthAPI key: Authorization: Bearer <key> or x-api-key.

Every ad of one advertiser (Facebook Page) in the Meta Ad Library, 30 a page, filterable.

Query parameters

NameTypeRequiredDescription
pagestringnoPage id, Page URL or vanity name. Example: 15087023444.
company_namestringnoAdvertiser name, when you don’t have the Page. Example: Nike.
countrystringnoISO 3166-1 alpha-2 country the ads reached (US, GB, DE…), or ALL (default).
status"active" | "inactive" | "all"noactive (default), inactive, or all. One of active, inactive, all.
media_type"all" | "image" | "video" | "meme" | "image_and_meme" | "none"noall (default), image, video, meme (image with text), image_and_meme, none (text only). One of all, image, video, meme, image_and_meme, none.
ad_type"all" | "political_and_issue_ads" | "housing" | "employment" | "credit" | "financial"noall (default), or one of Meta’s special ad categories: political_and_issue_ads, housing, employment, credit, financial. One of all, political_and_issue_ads, housing, employment, credit, financial.
sort_by"total_impressions" | "relevancy_monthly_grouped" | "total_active_time"nototal_impressions (default, high to low), relevancy_monthly_grouped (most recent), or total_active_time (longest-running first, within each page of 30). One of total_impressions, relevancy_monthly_grouped, total_active_time.
languagestringnoComma-separated ISO 639-1 languages of the ad text (en,es).
publisher_platformsstringnoComma-separated placements: facebook, instagram, audience_network, messenger, whatsapp, threads, oculus.
start_datestringnoYYYY-MM-DD: only ads delivered on or after this day.
end_datestringnoYYYY-MM-DD: only ads delivered on or before this day.
afterstringnoThe previous page’s page_info.end_cursor; keep the other filters the same.

Responses

StatusMeaningSchema
200A page of the advertiser’s ads, with the next cursor.FacebookAdsPage
400Invalid input. Nothing was charged.Error
401Missing or invalid API key.Error
402Not enough credits, a spend cap was reached, or payment is required.Error
403The target is private, or the account is suspended.Error
404The ad, Page or advertiser is not in the Meta Ad Library.Error
429Too many requests. Wait for Retry-After seconds.Error
503Facebook is temporarily unavailable. Retryable; nothing was charged.Error

FacebookAdsPage fields

FieldTypeDescription
adsFacebookAd[]
countinteger | nullMeta’s estimate of how many ads match, on the first page (null on later pages). Meta caps it at 50,001.
page_infoobject

Errors use one shape everywhere; see Errors for every code and what to do.