{
  "openapi": "3.0.1",
  "info": {
    "title": "Notion & Airtable Task Runner — Run Actors from Table Rows",
    "description": "Turn a Notion database, Airtable base or Supabase table into a job queue. Reads pending rows, runs an Apify Actor for each, and writes status, run ID, dataset ID and result count back to the row.",
    "version": "1.0",
    "x-build-id": "lTkMvs30oLLRCHFxn"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/deadwood_data_solutions~connector-task-runner/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-deadwood_data_solutions-connector-task-runner",
        "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/deadwood_data_solutions~connector-task-runner/runs": {
      "post": {
        "operationId": "runs-sync-deadwood_data_solutions-connector-task-runner",
        "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/deadwood_data_solutions~connector-task-runner/run-sync": {
      "post": {
        "operationId": "run-sync-deadwood_data_solutions-connector-task-runner",
        "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",
        "properties": {
          "board": {
            "title": "Task board connector",
            "type": "string",
            "description": "The MCP connector holding your task list (Notion database, Airtable base, Supabase table...). Connect the app under Integrations in Apify Console first. Credentials stay in Apify's proxy — this Actor never sees your tokens."
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "run",
              "list-tools",
              "self-test"
            ],
            "type": "string",
            "description": "Use 'list-tools' first to discover the connector's tool names, then 'run'. Use \"self-test\" for a free demo run that needs no connector — it emits one sample row so you can see the output shape.",
            "default": "run"
          },
          "readTool": {
            "title": "Tool that reads the board",
            "type": "string",
            "description": "MCP tool returning your task rows, e.g. 'query_database' for Notion, 'select' for Supabase."
          },
          "readToolArgs": {
            "title": "Arguments for the read tool",
            "type": "object",
            "description": "JSON arguments the read tool needs, e.g. {\"database_id\": \"abc123\"}."
          },
          "updateTool": {
            "title": "Tool that updates one row",
            "type": "string",
            "description": "MCP tool that patches a row, e.g. 'update_page' for Notion. Used to write status back."
          },
          "updateToolExtraArgs": {
            "title": "Constant arguments for the update tool",
            "type": "object",
            "description": "Fixed arguments merged into every update call."
          },
          "patchWrapperKey": {
            "title": "Nest status fields under this key",
            "type": "string",
            "description": "Some update tools expect changed fields nested under a key instead of passed flat, e.g. Notion's update-page tool wants {\"properties\": {...}} rather than the fields at the top level. Set this to that key name (e.g. 'properties' for Notion). Leave blank for tools that accept flat field arguments."
          },
          "idField": {
            "title": "Field holding each row's ID",
            "type": "string",
            "description": "Where the row's identifier lives in the read result, e.g. 'id' or 'page_id'.",
            "default": "id"
          },
          "idArgName": {
            "title": "Name the update tool gives that ID",
            "type": "string",
            "description": "What the update tool calls its identifier argument, e.g. 'page_id' for Notion.",
            "default": "id"
          },
          "statusField": {
            "title": "Status field",
            "type": "string",
            "description": "Field on each row holding its state.",
            "default": "Status"
          },
          "pendingValue": {
            "title": "Value meaning 'ready to run'",
            "type": "string",
            "description": "Only rows whose status equals this are picked up. Matching ignores case. Prefilled to match this actor's disposable test rows' steady-state value ('Done'), so Apify's automated health check finds work every cycle instead of only the first.",
            "default": "Pending"
          },
          "runningValue": {
            "title": "Value written while a task runs",
            "type": "string",
            "description": "Written before the child Actor starts, so the same row is never picked up twice.",
            "default": "Running"
          },
          "doneValue": {
            "title": "Value written on success",
            "type": "string",
            "description": "Written to the row after the child Actor run succeeds.",
            "default": "Done"
          },
          "failedValue": {
            "title": "Value written on failure",
            "type": "string",
            "description": "Written to the row if the child Actor run errors or finishes unsuccessfully.",
            "default": "Failed"
          },
          "defaultActorId": {
            "title": "Actor to run for each task",
            "type": "string",
            "description": "Actor ID or name to run per row, e.g. 'apify/google-maps-scraper'. Optional if every row names its own Actor."
          },
          "actorField": {
            "title": "Row field naming the Actor to run",
            "type": "string",
            "description": "Optional. Lets each row choose its own Actor. Overrides the default above."
          },
          "inputMap": {
            "title": "Row field to Actor input mapping",
            "type": "object",
            "description": "Maps the child Actor's input keys to row field paths, e.g. {\"searchStringsArray\": \"Query\", \"maxCrawledPlaces\": \"Limit\"}."
          },
          "staticInput": {
            "title": "Input shared by every task",
            "type": "object",
            "description": "Constant input merged into every child run, e.g. {\"language\": \"en\"}. Row values win on conflict."
          },
          "runIdField": {
            "title": "Field to write the run ID into",
            "type": "string",
            "description": "Optional write-back field."
          },
          "datasetIdField": {
            "title": "Field to write the dataset ID into",
            "type": "string",
            "description": "Optional write-back field."
          },
          "itemCountField": {
            "title": "Field to write the result count into",
            "type": "string",
            "description": "Optional write-back field."
          },
          "errorField": {
            "title": "Field to write the error into",
            "type": "string",
            "description": "Optional write-back field, truncated to 500 characters."
          },
          "maxTasks": {
            "title": "Maximum tasks per run",
            "minimum": 1,
            "type": "integer",
            "description": "Each task starts a child Actor run that consumes your Apify compute. Keep this modest until you trust the mapping. Prefilled to the disposable test board's exact row count so the automated health check's per-cycle compute cost stays fixed and small.",
            "default": 25
          },
          "memoryMbytes": {
            "title": "Memory for each child run",
            "minimum": 128,
            "type": "integer",
            "description": "Memory allocated to each child Actor run. Higher memory costs more per second but can finish faster.",
            "default": 1024
          },
          "timeoutSecs": {
            "title": "Timeout for each child run (seconds)",
            "minimum": 30,
            "type": "integer",
            "description": "How long a single child Actor run may take before it is stopped and the row is marked failed.",
            "default": 300
          },
          "dryRun": {
            "title": "Dry run (plan only, run nothing)",
            "type": "boolean",
            "description": "Report which rows would run and with what input, without starting any child Actor or touching the board.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}