Facebook Scraper

Get Facebook Ad Library Company Ads (post)

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.

1 creditNo API key needed

Endpoint

Parameters

NameTypeRequiredNote
trimboolean · optionalbooleanoptional

Set to true for a trimmed down version of the response

limitnumber · optionalnumberoptional

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 · optionalstringoptional

Cursor to paginate through results

pageIdstring · optionalstringoptional

The companies ad library page id. You can get this with my Search For Companies Endpoint. Can either use this or companyName

statusstring · optionalstringoptional

Status of the ad. Defaults to ACTIVE.

One of: ALL, ACTIVE, INACTIVE

countrystring · optionalstringoptional

This can only be one country. It has to be the 2 letter code for the country. It defaults to ALL.

sort_bystring · optionalstringoptional

Sort by impressions (high to low), or Most Recent (relevancy_monthly_grouped). Defaults to impressions.

One of: total_impressions, relevancy_monthly_grouped

end_datestring · optionalstringoptional

End date to search for. Format: YYYY-MM-DD

languagestring · optionalstringoptional

Language to filter ads on. Needs to be 2 letter language code, ie EN, ES, FR, etc

media_typestring · optionalstringoptional

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: ALL, IMAGE, VIDEO, MEME, IMAGE_AND_MEME, NONE

start_datestring · optionalstringoptional

Start date to search for. Format: YYYY-MM-DD

companyNamestring · optionalstringoptional

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
}

Get started

How to use this tool

  1. Connect your AI

    Add Connie to ChatGPT, Claude or Slack once, and this tool comes with it. There’s no API key or account to set up.

  2. Ask for the outcome

    Describe what you need in plain words. Your AI runs this tool when the job calls for it, along with any others it needs.

  3. Make it a workflow

    Add it as a step in a workflow that runs the same way every time, on a schedule or when something happens.

  4. Stay in control

    Choose whether it runs on its own or asks first. When it asks, you see an Allow or Deny card before any credits are spent.