Crawl4AI avatar
Crawl4AI

Pricing

Pay per usage

Go to Store
Crawl4AI

Crawl4AI

janbuchar/crawl4ai

Developed by

Jan Buchar

Maintained by Community

Wraps the Crawl4AI open-source library for retrieving text content from websites.

0.0 (0)

Pricing

Pay per usage

2

Monthly users

48

Runs succeeded

84%

Last modified

15 hours ago

You can access the Crawl4AI programmatically from your own applications by using the Apify API. You can also 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": "03gcSKdJxgrPbt4Xd"
6  },
7  "servers": [
8    {
9      "url": "https://api.apify.com/v2"
10    }
11  ],
12  "paths": {
13    "/acts/janbuchar~crawl4ai/run-sync-get-dataset-items": {
14      "post": {
15        "operationId": "run-sync-get-dataset-items-janbuchar-crawl4ai",
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/janbuchar~crawl4ai/runs": {
50      "post": {
51        "operationId": "runs-sync-janbuchar-crawl4ai",
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/janbuchar~crawl4ai/run-sync": {
93      "post": {
94        "operationId": "run-sync-janbuchar-crawl4ai",
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",
141            "items": {
142              "type": "object",
143              "required": [
144                "url"
145              ],
146              "properties": {
147                "url": {
148                  "type": "string",
149                  "title": "URL of a web page",
150                  "format": "uri"
151                }
152              }
153            }
154          },
155          "proxyConfiguration": {
156            "title": "Proxy configuration",
157            "type": "object",
158            "description": "Select proxies to be used by your crawler."
159          },
160          "magicMode": {
161            "title": "Use magic mode",
162            "type": "boolean",
163            "description": "Masks browser automation signals, Simulates human-like behavior, Overrides navigator properties, Handles cookie consent popups, Manages browser fingerprinting, Randomizes timing patterns",
164            "default": true
165          },
166          "saveScreenshots": {
167            "title": "Save screenshots",
168            "type": "boolean",
169            "description": "Should the crawler save screenshots?",
170            "default": false
171          },
172          "cssSelector": {
173            "title": "CSS selector",
174            "type": "string",
175            "description": "Ensures only a part of the website is processed"
176          },
177          "waitFor": {
178            "title": "Wait for",
179            "type": "string",
180            "description": "CSS selector or JS function to wait for before processing a page"
181          },
182          "jsCode": {
183            "title": "Javascript code to execute on each page",
184            "type": "string",
185            "description": "Function executed for each request"
186          },
187          "extractionStrategy": {
188            "title": "Extraction strategy",
189            "enum": [
190              "llm",
191              "jsonCss",
192              "cosine"
193            ],
194            "type": "string",
195            "description": "Specifies how data is extracted from each page"
196          },
197          "llmProvider": {
198            "title": "LLM provider",
199            "type": "string",
200            "description": "Specifies the LLM used to extract data"
201          },
202          "llmApiToken": {
203            "title": "API token",
204            "type": "string",
205            "description": "Token used for authentication with the LLM provider"
206          },
207          "llmInstruction": {
208            "title": "Instruction",
209            "type": "string",
210            "description": "Instructions (prompt) for the LLM"
211          },
212          "jsonCssSchema": {
213            "title": "JsonCss schema",
214            "type": "string",
215            "description": "Description of the data to be extracted"
216          },
217          "cosineSemanticFilter": {
218            "title": "Semantic filter",
219            "type": "string",
220            "description": "Specifies the semantic filter"
221          },
222          "cosineWordCountThreshold": {
223            "title": "Word count threshold",
224            "type": "integer",
225            "description": "Specifies the word count threshold"
226          },
227          "cosineLinkageMethod": {
228            "title": "Linkage method",
229            "type": "string",
230            "description": "Specifies the linkage method"
231          },
232          "cosineTopK": {
233            "title": "Top K",
234            "type": "integer",
235            "description": "Specifies top K"
236          },
237          "cosineModelName": {
238            "title": "Model name",
239            "type": "string",
240            "description": "Specifies the model"
241          },
242          "debugLog": {
243            "title": "Debug logging",
244            "type": "boolean",
245            "description": "Print debug-level log messages",
246            "default": false
247          }
248        }
249      },
250      "runsResponseSchema": {
251        "type": "object",
252        "properties": {
253          "data": {
254            "type": "object",
255            "properties": {
256              "id": {
257                "type": "string"
258              },
259              "actId": {
260                "type": "string"
261              },
262              "userId": {
263                "type": "string"
264              },
265              "startedAt": {
266                "type": "string",
267                "format": "date-time",
268                "example": "2025-01-08T00:00:00.000Z"
269              },
270              "finishedAt": {
271                "type": "string",
272                "format": "date-time",
273                "example": "2025-01-08T00:00:00.000Z"
274              },
275              "status": {
276                "type": "string",
277                "example": "READY"
278              },
279              "meta": {
280                "type": "object",
281                "properties": {
282                  "origin": {
283                    "type": "string",
284                    "example": "API"
285                  },
286                  "userAgent": {
287                    "type": "string"
288                  }
289                }
290              },
291              "stats": {
292                "type": "object",
293                "properties": {
294                  "inputBodyLen": {
295                    "type": "integer",
296                    "example": 2000
297                  },
298                  "rebootCount": {
299                    "type": "integer",
300                    "example": 0
301                  },
302                  "restartCount": {
303                    "type": "integer",
304                    "example": 0
305                  },
306                  "resurrectCount": {
307                    "type": "integer",
308                    "example": 0
309                  },
310                  "computeUnits": {
311                    "type": "integer",
312                    "example": 0
313                  }
314                }
315              },
316              "options": {
317                "type": "object",
318                "properties": {
319                  "build": {
320                    "type": "string",
321                    "example": "latest"
322                  },
323                  "timeoutSecs": {
324                    "type": "integer",
325                    "example": 300
326                  },
327                  "memoryMbytes": {
328                    "type": "integer",
329                    "example": 1024
330                  },
331                  "diskMbytes": {
332                    "type": "integer",
333                    "example": 2048
334                  }
335                }
336              },
337              "buildId": {
338                "type": "string"
339              },
340              "defaultKeyValueStoreId": {
341                "type": "string"
342              },
343              "defaultDatasetId": {
344                "type": "string"
345              },
346              "defaultRequestQueueId": {
347                "type": "string"
348              },
349              "buildNumber": {
350                "type": "string",
351                "example": "1.0.0"
352              },
353              "containerUrl": {
354                "type": "string"
355              },
356              "usage": {
357                "type": "object",
358                "properties": {
359                  "ACTOR_COMPUTE_UNITS": {
360                    "type": "integer",
361                    "example": 0
362                  },
363                  "DATASET_READS": {
364                    "type": "integer",
365                    "example": 0
366                  },
367                  "DATASET_WRITES": {
368                    "type": "integer",
369                    "example": 0
370                  },
371                  "KEY_VALUE_STORE_READS": {
372                    "type": "integer",
373                    "example": 0
374                  },
375                  "KEY_VALUE_STORE_WRITES": {
376                    "type": "integer",
377                    "example": 1
378                  },
379                  "KEY_VALUE_STORE_LISTS": {
380                    "type": "integer",
381                    "example": 0
382                  },
383                  "REQUEST_QUEUE_READS": {
384                    "type": "integer",
385                    "example": 0
386                  },
387                  "REQUEST_QUEUE_WRITES": {
388                    "type": "integer",
389                    "example": 0
390                  },
391                  "DATA_TRANSFER_INTERNAL_GBYTES": {
392                    "type": "integer",
393                    "example": 0
394                  },
395                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
396                    "type": "integer",
397                    "example": 0
398                  },
399                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
400                    "type": "integer",
401                    "example": 0
402                  },
403                  "PROXY_SERPS": {
404                    "type": "integer",
405                    "example": 0
406                  }
407                }
408              },
409              "usageTotalUsd": {
410                "type": "number",
411                "example": 0.00005
412              },
413              "usageUsd": {
414                "type": "object",
415                "properties": {
416                  "ACTOR_COMPUTE_UNITS": {
417                    "type": "integer",
418                    "example": 0
419                  },
420                  "DATASET_READS": {
421                    "type": "integer",
422                    "example": 0
423                  },
424                  "DATASET_WRITES": {
425                    "type": "integer",
426                    "example": 0
427                  },
428                  "KEY_VALUE_STORE_READS": {
429                    "type": "integer",
430                    "example": 0
431                  },
432                  "KEY_VALUE_STORE_WRITES": {
433                    "type": "number",
434                    "example": 0.00005
435                  },
436                  "KEY_VALUE_STORE_LISTS": {
437                    "type": "integer",
438                    "example": 0
439                  },
440                  "REQUEST_QUEUE_READS": {
441                    "type": "integer",
442                    "example": 0
443                  },
444                  "REQUEST_QUEUE_WRITES": {
445                    "type": "integer",
446                    "example": 0
447                  },
448                  "DATA_TRANSFER_INTERNAL_GBYTES": {
449                    "type": "integer",
450                    "example": 0
451                  },
452                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
453                    "type": "integer",
454                    "example": 0
455                  },
456                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
457                    "type": "integer",
458                    "example": 0
459                  },
460                  "PROXY_SERPS": {
461                    "type": "integer",
462                    "example": 0
463                  }
464                }
465              }
466            }
467          }
468        }
469      }
470    }
471  }
472}

Crawl4AI 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 Crawl4AI 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:

Pricing

Pricing model

Pay per usage

This Actor isย paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage.