{
  "openapi": "3.0.1",
  "info": {
    "title": "Actor Pipeline Builder — Validate Multi-Actor Workflows",
    "description": "Actor Pipeline Builder. Available on the Apify Store with pay-per-event pricing.",
    "version": "1.0",
    "x-build-id": "IgeDKVblGmqKdQiop"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ryanclinton~actor-pipeline-builder/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ryanclinton-actor-pipeline-builder",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/ryanclinton~actor-pipeline-builder/runs": {
      "post": {
        "operationId": "runs-sync-ryanclinton-actor-pipeline-builder",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/ryanclinton~actor-pipeline-builder/run-sync": {
      "post": {
        "operationId": "run-sync-ryanclinton-actor-pipeline-builder",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "stages"
        ],
        "properties": {
          "stages": {
            "title": "Pipeline Stages",
            "type": "array",
            "description": "Array of stages: [{actorId, alias, fieldMapping, memory, timeout}]. Each stage's fieldMapping maps inputField: outputFieldFromPrevStage. alias is an optional human name that appears in generatedCode comments and stageSignals.",
            "default": []
          },
          "validateRuntime": {
            "title": "Validate pipeline empirically (slower, deeper)",
            "type": "boolean",
            "description": "Also call actor-input-tester on each stage with a synthetic input built from the field mapping, to catch input schema mismatches that the design-time check cannot see. No actors are actually run — input-tester only validates shapes. Adds ~30 seconds per stage.",
            "default": false
          },
          "codegenMode": {
            "title": "Code generation mode",
            "enum": [
              "minimal",
              "productionish",
              "typed"
            ],
            "type": "string",
            "description": "Shape of the generated orchestration TypeScript. 'minimal' emits a plain Actor.call chain. 'productionish' wraps each stage in try/catch with log.warning on failure. 'typed' adds explicit ApifyCallOptions typing and `satisfies` assertions.",
            "default": "minimal"
          },
          "paginationMode": {
            "title": "Pagination mode for generated listItems",
            "enum": [
              "limit_1000",
              "paginate_all"
            ],
            "type": "string",
            "description": "Pipelines where a stage emits more than 1000 records silently lose data with limit_1000. Choose paginate_all to emit a fetchAllItems helper in the generated code.",
            "default": "limit_1000"
          },
          "suggestionMode": {
            "title": "Mapping suggestions",
            "enum": [
              "schema_only",
              "off"
            ],
            "type": "string",
            "description": "When a stage is missing a fieldMapping (NO_FIELD_MAPPING blocking issue), suggest candidates by matching the target actor's input-field names against the previous stage's dataset-schema field names. Confidence is returned per suggestion; never treat a suggestion as a drop-in without reviewing.",
            "default": "schema_only"
          },
          "strictness": {
            "title": "Strictness",
            "enum": [
              "default",
              "strict",
              "lenient"
            ],
            "type": "string",
            "description": "How aggressive the advisory/info issue surface is. 'default' uses the standard signal set. 'strict' also fires FIELD_METADATA_THIN as an advisory when schema field metadata is thin. 'lenient' suppresses informational codes so only blocking and advisory issues are emitted.",
            "default": "default"
          },
          "emitAgentContract": {
            "title": "Emit agentContract",
            "type": "boolean",
            "description": "Top-level agentContract object for MCP planners and LLM tool-call use (safeToCall, recommendedAction, requiredFixes[], safeInvocationMode, toolHint). Disable only if you're piping output into a downstream system that rejects unknown keys.",
            "default": true
          },
          "emitSignals": {
            "title": "Emit signals[] for Fleet Analytics consumption",
            "type": "boolean",
            "description": "Array of verdict-reason codes (plus the uppercase decisionPosture on valid runs) for downstream fleet tooling to aggregate on.",
            "default": true
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}