{
  "openapi": "3.0.1",
  "info": {
    "title": "Pipe Flow Calculator: Pressure Drop, Pipe Sizing, Pumps",
    "description": "Pipe pressure drop, flow and sizing for water, oils and gases (Darcy-Weisbach, Colebrook, fittings), pump operating points with NPSH, and looped pipe networks. Plain text or JSON in, numbers and charts out. For AI agents.",
    "version": "0.1",
    "x-build-id": "WuMynaCe6SXNfuefI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/jumblemog~pipe-flow-calculator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-jumblemog-pipe-flow-calculator",
        "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/jumblemog~pipe-flow-calculator/runs": {
      "post": {
        "operationId": "runs-sync-jumblemog-pipe-flow-calculator",
        "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/jumblemog~pipe-flow-calculator/run-sync": {
      "post": {
        "operationId": "run-sync-jumblemog-pipe-flow-calculator",
        "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": {
          "pipes": {
            "title": "Pipe runs",
            "type": "array",
            "description": "One pipe run per entry, as a line of text or an object. Text: 'water at 20 C, 200 gpm through 300 ft of 3 in sch 40 steel with 6 elbows and 2 gate valves, rise 20 ft'. Object fields: fluid, temperature, pressure (inlet, absolute or gauge; needed for gases), flow (200 gpm, 15 l/s, 120 m3/h, 500 scfm, 2 kg/s) or velocity, pipe ('2 in sch 40', 'DN50', '3/4 in type L copper', '4 in SDR 11 HDPE', '6 in PVC sch 80') or diameter (inside), material, roughness, length, fittings (['6 elbows', '2 gate valves', '1 swing check valve', 'entrance', 'exit', 'strainer K = 2']), K (extra losses), rise (outlet minus inlet elevation), and segments for pipes in series. Without a flow, give pressureDrop (or outletPressure) to find the flow. Set sizePipe (with optional maxVelocity and maxPressureDrop such as '4 ft/100 ft' or '0.5 bar/100 m') to pick the smallest size."
          },
          "pumpSystems": {
            "title": "Pump systems",
            "type": "array",
            "description": "A pump against its system: {\"pump\": {\"curve\": [[\"0 gpm\", \"160 ft\"], [\"200 gpm\", \"140 ft\"], [\"400 gpm\", \"80 ft\"]], \"efficiency\": [[flow, \"75%\"], ...], \"npshr\": [[flow, head], ...], \"speed\": \"90%\", \"count\": 2, \"arrangement\": \"parallel\"}, \"staticHead\": \"85 ft\" (or sourceElevation, destinationElevation, sourcePressure, destinationPressure), \"suction\": {pipe, length, fittings, liquidLevel (above the pump; negative for a lift), pressure}, \"discharge\": a pipe run as text or object}. Returns the operating point, efficiency, shaft power, NPSH available and the curves. Without a pump, give maxFlow for the system curve alone."
          },
          "networks": {
            "title": "Pipe networks",
            "type": "array",
            "description": "Looped or branched networks: {\"nodes\": [{\"id\": \"Tank\", \"type\": \"tank\", \"head\": \"95 m\"}, {\"id\": \"A\", \"elevation\": \"40 m\", \"demand\": \"25 l/s\"}], \"pipes\": [{\"id\": \"P1\", \"from\": \"Tank\", \"to\": \"A\", \"length\": \"1000 m\", \"diameter\": \"400 mm\" (or \"pipe\": \"16 in sch 40\"), \"material\": \"ductile iron\", \"C\": 130, \"fittings\": [...], \"checkValve\": true}], \"pumps\": [{\"id\": \"PU1\", \"from\": \"A\", \"to\": \"B\", \"curve\": [...]}], \"headloss\": \"darcy-weisbach\" or \"hazen-williams\"}. Reservoirs and tanks take a head, a level above their elevation, or a pressure. Optional x and y place the nodes on the drawing. Returns every flow, velocity, head loss, head and pressure, and a drawing of the network."
          },
          "fluid": {
            "title": "Default fluid",
            "type": "string",
            "description": "For requests that don't name one: water, seawater, air, nitrogen, natural gas, steam, CO2, propane, a refrigerant, ethylene glycol 30%, propylene glycol 40%, brine 20%, diesel, gasoline, kerosene, crude oil, hydraulic oil ISO VG 46... Empty: water."
          },
          "temperature": {
            "title": "Default temperature",
            "type": "string",
            "description": "For requests that don't give one, such as 20 C or 68 F. Empty: 20 °C."
          },
          "pressure": {
            "title": "Default inlet pressure",
            "type": "string",
            "description": "For requests that don't give one, such as 7 barg or 100 psig (absolute unless written as gauge). Used for gas density and outlet pressures."
          },
          "units": {
            "title": "Units",
            "enum": [
              "auto",
              "SI",
              "US"
            ],
            "type": "string",
            "description": "Units of bare numbers and of the results. Automatic picks US when most units written are US units.",
            "default": "auto"
          },
          "charts": {
            "title": "Draw charts",
            "type": "boolean",
            "description": "A pressure-drop breakdown for each pipe run (the first 50), pump and system curves, and network drawings.",
            "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}