Batch Runner avatar

Batch Runner

Try for free

No credit card required

Go to Store
Batch Runner

Batch Runner

useful-tools/batch-runner
Try for free

No credit card required

Actor for starting several Runs from single Input. It also has capability to merge the Dataset items from the created batch.

You can access the Batch Runner 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": "4tA7wPfQt5ofx9tDj"
6  },
7  "servers": [
8    {
9      "url": "https://api.apify.com/v2"
10    }
11  ],
12  "paths": {
13    "/acts/useful-tools~batch-runner/run-sync-get-dataset-items": {
14      "post": {
15        "operationId": "run-sync-get-dataset-items-useful-tools-batch-runner",
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/useful-tools~batch-runner/runs": {
50      "post": {
51        "operationId": "runs-sync-useful-tools-batch-runner",
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/useful-tools~batch-runner/run-sync": {
93      "post": {
94        "operationId": "run-sync-useful-tools-batch-runner",
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        "properties": {
134          "batch": {
135            "title": "Batch configuration",
136            "type": "array",
137            "description": "Configurations for individual runs"
138          },
139          "mergeDatasets": {
140            "title": "Merge datasets",
141            "type": "boolean",
142            "description": "If checked all the datasets from the Batch would be merged and imported into Batch Runner's default Dataset.",
143            "default": false
144          },
145          "doNotImportDuplicities": {
146            "title": "Avoid duplicities",
147            "type": "boolean",
148            "description": "If checked all the Dataset items from all Runs will be deduplicated.",
149            "default": false
150          },
151          "failOnAnyRunFails": {
152            "title": "Fail if any Run fails",
153            "type": "boolean",
154            "description": "If checked this Run will fails in case, that any of Run from Batch fails.",
155            "default": false
156          },
157          "maxConcurrency": {
158            "title": "Additional limit for maximal runs running in parallel",
159            "type": "integer",
160            "description": "Run would be started in parallel only if this maxConcurrency limit is not exceeded. (default: 25 - 25 parallel Runs)",
161            "default": 25
162          },
163          "maxMemoryMb": {
164            "title": "Max allocated memory in MB (including Batch Runner Run)",
165            "type": "integer",
166            "description": "Run would be started in parallel only if this Memory limit is not exceeded. (default: 0 - no limit)",
167            "default": 0
168          }
169        }
170      },
171      "runsResponseSchema": {
172        "type": "object",
173        "properties": {
174          "data": {
175            "type": "object",
176            "properties": {
177              "id": {
178                "type": "string"
179              },
180              "actId": {
181                "type": "string"
182              },
183              "userId": {
184                "type": "string"
185              },
186              "startedAt": {
187                "type": "string",
188                "format": "date-time",
189                "example": "2025-01-08T00:00:00.000Z"
190              },
191              "finishedAt": {
192                "type": "string",
193                "format": "date-time",
194                "example": "2025-01-08T00:00:00.000Z"
195              },
196              "status": {
197                "type": "string",
198                "example": "READY"
199              },
200              "meta": {
201                "type": "object",
202                "properties": {
203                  "origin": {
204                    "type": "string",
205                    "example": "API"
206                  },
207                  "userAgent": {
208                    "type": "string"
209                  }
210                }
211              },
212              "stats": {
213                "type": "object",
214                "properties": {
215                  "inputBodyLen": {
216                    "type": "integer",
217                    "example": 2000
218                  },
219                  "rebootCount": {
220                    "type": "integer",
221                    "example": 0
222                  },
223                  "restartCount": {
224                    "type": "integer",
225                    "example": 0
226                  },
227                  "resurrectCount": {
228                    "type": "integer",
229                    "example": 0
230                  },
231                  "computeUnits": {
232                    "type": "integer",
233                    "example": 0
234                  }
235                }
236              },
237              "options": {
238                "type": "object",
239                "properties": {
240                  "build": {
241                    "type": "string",
242                    "example": "latest"
243                  },
244                  "timeoutSecs": {
245                    "type": "integer",
246                    "example": 300
247                  },
248                  "memoryMbytes": {
249                    "type": "integer",
250                    "example": 1024
251                  },
252                  "diskMbytes": {
253                    "type": "integer",
254                    "example": 2048
255                  }
256                }
257              },
258              "buildId": {
259                "type": "string"
260              },
261              "defaultKeyValueStoreId": {
262                "type": "string"
263              },
264              "defaultDatasetId": {
265                "type": "string"
266              },
267              "defaultRequestQueueId": {
268                "type": "string"
269              },
270              "buildNumber": {
271                "type": "string",
272                "example": "1.0.0"
273              },
274              "containerUrl": {
275                "type": "string"
276              },
277              "usage": {
278                "type": "object",
279                "properties": {
280                  "ACTOR_COMPUTE_UNITS": {
281                    "type": "integer",
282                    "example": 0
283                  },
284                  "DATASET_READS": {
285                    "type": "integer",
286                    "example": 0
287                  },
288                  "DATASET_WRITES": {
289                    "type": "integer",
290                    "example": 0
291                  },
292                  "KEY_VALUE_STORE_READS": {
293                    "type": "integer",
294                    "example": 0
295                  },
296                  "KEY_VALUE_STORE_WRITES": {
297                    "type": "integer",
298                    "example": 1
299                  },
300                  "KEY_VALUE_STORE_LISTS": {
301                    "type": "integer",
302                    "example": 0
303                  },
304                  "REQUEST_QUEUE_READS": {
305                    "type": "integer",
306                    "example": 0
307                  },
308                  "REQUEST_QUEUE_WRITES": {
309                    "type": "integer",
310                    "example": 0
311                  },
312                  "DATA_TRANSFER_INTERNAL_GBYTES": {
313                    "type": "integer",
314                    "example": 0
315                  },
316                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
317                    "type": "integer",
318                    "example": 0
319                  },
320                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
321                    "type": "integer",
322                    "example": 0
323                  },
324                  "PROXY_SERPS": {
325                    "type": "integer",
326                    "example": 0
327                  }
328                }
329              },
330              "usageTotalUsd": {
331                "type": "number",
332                "example": 0.00005
333              },
334              "usageUsd": {
335                "type": "object",
336                "properties": {
337                  "ACTOR_COMPUTE_UNITS": {
338                    "type": "integer",
339                    "example": 0
340                  },
341                  "DATASET_READS": {
342                    "type": "integer",
343                    "example": 0
344                  },
345                  "DATASET_WRITES": {
346                    "type": "integer",
347                    "example": 0
348                  },
349                  "KEY_VALUE_STORE_READS": {
350                    "type": "integer",
351                    "example": 0
352                  },
353                  "KEY_VALUE_STORE_WRITES": {
354                    "type": "number",
355                    "example": 0.00005
356                  },
357                  "KEY_VALUE_STORE_LISTS": {
358                    "type": "integer",
359                    "example": 0
360                  },
361                  "REQUEST_QUEUE_READS": {
362                    "type": "integer",
363                    "example": 0
364                  },
365                  "REQUEST_QUEUE_WRITES": {
366                    "type": "integer",
367                    "example": 0
368                  },
369                  "DATA_TRANSFER_INTERNAL_GBYTES": {
370                    "type": "integer",
371                    "example": 0
372                  },
373                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
374                    "type": "integer",
375                    "example": 0
376                  },
377                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
378                    "type": "integer",
379                    "example": 0
380                  },
381                  "PROXY_SERPS": {
382                    "type": "integer",
383                    "example": 0
384                  }
385                }
386              }
387            }
388          }
389        }
390      }
391    }
392  }
393}

Batch Runner 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 Batch Runner 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

  • 5 bookmarks

  • >99% runs succeeded

  • Created in Sep 2023

  • Modified 2 months ago