Slug flow induces vibration in pipelines, which may, in some cases, result in fatigue failure. This can result from dynamic stresses, induced by the deflection and bending moment in the pipe span, growing to levels above the endurance limits of the pipeline material. As such, it is of paramount importance to understand and quantify the size of the pipeline response to slug flow under given speed and damping conditions. This paper utilizes the results of an optimization procedure to devise a surrogate closed-form model, which can be employed to calculate the maximum values of the pipeline loadings at given values of speed and damping parameters. The surrogate model is intended to replace the computationally costly numerical procedure needed for the analysis. The maximum values of the lateral deflection and bending moment, along with their locations, have been calculated using the optimization method of stochastic perturbation and successive approximations (SPSA). The accuracy of the proposed surrogate model will be validated numerically, and the model will be subsequently used in a numerical example to demonstrate its applicability in industrial situations. An accompanying spreadsheet with this worked example is also given.