Crawl4ai
No credit card required
Crawl4ai
No credit card required
EXPERIMENTAL - Wraps the https://crawl4ai.com/ library for retrieving text content from websites
You can access the Crawl4ai 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": "brMEg789rVxqDepJn"
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 }
243 },
244 "runsResponseSchema": {
245 "type": "object",
246 "properties": {
247 "data": {
248 "type": "object",
249 "properties": {
250 "id": {
251 "type": "string"
252 },
253 "actId": {
254 "type": "string"
255 },
256 "userId": {
257 "type": "string"
258 },
259 "startedAt": {
260 "type": "string",
261 "format": "date-time",
262 "example": "2025-01-08T00:00:00.000Z"
263 },
264 "finishedAt": {
265 "type": "string",
266 "format": "date-time",
267 "example": "2025-01-08T00:00:00.000Z"
268 },
269 "status": {
270 "type": "string",
271 "example": "READY"
272 },
273 "meta": {
274 "type": "object",
275 "properties": {
276 "origin": {
277 "type": "string",
278 "example": "API"
279 },
280 "userAgent": {
281 "type": "string"
282 }
283 }
284 },
285 "stats": {
286 "type": "object",
287 "properties": {
288 "inputBodyLen": {
289 "type": "integer",
290 "example": 2000
291 },
292 "rebootCount": {
293 "type": "integer",
294 "example": 0
295 },
296 "restartCount": {
297 "type": "integer",
298 "example": 0
299 },
300 "resurrectCount": {
301 "type": "integer",
302 "example": 0
303 },
304 "computeUnits": {
305 "type": "integer",
306 "example": 0
307 }
308 }
309 },
310 "options": {
311 "type": "object",
312 "properties": {
313 "build": {
314 "type": "string",
315 "example": "latest"
316 },
317 "timeoutSecs": {
318 "type": "integer",
319 "example": 300
320 },
321 "memoryMbytes": {
322 "type": "integer",
323 "example": 1024
324 },
325 "diskMbytes": {
326 "type": "integer",
327 "example": 2048
328 }
329 }
330 },
331 "buildId": {
332 "type": "string"
333 },
334 "defaultKeyValueStoreId": {
335 "type": "string"
336 },
337 "defaultDatasetId": {
338 "type": "string"
339 },
340 "defaultRequestQueueId": {
341 "type": "string"
342 },
343 "buildNumber": {
344 "type": "string",
345 "example": "1.0.0"
346 },
347 "containerUrl": {
348 "type": "string"
349 },
350 "usage": {
351 "type": "object",
352 "properties": {
353 "ACTOR_COMPUTE_UNITS": {
354 "type": "integer",
355 "example": 0
356 },
357 "DATASET_READS": {
358 "type": "integer",
359 "example": 0
360 },
361 "DATASET_WRITES": {
362 "type": "integer",
363 "example": 0
364 },
365 "KEY_VALUE_STORE_READS": {
366 "type": "integer",
367 "example": 0
368 },
369 "KEY_VALUE_STORE_WRITES": {
370 "type": "integer",
371 "example": 1
372 },
373 "KEY_VALUE_STORE_LISTS": {
374 "type": "integer",
375 "example": 0
376 },
377 "REQUEST_QUEUE_READS": {
378 "type": "integer",
379 "example": 0
380 },
381 "REQUEST_QUEUE_WRITES": {
382 "type": "integer",
383 "example": 0
384 },
385 "DATA_TRANSFER_INTERNAL_GBYTES": {
386 "type": "integer",
387 "example": 0
388 },
389 "DATA_TRANSFER_EXTERNAL_GBYTES": {
390 "type": "integer",
391 "example": 0
392 },
393 "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
394 "type": "integer",
395 "example": 0
396 },
397 "PROXY_SERPS": {
398 "type": "integer",
399 "example": 0
400 }
401 }
402 },
403 "usageTotalUsd": {
404 "type": "number",
405 "example": 0.00005
406 },
407 "usageUsd": {
408 "type": "object",
409 "properties": {
410 "ACTOR_COMPUTE_UNITS": {
411 "type": "integer",
412 "example": 0
413 },
414 "DATASET_READS": {
415 "type": "integer",
416 "example": 0
417 },
418 "DATASET_WRITES": {
419 "type": "integer",
420 "example": 0
421 },
422 "KEY_VALUE_STORE_READS": {
423 "type": "integer",
424 "example": 0
425 },
426 "KEY_VALUE_STORE_WRITES": {
427 "type": "number",
428 "example": 0.00005
429 },
430 "KEY_VALUE_STORE_LISTS": {
431 "type": "integer",
432 "example": 0
433 },
434 "REQUEST_QUEUE_READS": {
435 "type": "integer",
436 "example": 0
437 },
438 "REQUEST_QUEUE_WRITES": {
439 "type": "integer",
440 "example": 0
441 },
442 "DATA_TRANSFER_INTERNAL_GBYTES": {
443 "type": "integer",
444 "example": 0
445 },
446 "DATA_TRANSFER_EXTERNAL_GBYTES": {
447 "type": "integer",
448 "example": 0
449 },
450 "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
451 "type": "integer",
452 "example": 0
453 },
454 "PROXY_SERPS": {
455 "type": "integer",
456 "example": 0
457 }
458 }
459 }
460 }
461 }
462 }
463 }
464 }
465 }
466}
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:
Actor Metrics
11 monthly users
-
1 bookmark
97% runs succeeded
Created in Oct 2024
Modified 18 days ago