
Facebook Ads Library Scraper ๐ฏ๐
2 hours trial then $18.99/month - No credit card required now

Facebook Ads Library Scraper ๐ฏ๐
2 hours trial then $18.99/month - No credit card required now
๐ Extract Facebook Ads Data ๐ from one or multiple Pages! Gather page details, reach estimates, impressions, ad IDs, and more ๐ . Download in JSON, CSV, or Excel formats ๐ฝ for seamless integration into apps, spreadsheets, and reports. Perfect for analysis and insights ๐๐ป.
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": "7PsZS075z78jA93qa"
6 },
7 "servers": [
8 {
9 "url": "https://api.apify.com/v2"
10 }
11 ],
12 "paths": {
13 "/acts/scrapestorm~facebook-ads-library-scraper/run-sync-get-dataset-items": {
14 "post": {
15 "operationId": "run-sync-get-dataset-items-scrapestorm-facebook-ads-library-scraper",
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/scrapestorm~facebook-ads-library-scraper/runs": {
50 "post": {
51 "operationId": "runs-sync-scrapestorm-facebook-ads-library-scraper",
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/scrapestorm~facebook-ads-library-scraper/run-sync": {
93 "post": {
94 "operationId": "run-sync-scrapestorm-facebook-ads-library-scraper",
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 "keyword"
135 ],
136 "properties": {
137 "keyword": {
138 "title": "The keyword you want to use to get ads metadata from ads library Facebook โ๏ธ๐",
139 "type": "string",
140 "description": "The keyword you want to use to get ads metadata from ads library Facebook โ๏ธ๐",
141 "default": "digital"
142 },
143 "country_name": {
144 "title": "Select country to scrape ads from ๐",
145 "enum": [
146 "United States ๐บ๐ธ",
147 "United Kingdom ๐ฌ๐ง",
148 "India ๐ฎ๐ณ",
149 "Aland Islands ๐ฆ๐ฝ",
150 "Albania ๐ฆ๐ฑ",
151 "Algeria ๐ฉ๐ฟ",
152 "American Samoa ๐ฆ๐ธ",
153 "Andorra ๐ฆ๐ฉ",
154 "Argentina ๐ฆ๐ท",
155 "Australia ๐ฆ๐บ",
156 "Austria ๐ฆ๐น",
157 "Belgium ๐ง๐ช",
158 "Brazil ๐ง๐ท",
159 "Canada ๐จ๐ฆ",
160 "Chile ๐จ๐ฑ",
161 "Colombia ๐จ๐ด",
162 "Ivory Coast ๐จ๐ฎ",
163 "Croatia ๐ญ๐ท",
164 "Czechia ๐จ๐ฟ",
165 "Denmark ๐ฉ๐ฐ",
166 "Egypt ๐ช๐ฌ",
167 "Finland ๐ซ๐ฎ",
168 "France ๐ซ๐ท",
169 "Germany ๐ฉ๐ช",
170 "Indonesia ๐ฎ๐ฉ",
171 "Italy ๐ฎ๐น",
172 "Luxembourg ๐ฑ๐บ",
173 "Malaysia ๐ฒ๐พ",
174 "Mexico ๐ฒ๐ฝ",
175 "Monaco ๐ฒ๐จ",
176 "Morocco ๐ฒ๐ฆ",
177 "Netherlands ๐ณ๐ฑ",
178 "Nigeria ๐ณ๐ฌ",
179 "Norway ๐ณ๐ด",
180 "Pakistan ๐ต๐ฐ",
181 "Palestine ๐ต๐ธ",
182 "Philippines ๐ต๐ญ",
183 "Poland ๐ต๐ฑ",
184 "Portugal ๐ต๐น",
185 "Qatar ๐ถ๐ฆ",
186 "Saudi Arabia ๐ธ๐ฆ",
187 "Senegal ๐ธ๐ณ",
188 "Singapore ๐ธ๐ฌ",
189 "South Africa ๐ฟ๐ฆ",
190 "Spain ๐ช๐ธ",
191 "Sweden ๐ธ๐ช",
192 "Switzerland ๐จ๐ญ",
193 "Thailand ๐น๐ญ",
194 "Turkey ๐น๐ท",
195 "Russia ๐ท๐บ",
196 "China ๐จ๐ณ",
197 "Ukraine ๐บ๐ฆ",
198 "United Arab Emirates ๐ฆ๐ช",
199 "Vietnam ๐ป๐ณ",
200 "ALL ๐"
201 ],
202 "type": "string",
203 "description": "Select country to scrape ads from ๐",
204 "default": "ALL ๐"
205 },
206 "active_status": {
207 "title": "Choose a Type of active_status ๐ข๐ดโช",
208 "enum": [
209 "active",
210 "inactive",
211 "all"
212 ],
213 "type": "string",
214 "description": "The type of the active_status ๐ข๐ดโช",
215 "default": "all"
216 },
217 "ad_type": {
218 "title": "Choose a Type of ads (credit_ads = financials services) ๐ฏ",
219 "enum": [
220 "all",
221 "political_and_issue_ads",
222 "employment_ads",
223 "housing_ads",
224 "credit_ads"
225 ],
226 "type": "string",
227 "description": "The type of the ads (credit_ads = financials services) ๐ฏ",
228 "default": "all"
229 },
230 "media_type": {
231 "title": "Choose a Type of media (none means no image or video) ๐ผ๏ธ๐น",
232 "enum": [
233 "all",
234 "image",
235 "meme",
236 "image_and_meme",
237 "video",
238 "none"
239 ],
240 "type": "string",
241 "description": "The type of the media (none means no image or video)",
242 "default": "all"
243 },
244 "publisher_platforms": {
245 "title": "Choose a social media plateforme ๐",
246 "enum": [
247 "all",
248 "instagram",
249 "facebook",
250 "audience_network",
251 "messenger"
252 ],
253 "type": "string",
254 "description": "Choose a social media plateforme ๐",
255 "default": "all"
256 },
257 "start_date_min": {
258 "title": "Date of start_date min search ๐
",
259 "type": "string",
260 "description": "Date of start_date min search ๐
",
261 "default": "2018-05-09"
262 },
263 "start_date_max": {
264 "title": "Date of start_date max search ๐
",
265 "type": "string",
266 "description": "Date of start_date max search ๐
",
267 "default": "2024-12-15"
268 },
269 "maxitems": {
270 "title": "Max ads you want to scrape ๐ข",
271 "type": "integer",
272 "description": "The maximum number of ads to fetch ๐ข",
273 "default": 30
274 }
275 }
276 },
277 "runsResponseSchema": {
278 "type": "object",
279 "properties": {
280 "data": {
281 "type": "object",
282 "properties": {
283 "id": {
284 "type": "string"
285 },
286 "actId": {
287 "type": "string"
288 },
289 "userId": {
290 "type": "string"
291 },
292 "startedAt": {
293 "type": "string",
294 "format": "date-time",
295 "example": "2025-01-08T00:00:00.000Z"
296 },
297 "finishedAt": {
298 "type": "string",
299 "format": "date-time",
300 "example": "2025-01-08T00:00:00.000Z"
301 },
302 "status": {
303 "type": "string",
304 "example": "READY"
305 },
306 "meta": {
307 "type": "object",
308 "properties": {
309 "origin": {
310 "type": "string",
311 "example": "API"
312 },
313 "userAgent": {
314 "type": "string"
315 }
316 }
317 },
318 "stats": {
319 "type": "object",
320 "properties": {
321 "inputBodyLen": {
322 "type": "integer",
323 "example": 2000
324 },
325 "rebootCount": {
326 "type": "integer",
327 "example": 0
328 },
329 "restartCount": {
330 "type": "integer",
331 "example": 0
332 },
333 "resurrectCount": {
334 "type": "integer",
335 "example": 0
336 },
337 "computeUnits": {
338 "type": "integer",
339 "example": 0
340 }
341 }
342 },
343 "options": {
344 "type": "object",
345 "properties": {
346 "build": {
347 "type": "string",
348 "example": "latest"
349 },
350 "timeoutSecs": {
351 "type": "integer",
352 "example": 300
353 },
354 "memoryMbytes": {
355 "type": "integer",
356 "example": 1024
357 },
358 "diskMbytes": {
359 "type": "integer",
360 "example": 2048
361 }
362 }
363 },
364 "buildId": {
365 "type": "string"
366 },
367 "defaultKeyValueStoreId": {
368 "type": "string"
369 },
370 "defaultDatasetId": {
371 "type": "string"
372 },
373 "defaultRequestQueueId": {
374 "type": "string"
375 },
376 "buildNumber": {
377 "type": "string",
378 "example": "1.0.0"
379 },
380 "containerUrl": {
381 "type": "string"
382 },
383 "usage": {
384 "type": "object",
385 "properties": {
386 "ACTOR_COMPUTE_UNITS": {
387 "type": "integer",
388 "example": 0
389 },
390 "DATASET_READS": {
391 "type": "integer",
392 "example": 0
393 },
394 "DATASET_WRITES": {
395 "type": "integer",
396 "example": 0
397 },
398 "KEY_VALUE_STORE_READS": {
399 "type": "integer",
400 "example": 0
401 },
402 "KEY_VALUE_STORE_WRITES": {
403 "type": "integer",
404 "example": 1
405 },
406 "KEY_VALUE_STORE_LISTS": {
407 "type": "integer",
408 "example": 0
409 },
410 "REQUEST_QUEUE_READS": {
411 "type": "integer",
412 "example": 0
413 },
414 "REQUEST_QUEUE_WRITES": {
415 "type": "integer",
416 "example": 0
417 },
418 "DATA_TRANSFER_INTERNAL_GBYTES": {
419 "type": "integer",
420 "example": 0
421 },
422 "DATA_TRANSFER_EXTERNAL_GBYTES": {
423 "type": "integer",
424 "example": 0
425 },
426 "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
427 "type": "integer",
428 "example": 0
429 },
430 "PROXY_SERPS": {
431 "type": "integer",
432 "example": 0
433 }
434 }
435 },
436 "usageTotalUsd": {
437 "type": "number",
438 "example": 0.00005
439 },
440 "usageUsd": {
441 "type": "object",
442 "properties": {
443 "ACTOR_COMPUTE_UNITS": {
444 "type": "integer",
445 "example": 0
446 },
447 "DATASET_READS": {
448 "type": "integer",
449 "example": 0
450 },
451 "DATASET_WRITES": {
452 "type": "integer",
453 "example": 0
454 },
455 "KEY_VALUE_STORE_READS": {
456 "type": "integer",
457 "example": 0
458 },
459 "KEY_VALUE_STORE_WRITES": {
460 "type": "number",
461 "example": 0.00005
462 },
463 "KEY_VALUE_STORE_LISTS": {
464 "type": "integer",
465 "example": 0
466 },
467 "REQUEST_QUEUE_READS": {
468 "type": "integer",
469 "example": 0
470 },
471 "REQUEST_QUEUE_WRITES": {
472 "type": "integer",
473 "example": 0
474 },
475 "DATA_TRANSFER_INTERNAL_GBYTES": {
476 "type": "integer",
477 "example": 0
478 },
479 "DATA_TRANSFER_EXTERNAL_GBYTES": {
480 "type": "integer",
481 "example": 0
482 },
483 "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
484 "type": "integer",
485 "example": 0
486 },
487 "PROXY_SERPS": {
488 "type": "integer",
489 "example": 0
490 }
491 }
492 }
493 }
494 }
495 }
496 }
497 }
498 }
499}
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:
Actor Metrics
38 monthly users
-
4 bookmarks
42% runs succeeded
Created in Dec 2024
Modified 6 days ago