Facebook Ads Library Scraper avatar

Facebook Ads Library Scraper

Try for free

2 hours trial then $15.00/month - No credit card required now

Go to Store
Facebook Ads Library Scraper

Facebook Ads Library Scraper

memo23/facebook-ads-library-scraper-cheerio
Try for free

2 hours trial then $15.00/month - No credit card required now

Stealthily decode competitors' Facebook ad strategies in real-time—scrape active campaigns, creatives, and audience targeting data with residential proxies. Gain actionable insights, track trends, and optimize your ads using their winning tactics, undetected.

You can access the Facebook Ads Library Scraper programmatically from your own applications by using the Apify API. You can choose the language preference from below. To use the Apify API, you’ll need an Apify account and your API token, found in Integrations settings in Apify Console.

1{
2  "openapi": "3.0.1",
3  "info": {
4    "version": "0.0",
5    "x-build-id": "cY7kW0AgAZI2QIn5m"
6  },
7  "servers": [
8    {
9      "url": "https://api.apify.com/v2"
10    }
11  ],
12  "paths": {
13    "/acts/memo23~facebook-ads-library-scraper-cheerio/run-sync-get-dataset-items": {
14      "post": {
15        "operationId": "run-sync-get-dataset-items-memo23-facebook-ads-library-scraper-cheerio",
16        "x-openai-isConsequential": false,
17        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
18        "tags": [
19          "Run Actor"
20        ],
21        "requestBody": {
22          "required": true,
23          "content": {
24            "application/json": {
25              "schema": {
26                "$ref": "#/components/schemas/inputSchema"
27              }
28            }
29          }
30        },
31        "parameters": [
32          {
33            "name": "token",
34            "in": "query",
35            "required": true,
36            "schema": {
37              "type": "string"
38            },
39            "description": "Enter your Apify token here"
40          }
41        ],
42        "responses": {
43          "200": {
44            "description": "OK"
45          }
46        }
47      }
48    },
49    "/acts/memo23~facebook-ads-library-scraper-cheerio/runs": {
50      "post": {
51        "operationId": "runs-sync-memo23-facebook-ads-library-scraper-cheerio",
52        "x-openai-isConsequential": false,
53        "summary": "Executes an Actor and returns information about the initiated run in response.",
54        "tags": [
55          "Run Actor"
56        ],
57        "requestBody": {
58          "required": true,
59          "content": {
60            "application/json": {
61              "schema": {
62                "$ref": "#/components/schemas/inputSchema"
63              }
64            }
65          }
66        },
67        "parameters": [
68          {
69            "name": "token",
70            "in": "query",
71            "required": true,
72            "schema": {
73              "type": "string"
74            },
75            "description": "Enter your Apify token here"
76          }
77        ],
78        "responses": {
79          "200": {
80            "description": "OK",
81            "content": {
82              "application/json": {
83                "schema": {
84                  "$ref": "#/components/schemas/runsResponseSchema"
85                }
86              }
87            }
88          }
89        }
90      }
91    },
92    "/acts/memo23~facebook-ads-library-scraper-cheerio/run-sync": {
93      "post": {
94        "operationId": "run-sync-memo23-facebook-ads-library-scraper-cheerio",
95        "x-openai-isConsequential": false,
96        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
97        "tags": [
98          "Run Actor"
99        ],
100        "requestBody": {
101          "required": true,
102          "content": {
103            "application/json": {
104              "schema": {
105                "$ref": "#/components/schemas/inputSchema"
106              }
107            }
108          }
109        },
110        "parameters": [
111          {
112            "name": "token",
113            "in": "query",
114            "required": true,
115            "schema": {
116              "type": "string"
117            },
118            "description": "Enter your Apify token here"
119          }
120        ],
121        "responses": {
122          "200": {
123            "description": "OK"
124          }
125        }
126      }
127    }
128  },
129  "components": {
130    "schemas": {
131      "inputSchema": {
132        "type": "object",
133        "required": [
134          "startUrls"
135        ],
136        "properties": {
137          "startUrls": {
138            "title": "Start URLs",
139            "type": "array",
140            "description": "URLs to start with. The actor currently supports URLs such as `'https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=GB&is_targeted_country=false&media_type=video&q=%22free%20shipping%22&search_type=keyword_exact_phrase&start_date[min]&start_date[max]=2025-02-15'`",
141            "items": {
142              "type": "string"
143            }
144          },
145          "maxItems": {
146            "title": "Maximum items per crawl",
147            "type": "integer",
148            "description": "Maximum number of items that will be scraped per crawl.",
149            "default": 100
150          },
151          "minDelay": {
152            "title": "Min delay for API call",
153            "type": "integer",
154            "description": "Minimum delay to wait before calling the new items from API.",
155            "default": 5
156          },
157          "maxDelay": {
158            "title": "Max delay for API call",
159            "type": "integer",
160            "description": "Maximum delay to wait before calling the new items from API",
161            "default": 10
162          },
163          "maxConcurrency": {
164            "title": "Max Concurrency",
165            "type": "integer",
166            "description": "Maximum number of pages that can be processed at the same time.",
167            "default": 10
168          },
169          "minConcurrency": {
170            "title": "Min Concurrency",
171            "type": "integer",
172            "description": "Minimum number of pages that will be processed at the same time.",
173            "default": 1
174          },
175          "maxRequestRetries": {
176            "title": "Max Request Retries",
177            "type": "integer",
178            "description": "Number of times the crawler will retry a failed request before giving up.",
179            "default": 100
180          },
181          "proxy": {
182            "title": "Proxy configuration",
183            "type": "object",
184            "description": "Specifies proxy servers that will be used by the scraper in order to hide its origin.<br><br>For details, see <a href='https://apify.com/apify/web-scraper#proxy-configuration' target='_blank' rel='noopener'>Proxy configuration</a> in README.",
185            "default": {
186              "useApifyProxy": true,
187              "apifyProxyGroups": [
188                "RESIDENTIAL"
189              ]
190            }
191          }
192        }
193      },
194      "runsResponseSchema": {
195        "type": "object",
196        "properties": {
197          "data": {
198            "type": "object",
199            "properties": {
200              "id": {
201                "type": "string"
202              },
203              "actId": {
204                "type": "string"
205              },
206              "userId": {
207                "type": "string"
208              },
209              "startedAt": {
210                "type": "string",
211                "format": "date-time",
212                "example": "2025-01-08T00:00:00.000Z"
213              },
214              "finishedAt": {
215                "type": "string",
216                "format": "date-time",
217                "example": "2025-01-08T00:00:00.000Z"
218              },
219              "status": {
220                "type": "string",
221                "example": "READY"
222              },
223              "meta": {
224                "type": "object",
225                "properties": {
226                  "origin": {
227                    "type": "string",
228                    "example": "API"
229                  },
230                  "userAgent": {
231                    "type": "string"
232                  }
233                }
234              },
235              "stats": {
236                "type": "object",
237                "properties": {
238                  "inputBodyLen": {
239                    "type": "integer",
240                    "example": 2000
241                  },
242                  "rebootCount": {
243                    "type": "integer",
244                    "example": 0
245                  },
246                  "restartCount": {
247                    "type": "integer",
248                    "example": 0
249                  },
250                  "resurrectCount": {
251                    "type": "integer",
252                    "example": 0
253                  },
254                  "computeUnits": {
255                    "type": "integer",
256                    "example": 0
257                  }
258                }
259              },
260              "options": {
261                "type": "object",
262                "properties": {
263                  "build": {
264                    "type": "string",
265                    "example": "latest"
266                  },
267                  "timeoutSecs": {
268                    "type": "integer",
269                    "example": 300
270                  },
271                  "memoryMbytes": {
272                    "type": "integer",
273                    "example": 1024
274                  },
275                  "diskMbytes": {
276                    "type": "integer",
277                    "example": 2048
278                  }
279                }
280              },
281              "buildId": {
282                "type": "string"
283              },
284              "defaultKeyValueStoreId": {
285                "type": "string"
286              },
287              "defaultDatasetId": {
288                "type": "string"
289              },
290              "defaultRequestQueueId": {
291                "type": "string"
292              },
293              "buildNumber": {
294                "type": "string",
295                "example": "1.0.0"
296              },
297              "containerUrl": {
298                "type": "string"
299              },
300              "usage": {
301                "type": "object",
302                "properties": {
303                  "ACTOR_COMPUTE_UNITS": {
304                    "type": "integer",
305                    "example": 0
306                  },
307                  "DATASET_READS": {
308                    "type": "integer",
309                    "example": 0
310                  },
311                  "DATASET_WRITES": {
312                    "type": "integer",
313                    "example": 0
314                  },
315                  "KEY_VALUE_STORE_READS": {
316                    "type": "integer",
317                    "example": 0
318                  },
319                  "KEY_VALUE_STORE_WRITES": {
320                    "type": "integer",
321                    "example": 1
322                  },
323                  "KEY_VALUE_STORE_LISTS": {
324                    "type": "integer",
325                    "example": 0
326                  },
327                  "REQUEST_QUEUE_READS": {
328                    "type": "integer",
329                    "example": 0
330                  },
331                  "REQUEST_QUEUE_WRITES": {
332                    "type": "integer",
333                    "example": 0
334                  },
335                  "DATA_TRANSFER_INTERNAL_GBYTES": {
336                    "type": "integer",
337                    "example": 0
338                  },
339                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
340                    "type": "integer",
341                    "example": 0
342                  },
343                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
344                    "type": "integer",
345                    "example": 0
346                  },
347                  "PROXY_SERPS": {
348                    "type": "integer",
349                    "example": 0
350                  }
351                }
352              },
353              "usageTotalUsd": {
354                "type": "number",
355                "example": 0.00005
356              },
357              "usageUsd": {
358                "type": "object",
359                "properties": {
360                  "ACTOR_COMPUTE_UNITS": {
361                    "type": "integer",
362                    "example": 0
363                  },
364                  "DATASET_READS": {
365                    "type": "integer",
366                    "example": 0
367                  },
368                  "DATASET_WRITES": {
369                    "type": "integer",
370                    "example": 0
371                  },
372                  "KEY_VALUE_STORE_READS": {
373                    "type": "integer",
374                    "example": 0
375                  },
376                  "KEY_VALUE_STORE_WRITES": {
377                    "type": "number",
378                    "example": 0.00005
379                  },
380                  "KEY_VALUE_STORE_LISTS": {
381                    "type": "integer",
382                    "example": 0
383                  },
384                  "REQUEST_QUEUE_READS": {
385                    "type": "integer",
386                    "example": 0
387                  },
388                  "REQUEST_QUEUE_WRITES": {
389                    "type": "integer",
390                    "example": 0
391                  },
392                  "DATA_TRANSFER_INTERNAL_GBYTES": {
393                    "type": "integer",
394                    "example": 0
395                  },
396                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
397                    "type": "integer",
398                    "example": 0
399                  },
400                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
401                    "type": "integer",
402                    "example": 0
403                  },
404                  "PROXY_SERPS": {
405                    "type": "integer",
406                    "example": 0
407                  }
408                }
409              }
410            }
411          }
412        }
413      }
414    }
415  }
416}

Facebook Ads Library Scraper OpenAPI definition

OpenAPI is a standard for designing and describing RESTful APIs, allowing developers to define API structure, endpoints, and data formats in a machine-readable way. It simplifies API development, integration, and documentation.

OpenAPI is effective when used with AI agents and GPTs by standardizing how these systems interact with various APIs, for reliable integrations and efficient communication.

By defining machine-readable API specifications, OpenAPI allows AI models like GPTs to understand and use varied data sources, improving accuracy. This accelerates development, reduces errors, and provides context-aware responses, making OpenAPI a core component for AI applications.

You can download the OpenAPI definitions for Facebook Ads Library Scraper from the options below:

If you’d like to learn more about how OpenAPI powers GPTs, read our blog post.

You can also check out our other API clients:

Developer
Maintained by Community

Actor Metrics

  • 2 monthly users

  • 0 No bookmarks yet

  • >99% runs succeeded

  • Created in Mar 2025

  • Modified 2 days ago