Facebook Ads Library Scraper avatar

Facebook Ads Library Scraper

Try for free

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

Go to Store
Facebook Ads Library Scraper

Facebook Ads Library Scraper

easyapi/facebook-ads-library-scraper
Try for free

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

Extract detailed information about active Facebook ads including content, images, targeting data and more. Perfect for market research, competitor analysis and ad intelligence. Supports all countries and ad categories with anti-detection measures.

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": "bCbFZdoYDMq3jWtZC"
6  },
7  "servers": [
8    {
9      "url": "https://api.apify.com/v2"
10    }
11  ],
12  "paths": {
13    "/acts/easyapi~facebook-ads-library-scraper/run-sync-get-dataset-items": {
14      "post": {
15        "operationId": "run-sync-get-dataset-items-easyapi-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/easyapi~facebook-ads-library-scraper/runs": {
50      "post": {
51        "operationId": "runs-sync-easyapi-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/easyapi~facebook-ads-library-scraper/run-sync": {
93      "post": {
94        "operationId": "run-sync-easyapi-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          "searchUrl"
135        ],
136        "properties": {
137          "searchUrl": {
138            "title": "Facebook Ad Library Search URL",
139            "type": "string",
140            "description": "URL of Facebook Ad Library search results page",
141            "default": "https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=US&media_type=all&q=cup&search_type=keyword_unordered"
142          },
143          "maxItems": {
144            "title": "Maximum Items",
145            "minimum": 1,
146            "maximum": 10000,
147            "type": "integer",
148            "description": "Maximum number of ads to scrape",
149            "default": 20
150          }
151        }
152      },
153      "runsResponseSchema": {
154        "type": "object",
155        "properties": {
156          "data": {
157            "type": "object",
158            "properties": {
159              "id": {
160                "type": "string"
161              },
162              "actId": {
163                "type": "string"
164              },
165              "userId": {
166                "type": "string"
167              },
168              "startedAt": {
169                "type": "string",
170                "format": "date-time",
171                "example": "2025-01-08T00:00:00.000Z"
172              },
173              "finishedAt": {
174                "type": "string",
175                "format": "date-time",
176                "example": "2025-01-08T00:00:00.000Z"
177              },
178              "status": {
179                "type": "string",
180                "example": "READY"
181              },
182              "meta": {
183                "type": "object",
184                "properties": {
185                  "origin": {
186                    "type": "string",
187                    "example": "API"
188                  },
189                  "userAgent": {
190                    "type": "string"
191                  }
192                }
193              },
194              "stats": {
195                "type": "object",
196                "properties": {
197                  "inputBodyLen": {
198                    "type": "integer",
199                    "example": 2000
200                  },
201                  "rebootCount": {
202                    "type": "integer",
203                    "example": 0
204                  },
205                  "restartCount": {
206                    "type": "integer",
207                    "example": 0
208                  },
209                  "resurrectCount": {
210                    "type": "integer",
211                    "example": 0
212                  },
213                  "computeUnits": {
214                    "type": "integer",
215                    "example": 0
216                  }
217                }
218              },
219              "options": {
220                "type": "object",
221                "properties": {
222                  "build": {
223                    "type": "string",
224                    "example": "latest"
225                  },
226                  "timeoutSecs": {
227                    "type": "integer",
228                    "example": 300
229                  },
230                  "memoryMbytes": {
231                    "type": "integer",
232                    "example": 1024
233                  },
234                  "diskMbytes": {
235                    "type": "integer",
236                    "example": 2048
237                  }
238                }
239              },
240              "buildId": {
241                "type": "string"
242              },
243              "defaultKeyValueStoreId": {
244                "type": "string"
245              },
246              "defaultDatasetId": {
247                "type": "string"
248              },
249              "defaultRequestQueueId": {
250                "type": "string"
251              },
252              "buildNumber": {
253                "type": "string",
254                "example": "1.0.0"
255              },
256              "containerUrl": {
257                "type": "string"
258              },
259              "usage": {
260                "type": "object",
261                "properties": {
262                  "ACTOR_COMPUTE_UNITS": {
263                    "type": "integer",
264                    "example": 0
265                  },
266                  "DATASET_READS": {
267                    "type": "integer",
268                    "example": 0
269                  },
270                  "DATASET_WRITES": {
271                    "type": "integer",
272                    "example": 0
273                  },
274                  "KEY_VALUE_STORE_READS": {
275                    "type": "integer",
276                    "example": 0
277                  },
278                  "KEY_VALUE_STORE_WRITES": {
279                    "type": "integer",
280                    "example": 1
281                  },
282                  "KEY_VALUE_STORE_LISTS": {
283                    "type": "integer",
284                    "example": 0
285                  },
286                  "REQUEST_QUEUE_READS": {
287                    "type": "integer",
288                    "example": 0
289                  },
290                  "REQUEST_QUEUE_WRITES": {
291                    "type": "integer",
292                    "example": 0
293                  },
294                  "DATA_TRANSFER_INTERNAL_GBYTES": {
295                    "type": "integer",
296                    "example": 0
297                  },
298                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
299                    "type": "integer",
300                    "example": 0
301                  },
302                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
303                    "type": "integer",
304                    "example": 0
305                  },
306                  "PROXY_SERPS": {
307                    "type": "integer",
308                    "example": 0
309                  }
310                }
311              },
312              "usageTotalUsd": {
313                "type": "number",
314                "example": 0.00005
315              },
316              "usageUsd": {
317                "type": "object",
318                "properties": {
319                  "ACTOR_COMPUTE_UNITS": {
320                    "type": "integer",
321                    "example": 0
322                  },
323                  "DATASET_READS": {
324                    "type": "integer",
325                    "example": 0
326                  },
327                  "DATASET_WRITES": {
328                    "type": "integer",
329                    "example": 0
330                  },
331                  "KEY_VALUE_STORE_READS": {
332                    "type": "integer",
333                    "example": 0
334                  },
335                  "KEY_VALUE_STORE_WRITES": {
336                    "type": "number",
337                    "example": 0.00005
338                  },
339                  "KEY_VALUE_STORE_LISTS": {
340                    "type": "integer",
341                    "example": 0
342                  },
343                  "REQUEST_QUEUE_READS": {
344                    "type": "integer",
345                    "example": 0
346                  },
347                  "REQUEST_QUEUE_WRITES": {
348                    "type": "integer",
349                    "example": 0
350                  },
351                  "DATA_TRANSFER_INTERNAL_GBYTES": {
352                    "type": "integer",
353                    "example": 0
354                  },
355                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
356                    "type": "integer",
357                    "example": 0
358                  },
359                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
360                    "type": "integer",
361                    "example": 0
362                  },
363                  "PROXY_SERPS": {
364                    "type": "integer",
365                    "example": 0
366                  }
367                }
368              }
369            }
370          }
371        }
372      }
373    }
374  }
375}

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

  • 76 monthly users

  • 3 bookmarks

  • >99% runs succeeded

  • 21 days response time

  • Created in Oct 2024

  • Modified 2 months ago

Categories