Input & Output
Output port behavior, response schemas, and data formats for all Apify node operations.
Output Ports
| Port | Operations | Description |
|---|---|---|
| success | All 11 operations | Apify API responded successfully. Output schema varies by operation — see sections below. |
| error | All 11 operations | API returned an error, the token was invalid, the actor was not found, or the run timed out. Always includes errorCode and status. |
actor / run — Success Output
Returns immediately with the run object. The actor is still running at this point — use actorRun/getRun to poll for completion.
| Field | Type | Description |
|---|---|---|
id | string | Unique run ID. Use this in actorRun/getRun to check status. |
actId | string | The actor ID that was executed. |
status | string | Current run status — will be RUNNING immediately after launch. |
startedAt | string (ISO 8601) | Timestamp when the run started. |
finishedAt | string / null | null until the run completes. |
defaultDatasetId | string | Dataset ID where the actor will write its output items. |
defaultKeyValueStoreId | string | Key-value store ID for actor outputs like screenshots and logs. |
stats | object | Runtime statistics: inputBodyLen, restartCount, durationMillis (available after completion). |
{
"id": "HG7ML7jfd9YDHg",
"actId": "apify/web-scraper",
"status": "RUNNING",
"startedAt": "2026-05-23T14:00:00.000Z",
"finishedAt": null,
"defaultDatasetId": "WkzbQMuFYuamGv3",
"defaultKeyValueStoreId": "eJNzqsbVe2dMoEKS",
"stats": { "inputBodyLen": 420, "restartCount": 0, "durationMillis": 0 }
}
actor / runAndGetDatasetItems — Success Output
Returns after the actor completes. Output contains the run metadata plus the dataset items array.
| Field | Type | Description |
|---|---|---|
runId | string | The run ID that was executed. |
status | string | Final run status — SUCCEEDED, FAILED, or TIMED-OUT. |
items | array | Array of dataset items extracted by the actor. Each item is a JSON object whose shape depends on the actor. |
itemCount | integer | Total number of items returned. |
datasetId | string | The dataset ID the items were read from. |
{
"runId": "HG7ML7jfd9YDHg",
"status": "SUCCEEDED",
"itemCount": 3,
"datasetId": "WkzbQMuFYuamGv3",
"items": [
{ "url": "https://example.com/product/1", "title": "Widget Pro", "price": "$29.99" },
{ "url": "https://example.com/product/2", "title": "Widget Lite", "price": "$9.99" },
{ "url": "https://example.com/product/3", "title": "Widget Max", "price": "$49.99" }
]
}
dataset / getItems — Success Output
| Field | Type | Description |
|---|---|---|
items | array | Array of dataset item objects. Field names match what the actor wrote. |
count | integer | Number of items returned in this response (respects Limit). |
offset | integer | The offset value used in this request. |
total | integer | Total number of items in the full dataset (before offset/limit). |
keyValueStore / getRecord — Success Output
| Field | Type | Description |
|---|---|---|
key | string | The record key that was requested. |
value | any | The stored value. May be a JSON object, string, number, or base64-encoded binary depending on what the actor stored. |
contentType | string | MIME type of the stored value (e.g. application/json, image/png, text/plain). |
{
"key": "OUTPUT",
"contentType": "application/json",
"value": {
"pageTitle": "Acme Corp — Pricing",
"extractedAt": "2026-05-23T14:05:00.000Z",
"items": [...]
}
}
actorRun / getRun — Success Output
Returns the full run object: id, actId, status, startedAt, finishedAt, defaultDatasetId, defaultKeyValueStoreId, stats (with durationMillis, inputBodyLen, restartCount), plus exitCode (integer) and isStatusMessageTerminal (boolean).
actorRun / getActorRuns and getUserRunsList — Success Output
Returns items (array of run summary objects — each with id, actId, status, startedAt, finishedAt), total (integer), offset, count.
actor / scrapeSingleUrl — Success Output
Returns url (the URL that was scraped), html (full rendered HTML, only if ExtractHtml=true), text (plain text, only if ExtractText=true), screenshotBase64 (PNG as base64, only if TakeScreenshot=true), statusCode (HTTP response code), loadedAt (ISO timestamp).
Error Port Output
All operations route to the error port on failure:
| Field | Type | Description |
|---|---|---|
status | string | Always "error". |
errorCode | string | Apify API error type, e.g. actor-not-found, run-timed-out, invalid-token, dataset-not-found. |
message | string | Human-readable error description from the Apify API. |
{
"status": "error",
"errorCode": "actor-not-found",
"message": "Actor 'acme/nonexistent-actor' was not found."
}