Facebook Scraper
Get Facebook Ad Library Company Ads
Fetches all ads currently running for a specific company from the Meta Ad Library. Each ad includes ad_archive_id, page_name, is_active, publisher_platform, and a snapshot with body, images, videos, and display_format. Supports filtering by country, media_type, date range, and language with cursor-based pagination. Both GET and POST are supported. If the cursor becomes too large after extensive pagination, use POST and send the same parameters in the JSON body.
Endpoint
Parameters
| Name | Type | Required | Note |
|---|---|---|---|
| trimboolean · optional | boolean | optional | Set to true for a trimmed down version of the response |
| limitnumber · optional | number | optional | Maximum number of results to return from this request. Leave empty for everything this request returns. This trims the response — it does not fetch more; use the returned cursor for the next batch. The price is the same either way. |
| cursorstring · optional | string | optional | Cursor to paginate through results |
| pageIdstring · optional | string | optional | The companies ad library page id. You can get this with my Search For Companies Endpoint. Can either use this or companyName |
| statusstring · optional | string | optional | Status of the ad. Defaults to ACTIVE. One of: |
| countrystring · optional | string | optional | This can only be one country. It has to be the 2 letter code for the country. It defaults to ALL. |
| sort_bystring · optional | string | optional | Sort by impressions (high to low), or Most Recent (relevancy_monthly_grouped). Defaults to impressions. One of: |
| end_datestring · optional | string | optional | End date to search for. Format: YYYY-MM-DD |
| languagestring · optional | string | optional | Language to filter ads on. Needs to be 2 letter language code, ie EN, ES, FR, etc |
| media_typestring · optional | string | optional | Media type of the ad. Defaults to ALL. Meme refers to ads with image and text. Not sure why they call it meme. One of: |
| start_datestring · optional | string | optional | Start date to search for. Format: YYYY-MM-DD |
| companyNamestring · optional | string | optional | The name of the company. Can either use this or pageId |
Response schema
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"cursor": {
"type": "string"
},
"results": {
"type": "array"
},
"limitApplied": {
"type": "boolean",
"description": "True when a Limit trimmed the results; there were more in this response."
}
},
"additionalProperties": true
}